Error in building a soaprequest
There seems to be a bug in composing a soap request when text in the body containing certain characters. On a request we got back that the message was not wellformed. Looking at the raw request we see a kind of mixing up with two body elements. Deducing we found out it goes wrong when the text contains the following characters "{${".
When we have a request like this in the xml-view:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oob="http://www.OOBCWS03.OOBI0103.Request.com">
<soapenv:Header/>
<soapenv:Body>
<oob:OOBCWS03Operation>
<oob:OOBCWS03Operatie>
<oob:cgn_tekstuit_indi>xxx</oob:cgn_tekstuit_indi>
<oob:tekstuiti>{${</oob:tekstuiti>
</oob:OOBCWS03Operatie>
</oob:OOBCWS03Operation>
</soapenv:Body>
</soapenv:Envelope>
We see after the invoke in the raw-view, a kind of mixed up request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oob="http://www.OOBCWS03.OOBI0103.Request.com">
<soapenv:Header/>
<soapenv:Body>
<oob:OOBCWS03Operation>
<oob:OOBCWS03Operatie>
<oob:cgn_tekstuit_indi>xxx</oob:cgn_tekstuit_indi>
<oob:tekstuiti>{<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oob="http://www.OOBCWS03.OOBI0103.Request.com">
<soapenv:Header/>
<soapenv:Body>
<oob:OOBCWS03Operation>
<oob:OOBCWS03Operatie>
<oob:cgn_tekstuit_indi>xxx</oob:cgn_tekstuit_indi>
<oob:tekstuiti>{${</oob:tekstuiti>
</oob:OOBCWS03Operatie>
</oob:OOBCWS03Operation>
</soapenv:Body>
</soapenv:Envelope
As far as we know the characters {$ don't have a special meaning in XML, so it shouldn.t be a problem.
When we have a message with only "{$" (instead of "{${" ) the composing goes well:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oob="http://www.OOBCWS03.OOBI0103.Request.com">
<soapenv:Body>
<oob:OOBCWS03Operation>
<oob:OOBCWS03Operatie>
<oob:cgn_tekstuit_indi>xxx</oob:cgn_tekstuit_indi>
<oob:tekstuiti>{$</oob:tekstuiti>
</oob:OOBCWS03Operatie>
</oob:OOBCWS03Operation>
</soapenv:Body>
</soapenv:Envelope>
The soapUI version we are using is 5.4.0. Are we doing something wrong or is this a bug?
Kind regards,
Iwan Mensink
Thanks HimanshuTayal for your quick respons,
Using /$ didn't help but you put me in right direction of escape characters, using $$ did the trick for me.
Thanks again.