I am working on a SOAP project and the response is not as expected instead I am getting in this format with < in place of '<'
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://example.com/">
<SOAP-ENV:Body>
<ns1:testResponse>
<testname>
//some other elements
<description><![CDATA[Testing some
data here]]></descripton>
//some other elements
</testname>
</ns1:testResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I am using PHP as my soap handling and sending the data[name, description, location, etc.] through an instance which will be processed in the WSDL file with
My WSDL file represents the same element
//other stuff
<xs:schema xmlns:xs='xyz' xmlns:xsd='abc'>
<xs:complexType name="data">
<xs:element name='name' type='xsd:string' />
<xs:element name='description' type='xsd:string' />
<xs:element name='location' type='xsd:string' />
....
</xs:complexType>
</xs:schema>
I even tried sending the data as a SoapVar like so in my PHP function
$this->description = new SoapVar("<![CDATA[".$res['info']."]]>", XSD_ANYTYPE);
and if I change it to XSD_ANYXML, the response is sending the data as plain text without the CDATA enclosure.
<name>myName</name>
Testing some
data here
<location>myLocation</location>
Can anyone help me find the error, I am new to using SOAP?