May be there is few blog similar this but I can't solve the problem. I convert xml to string and try to pass it as a parameter. Then I got error. I try to slove it using cdata but it not solved my problem. At last I try to use SoapVar and getting following error
MY CODE:
$survey = $domtree->saveXML();
$soapVar = new SoapVar($survey,XSD_ANYXML);
$params = array(>
"ManagerID" => 0,
"Reg_SalesCenterID" => $id,
"surveys" => $soapVar,
"SalesCenterList" => $SalesCenter);
try {
$response = $soapClient->__soapCall('AddNewContact', array($params));
}catch (SoapFault $fault) {
echo 'Request : <br/><xmp>',
$soapClient->__getLastRequest(),
'</xmp><br/><br/> Error Message : <br/>',
$fault->getMessage();
}
ERROR
The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'AddNewContactBestRent'. No characters can appear before the XML declaration. Line 2, position 1385.
Tiada ulasan:
Catat Ulasan