Forum Discussion

psi108's avatar
psi108
New Contributor
17 years ago

soapui changes response? CDATA?

hello,

go a strange problem.

this is how the raw response looks:
TTP/1.1 200 OK
Server: nginx/0.6.32
Date: Sun, 22 Feb 2009 22:20:58 GMT
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.2.8-0.dotdeb.1
Set-Cookie: symfony=935e91c33045e5b99c6b70e7d6e97ae9; path=/
Set-Cookie: symfony=8e1d73e234a444ac1a0738a92b642677; path=/



e24cf2727a0582446a1b857eb62b86c8

 
 
 



So - this is how the response is shown in the XML Tab:
<?xml version="1.0" encoding="utf-8"?><br /><result action="session.signon" api="1.0" status="0"><br /><api_key>e24cf2727a0582446a1b857eb62b86c8</api_key><br /><country_code>0+49</country_code><br /><products_allowed><br />&nbsp; <product id="1" name="Einer zahlt" payment="group" /><br />&nbsp; <product id="2" name="Empf&auml;nger zahlt" payment="receiver" /><br />&nbsp; <product id="3" name="Sender zahlt" payment="sender" /><br /></products_allowed><br /></result>

wtf? :-)
is this as it should be, or a bug?

using soap ui 2.5.1 pro

thx for your help!

14 Replies

  • Joao_Mendes's avatar
    Joao_Mendes
    Occasional Contributor
    Sorry,
    To be persistent in this BUG.

    You are right this is a different way to use CDATA, but as in Portugal names can have special characters like mine (João ) this guys decided to CDATA the name only, for the parser of the resposta xml not to have problems with this.

    But, as you can see soapui is trying opening the CDATA in the begining of the "resposta" xml and closes it after the closing of the name CDATA, then leaves a ">" and then starts another CDATA and closes it in the end of resposta, as an example:

    Original:



    João Mendes
    2




    SoapUI changes to this:

    <?xml version="1.0" encoding="utf-8"?><resp><field1><![CDATA[João Mendes]]
    >
    </field1><field2>2</field2></resp>



    Am I seeing this wrong, or is this a BUG

    Thanks,
    João Mendes
  • Hi Joao,

    thanks for persuing! The construct created here is for wrapping the CDATA in a CDATA section, and the ending '>' for the wrapped CDATA is placed "outside" the wrapping CDATA. The confusing part here is maybe that a sole '>' is not invalid as it is in the xml generated by soapUI, check out http://www.w3.org/TR/REC-xml/#syntax which states that 'The right angle bracket (>) may be represented...' (not must..)

    Does that make things any clearer?

    regards!

    /Ole
    eviware.com
  • Joao_Mendes's avatar
    Joao_Mendes
    Occasional Contributor
    Hi,
    The BUG I refer is not for the ">", is with soapUI is closing the CDATA it created right after the CDATA that came from the response, leaving the end of the field1 tag in another CDATA.


    Thanks
    João Mendes