axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Peschel <bri...@occinc.com>
Subject Re: Problems with > in return messages
Date Mon, 26 Jul 2004 20:23:46 GMT
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 '&lt;testTag&gt;' 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">&amp;gt;This is&amp;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">&amp;lt;testTag&amp;gt;</commandReturn>
         </ns1:commandResponse>
      </SOAP-ENV:Body>
   </SOAP-ENV:Envelope>

Client program:
length 4, result: &gt;

Brian

Brian Peschel wrote:

> I am not sure if this should go here or in the developer's list, but I 
> will try here first.
>
> 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&gt;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">&gt;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&gt;world') adn that will work.  But, I don't 
> understand why I only have this problem on '>' and not on '<'
>
> Any thoughts would be helpful here....
>
> Brian
>
>

Mime
View raw message