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_name BLACK & 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_name BLACK & 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:
XML - CDATA Sections, In this chapter, we will discuss XML CDATA section. The term CDATA means, Character Data. CDATA is defined as blocks of text that are not parsed by the parser,
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