Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-116

Can't transmit > in response string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.2 Final
    • 1.3 Final
    • None
    • None
    • Linux RedHat WS3, Apache 1.3.29, gcc version 3.2.2, xerces-c 2.5.0

    Description

      As per Sanjiva Weerwarana...

      I wrote a simple soap application to send a string and receive a string.
      The operation was called 'command'. I just want the string to bounce back right now, so my code looks like:
      xsd_string OccWebTicket::command(xsd_string Value0)
      {
      return Value0;
      }

      This seems to work fine until I send a '>' through in the request ie '<testTag>'. I expected to receive back the same thing, instead I recieve back '>'. Through a bit of investigaion, it appears to always be dropping everything before the '>'. (ie send 'test<>Tag' and receive '>Tag').

      The same problem appears in the interoptests/base test program (change 'hello world' to 'hello>world' and you will see the same thing.

      If I use the TCPMON java program, the problem is on the server side, not the client. Here is the send message (for the base test program)
      POST /axis/base HTTP/1.1
      Host: 127.0.0.1
      Content-Type: text/xml; charset=UTF-8
      SOAPAction: "base#echoString"
      Content-Length: 399

      <?xml version='1.0' encoding='utf-8' ?>
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
      <ns1:echoString xmlns:ns1="http://soapinterop.org/">
      <inputString xsi:type="xsd:string">hello>world</inputString>
      </ns1:echoString>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      And the receive message
      HTTP/1.1 200 OK
      Date: Mon, 26 Jul 2004 20:09:18 GMT
      Server: Apache/1.3.29 (Unix) mod_fastcgi/2.4.2
      Content-Length: 420
      Content-Type: text/xml

      <?xml version='1.0' encoding='utf-8' ?>
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
      <ns1:echoStringResponse xmlns:ns1="http://soapinterop.org/">
      <echoStringReturn
      xsi:type="xsd:string">>world</echoStringReturn>
      </ns1:echoStringResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      I was hoping to send and receive XML documents as my parameter, but if I can't send a '>' character, this won't work. I did try send the escaped version ('hello>world') adn that will work. But, I don't understand why I only have this problem on '>' and not on '<'

      Just one additional piece. If I change the code to send back a xml tag (rather than bouncing the string) it will fail if I use a '>'. If I send back HTML excaped data (ie send '<testTag>' rather than '<testTag>') the TCPMON program shows the excaped data coming back, but the client still fails. This is starting to sound (to me and I didn't look at the axis source code) like a library problem?

      send message:
      POST /axis/OccWebTicket HTTP/1.1
      Host: 127.0.0.1
      Content-Type: text/xml; charset=UTF-8
      SOAPAction: "OccWebTicket#command"
      Content-Length: 418

      <?xml version='1.0' encoding='utf-8' ?>
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
      <ns1:command xmlns:ns1="http://localhost/axis/OccWebTicket">
      <xmlRequest xsi:type="xsd:string">&gt;This is&gt; a
      test</xmlRequest>
      </ns1:command>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      Receive message:
      HTTP/1.1 200 OK
      Date: Mon, 26 Jul 2004 20:17:38 GMT
      Server: Apache/1.3.29 (Unix) mod_fastcgi/2.4.2
      Content-Length: 433
      Content-Type: text/xml

      <?xml version='1.0' encoding='utf-8' ?>
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
      <ns1:commandResponse
      xmlns:ns1="http://localhost/axis/OccWebTicket">
      <commandReturn
      xsi:type="xsd:string">&lt;testTag&gt;</commandReturn>
      </ns1:commandResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      Client program:
      length 4, result: >

      Attachments

        Activity

          People

            Unassigned Unassigned
            brianpeschel Brian Peschel
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: