I am currently testing a desktop application which is sending some data to a web URL in XML format, for some reason this data seems to be not sent in the correct format.

I need to know if there are any website or script that I can use to troubleshoot this issue, for example I can point and send my test data to a website or script that can the data coming from my application, so that I can trouble shoot it.

Following is the setup that I have make in my desktop application:

<SMS> 
    <authentification> 
      <username>john</username> 
      <password>johnpass</password> 
    </authentification> 
    <message> 
      <sender>14756541254</sender> 
            <text>Thank you for booking with <Company>.Your confirmation no is <ConfNr>.For further information please call <Phone></text> 
    </message> 
     <recipients> 
    <gsm><MOBILE></gsm> 
     </recipients> 
  </SMS>"

    Install a webserver(ex apache) and php on your own computer and test it there....

      Not sure what you're asking... the XML data received by the destination web service is going to look exactly as you're sending it, so if you want to know what it is receiving... simply look at what you're sending.

      Likewise, you can simply echo/print the resulting (XML?) response to screen to view the raw response.

        bradgrafelman;10999368 wrote:

        Not sure what you're asking... the XML data received by the destination web service is going to look exactly as you're sending it, so if you want to know what it is receiving... simply look at what you're sending.
        .

        The XML data is sent from an ERP application, and we don't have a feature to capture what is going out from it, which is the reason we are trying to capture at the receiving end and see it.

          smartcard wrote:
          bradgrafelman wrote:

          Not sure what you're asking... the XML data received by the destination web service is going to look exactly as you're sending it, so if you want to know what it is receiving... simply look at what you're sending.

          The XML data is sent from an ERP application, and we don't have a feature to capture what is going out from it, which is the reason we are trying to capture at the receiving end and see it.

          ...

          bradgrafelman wrote:

          Likewise, you can simply echo/print the resulting (XML?) response to screen to view the raw response.

            Unless I'm mistaken, smartcard (who sounds pretty confused) has an issue where s/he is using a desktop application which submits XML data to a remote website. Then, at the same time the hints that they have control of the desktop application:

            Following is the setup that I have make in my desktop application

            I'm going to assume that smartcard would like to see the XML data and may or may not have control of either desktop app or remote server and wants to the see the XML that is transmitted. I'm also going to assume that the XML data is submitted by HTTP on port 80.

            OPTION 1
            Install a web server with PHP locally on the desktop machine that runs the desktop ERP application. Find out what remote website it submits to (e.g., some.remote.example.com) and then make an entry in the HOSTS file on the desktop machine so that the desktop assumes that the remote site is hosted locally at 127.0.0.1:

            127.0.0.1     some.remote.example.com

            What this will do is cause the desktop machine to route any requests to some.remote.example.com to the local machine (e.g., localhost, aka 127.0.0.1) and, because you have installed a web server, you should be able to set up a PHP script to capture the XML submission. You may need to create a directory structure and/or virtual host configuration to match the URL exactly, but once you get your PHP script in the right place, put this in it:

            file_put_contents("/path/to/dump/file.txt", print_r($_REQUEST, TRUE));
            

            NOTE: this whole step is a LOT easier if you have control of the remote server because you don't have to install apache or php and you don't have to edit your hosts file and you don't have to set up any kind of directory structure or PHP files. You just do it on the remote webserver that receives these XML requests.

            OPTION 2
            Install wireshark on the desktop and use it to inspect the traffic to the server. It'll take some figuring out but it's a neat tool and it shouldn't be too hard.
            Install wireshark on the

              I think sneakyimp's right (which means my responses above don't readily apply).

              I was also going to suggestion 'OPTION 2' that sneakyimp mentioned above. In all things networking, Wireshark is a popular and very effective tool. Plus, it has the advantage of requiring no modifications to your current software (which means you'll get a better look at the actual environment in question, not a duplicated testing environment).

                Write a Reply...