2 Replies Latest reply: Jan 10, 2007 9:12 AM by 807607 RSS

    Query regarding sending XML over HTTP Post request

    807607
      Hello,

      I am trying to send XML data from a server to client via HTTP Post request
      And vice versa � receive the data by a client

      Assume that the xml data looks something like

      <?xml+version="1.0"?>

      So my post query will look like

      http://<IP Address>:<port>/
      POST /MessageReceiver.jsp HTTP/1.0
      Host: www.SomeHost.net
      Content-Type: application/x-www-form-urlencoded
      Content-Length: 38
      %3C%3Fxml%2Bversion%3D%221.0%22%3F%3E+

      This information will be received by the client and converted back to xml data.

      My query is - is there some library/open-source stuff that
      does the process of transcoding the entity's non-ASCII characters
      at the server side
      and decoding the URL back to human-readable form at the client side?

      i.e. I need a simple mechanism to convert
      <?xml+version="1.0"?>
      to
      %3C%3Fxml%2Bversion%3D%221.0%22%3F%3E+
      at the server side, while sending data

      and do the opposite at the client side to get the xml back.

      Also could some one confirm if JTidy is a right tool to check if the xml is well-formed?
      Or is there any other standard tool that checks for well-formed properties of xml?


      regards,
      Deepak.