Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. sharing data by using xml

sharing data by using xml

Scheduled Pinned Locked Moved XML / XSL
sysadminxmlquestionannouncement
3 Posts 2 Posters 15 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    El Dev
    wrote on last edited by
    #1

    Hi!I have a scenario.a company ask me to include a payment system in my application and this is the requirement :

    a) we need you to provide us a location (in the form of a URL) which we can use to hit your server
    b) we will send information regarding a payment transaction in the following XML format to your server at the URL address:

    Request sent from ABC Company to My Company

    <?xml version="1.0"?>
    <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
    <COMMAND>
    <TYPE>PAYMENT</TYPE>
    <COMPANYNAME>Luku</COMPANYNAME> <CUSTOMEREFID>refernceNumber</CUSTOMEREFID>
    <MSISDN>msisdn</MSISDN>
    <AMOUNT></AMOUNT>
    <TXNID></TXNID>
    <STATUS></STATUS>
    </COMMAND>

    c) on your side, we need you to interpret the information provide in the XML string, take whatever actions need to be taken on your platform, and then give us a response with the results of your actions in the following format:

    Asynchronous response sent from My Company to ABC <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> I have tried to resolve,this is my xml file I have created: <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> and this is my .dtd file : <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00

    Z 1 Reply Last reply
    0
    • E El Dev

      Hi!I have a scenario.a company ask me to include a payment system in my application and this is the requirement :

      a) we need you to provide us a location (in the form of a URL) which we can use to hit your server
      b) we will send information regarding a payment transaction in the following XML format to your server at the URL address:

      Request sent from ABC Company to My Company

      <?xml version="1.0"?>
      <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
      <COMMAND>
      <TYPE>PAYMENT</TYPE>
      <COMPANYNAME>Luku</COMPANYNAME> <CUSTOMEREFID>refernceNumber</CUSTOMEREFID>
      <MSISDN>msisdn</MSISDN>
      <AMOUNT></AMOUNT>
      <TXNID></TXNID>
      <STATUS></STATUS>
      </COMMAND>

      c) on your side, we need you to interpret the information provide in the XML string, take whatever actions need to be taken on your platform, and then give us a response with the results of your actions in the following format:

      Asynchronous response sent from My Company to ABC <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> I have tried to resolve,this is my xml file I have created: <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> and this is my .dtd file : <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00

      Z Offline
      Z Offline
      Zaf Khan
      wrote on last edited by
      #2

      I would suppose the URL you need to give will be the address url of your HANDLER to handle the client companys request.... (the page you make to process the request) So if your handler was called TransactionValidator.php then the url would be.... http://www.yourcompany.net/some-folder/TransactionValidator.php I thought a .dtd was a document type definition in which case it should describe the data format of your xml file (I recommend you check this - as i may be wrong). Yes you need to persist the request (and the results) in a database for future refrence in case things go pear shaped!!

      E 1 Reply Last reply
      0
      • Z Zaf Khan

        I would suppose the URL you need to give will be the address url of your HANDLER to handle the client companys request.... (the page you make to process the request) So if your handler was called TransactionValidator.php then the url would be.... http://www.yourcompany.net/some-folder/TransactionValidator.php I thought a .dtd was a document type definition in which case it should describe the data format of your xml file (I recommend you check this - as i may be wrong). Yes you need to persist the request (and the results) in a database for future refrence in case things go pear shaped!!

        E Offline
        E Offline
        El Dev
        wrote on last edited by
        #3

        Thanks!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups