Hi all,
I hope someone can help.
We have a web service call that is from an external company.
There are several different calls that can me made, one of which I have successfully communicated with.
One of the web service calls requires a XML document that is sent via SOAP containing a CData section.
I have made a XML document correctly with the CData section but when I pass it through the SOAP engine the results are not as I expected or need.
The results have removed the <![CDATA[ wording and modified all the < and > character to be < and >.
I'm running VDF18.2 using SOAP 1.1
I have created the XML document :
Code:
<erx:message i:type="a:string" xmlns:a="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <![CDATA[<ePrescription xmlns="http://erx.com.au/integration/v1">
<SCID>2CY6K5B0BYVKJN2VD0</SCID>
<GUID></GUID>
<CreatedDate>2020-02-19T16:37:14</CreatedDate>
<NotificationConsentFlag>true</NotificationConsentFlag>
<Items>
<Item>
<Sequence>1</Sequence>
<State>Active</State>
<Content>
<Patient>
</Patient>
<Clinician>
</Clinician>
<PrescribedItem>
</PrescribedItem>
</Content>
</Item>
</Items>
</ePrescription>
]]></erx:message>
When I pass it to the web service call and then check what the SOAP request was I get:
Code:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body>
<erx:SendErxMessageWithSenderId xmlns:erx="http://erx.com.au/integration/v1">
<erx:message i:type="a:string" xmlns:a="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:erx="">
<ePrescription xmlns="http://erx.com.au/integration/v1">
<SCID>2CY6K5B0BYVKJN2VD0</SCID>
<GUID></GUID>
<CreatedDate>2020-02-19T16:37:14</CreatedDate>
<NotificationConsentFlag>true</NotificationConsentFlag>
<Items>
<Item>
<Sequence>1</Sequence>
<State>Active</State>
<Content>
<Patient>
</Patient>
<Clinician>
</Clinician>
<PrescribedItem>
</PrescribedItem>
</Content>
</Item>
</Items>
</ePrescription>
</erx:message>
<erx:messagetype>ERX001</erx:messagetype>
<erx:conversationid>9F843AD5-7A93-4CFD-849C-557D11D63604</erx:conversationid>
<erx:senderid>CY6K5</erx:senderid>
<erx:destinationid>00000</erx:destinationid>
</erx:SendErxMessageWithSenderId>
</soap:Body>
</soap:Envelope>
Notice that after the erx:message element I have the <![CDATA[ section, but in the request the <![CDATA[ section has been parsed. This has removed the <![CDATA[ wording and modified all the < and > character to be < and >.
Is there any way that I can get VDF to leave the <![CDATA[ part as is.
The result that I am wanting is like:
Code:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header>
</s:Header>
<s:Body>
<erx:SendErxMessageWithSenderId xmlns:erx="http://erx.com.au/integration/v1">
<erx:message i:type="a:string" xmlns:a="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<![CDATA[
<ePrescription xmlns="http://erx.com.au/integration/v1">
<SCID>2CMYHWBRBTWMM8FW64</SCID>
<GUID>{200F1B8E-A08E-45C3-B171-804645EF8A7E}</GUID>
<CreatedDate>2018-12-05T10:18:40</CreatedDate>
<NotificationConsentFlag>true</NotificationConsentFlag>
<Items>
<Item>
<Sequence>1</Sequence>
<State>Active</State>
<Content>
<Patient>
</Patient>
<Clinician>
</Clinician>
<PrescribedItem>
</PrescribedItem>
</Content>
</Item>
</Items>
</ePrescription>]]>
</erx:message>
<erx:messagetype>ERX001</erx:messagetype>
<erx:conversationid>8dae69a5-2054-4cec-a171-7ab65b289b68</erx:conversationid>
<erx:senderid>CMYHW</erx:senderid>
<erx:destinationid>00000</erx:destinationid>
</erx:SendErxMessageWithSenderId>
</s:Body>
</s:Envelope>
thanks in advance
David