So when sending over a soap call to a windows server using service.svc. The connection goes over fine but when I use the method to send the raw XML i recieve an error that the document info is missing. I am using the SoapClientAuth class from http://tcsoftware.net.
Here is the simplified PHP code:
$xml = '<?xml version="1.0" encoding="utf-8"?>
<RepairOrderFolderAddRq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<RqUID xmlns="http://www.cieca.com/BMS">82e582ab-6b2d-48ad-bf0b-2e698f86bb77</RqUID>
<PartnerKey xmlns="http://www.cieca.com/BMS">Detail</PartnerKey>
<SvcProviderName xmlns="http://www.cieca.com/BMS">CynCast</SvcProviderName>
<DocumentInfo xmlns="http://www.cieca.com/BMS">
<BMSVer>4.0.0</BMSVer>
<DocumentType>RO</DocumentType>
<DocumentVer>
<DocumentVerCode>EM</DocumentVerCode>
<DocumentVerNum>0</DocumentVerNum>
</DocumentVer>
<DocumentVer>
<DocumentVerCode>VN</DocumentVerCode>
<DocumentVerNum>7</DocumentVerNum>
</DocumentVer>
<DocumentStatus>Z</DocumentStatus>
<CreateDateTime>2014-12-16T10:39:05.4667193-08:00</CreateDateTime>
</DocumentInfo>
</RepairOrderFolderAddRq>';
$xml = new SimpleXMLElement($xml);
ini_set('soap.wsdl_cache_enabled',0);
ini_set('soap.wsdl_cache_ttl',0);
set_time_limit(0);
$username_cyncast = '****';
$password_cyncast = '****';
$soapClient = new SoapClientAuth('http://www.domain.com/XMLSrevice/service1.svc?wsdl',array('login' => $username_cyncast,'password' => $password_cyncast));
print_r($soapClient->PDRBMSXmlAdd($xml));
The error response is:
stdClass Object ( [PDRBMSXmlAddResult] => stdClass Object ( [ApplicationStatus] => stdClass Object ( [ApplicationStatusCode] => Reject [ApplicationError] => stdClass Object ( [ErrorCode] => 103 [Severity] => Error [ErrorDesc] => DocumentInfoMissing ) ) ) )
When working with the SOAP developers they say the response is coming through but only the first line of the raw xml is coming through. Here is what the SOAP server is receiving:
<?xml version="1.0" encoding="utf-8"?> < RepairOrderFolderAddRq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cieca.com/BMS" /> Does anyone have any suggestions on what I can do to fix this issue?
No comments:
Post a Comment