You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Brian Peschel <br...@occinc.com> on 2004/07/27 14:28:59 UTC
Problems sending > in response string
As per sanjiva Weerwarana, I am sending this to the axis-C-dev list and
posting it in Jira...
This is rather long, so bear with me.....
<>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: >
Brian
Re: Problems sending > in response string
Posted by Alexei Dets <ad...@idsk.com>.
Hi!
On Tuesday 27 July 2004 08:28, Brian Peschel wrote:
> I was hoping to send and receive XML documents as my parameter, but if I
I'm able to send and receive XML documents with Axis C++ 1.2.
Alexei