Sending CDATA in Soap Request

Hi All,

we are facing an issue with CDATA in soap request.

In webMethods we have created the consumer webservice descriptor and calling the Target system webservice.

During the testing we have identified special chars like %,& coming along with other characters which is resulting in soap fault.

EG : tns:factory_nameBLACK & DECKER (SUZHOU) POWER TOOLS CO., LTD.</tns:factory_name>

In order to resolve this one we have implmented the CDATA for those fileds to ignore the entire field value.

tns:factory_name<!><CDATA[BLACK & DECKER (SUZHOU) POWER TOOLS CO., LTD.]]></tns:factory_name>

But Target system is telling that they are receving the data with CDATA which should not be happening.

Target System should only recieve the string value not with the CDATA tag.

tns:factory_nameBLACK & DECKER (SUZHOU) POWER TOOLS CO., LTD.</tns:factory_name>

After enabling the logging for Soap in IS i could see the below encoding for < and >.

< is encoding to < and > is encoding to >

tns:factory_name<!<CDATA[BLACK & DECKER (SUZHOU) POWER TOOLS CO., LTD.]]>></tns:factory_name>

This causing the issue now.

IS version is 9.5

Is there any we can instruct the soapclient service to not to encode those symbols?

Thanks,
Hanu

Looks like the syntax is incorrect. Can you refer the below link and do the required changes:

Hi Mahesh,

Thanks for your quick response.

Acutally it’s typo mistake from my end. we are using the CDATA syntax correctly in code.

tns:factory_name</tns:factory_name>

Please refer the below links for more details on the same issue.

https://empower.softwareag.com/sl24sec/SecuredServices/KCFullTextASP/viewing/view.asp?KEY=120228-13269051&DSN=PIVOTAL&DST=TCD&HL=1&QUERY=CDATA|Soap|Request&SessionID=223237636

https://empower.softwareag.com/sl24sec/SecuredServices/KCFullTextASP/viewing/view.asp?KEY=115441-9048568&DSN=PIVOTAL&DST=TCD&HL=1&QUERY=CDATA|Soap|Request&SessionID=223237636

we have to install IS_9.5_SP1_Core_Fix7 or higher to resolve this issue.

will update once we test after the fix installation.

Thanks,
Hanu

Ok, thanks for sharing the links. Kindly update once you have fixed the issue.

Also, can you share soapfault details if possible ( Enthu to know which characters caused what error )

Thanks,

You should not have to use CDATA for this. The Integration Server will encode the data for you. You may be missing a fix.

I created a very simple example by exposing the debugLog service via a provider WSD and then calling it via a consumer WSD. I called the consumer connector with the message “Hello Tom & Jerry!” This is the SOAP request that went out:

<?xml version='1.0' encoding='UTF-8'?>

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”>
soapenv:Body
<tns:debugLogInput xmlns:tns=“http://WIN7X64.US.SRC.LAN/pc.sandbox.ws.producer:producerWs”>
Hello world & amp; universe!
</tns:debugLogInput>
</soapenv:Body>
</soapenv:Envelope>

And in my server log, as expected, the message “Hello Tom & Jerry!” was printed.

Percio

PS. I had to put the space between & and amp; because the browser keeps decoding it but there’s no space in actuality.

Hi All,

we were facing an issue with CDATA in soap Response.

In webMethods we have created the provider webservice descriptor and calling the Target system webservice.

During the testing we have identified special chars like %,& etc… coming along with other characters and we got error not yet well format.

for Eg: O&M

We had implemented CDATA on our end. we had expected output only from Webmethodfs end like as O&M. but data it’s showing O&M on SOAP UI.

Could you please help here.

Thanks,
Vardha