southbeach
Programmer
OK, writing a PHP routine to process HTML form via a web service and push back the response.
I am able to establish a connection, validate user credentials but, I cannot get the most important part to work, processing the form and getting a response back.
The WSDL server expects (sample as documented)
I am sending
I am getting the error that reads
Not sure why and cannot find an answer thus far and after a whole day, I figure I reach out to you all and see if one of you have had an identical experience and offer some guidance.
thank you all in advance for your help!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
I am able to establish a connection, validate user credentials but, I cannot get the most important part to work, processing the form and getting a response back.
The WSDL server expects (sample as documented)
Code:
<s:Envelope xmlns:s="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/">[/URL]
<s:Body>
<GetLTLRates xmlns="[URL unfurl="true"]http://tempuri.org/">[/URL]
<ltlRequest xmlns:a="[URL unfurl="true"]http://schemas.datacontract.org/2004/07/LogisticsAppSuite.RatingEngine.DataModels"[/URL] xmlns:i="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
<a:AccessorialCodes>
<!--Zero or more repetitions:-->
<a:string>IDC</a:string>
</a:AccessorialCodes>
<a:ClientCode>xxxxx</a:ClientCode>
<a:DestCity>CANTON</a:DestCity>
<a:DestCountry>US</a:DestCountry>
<a:DestState>CT</a:DestState>
<a:DestZip>06019</a:DestZip>
<a:IsBatch>false</a:IsBatch>
<a:Miles>0</a:Miles>
<a:OrigCity>BRISTOL</a:OrigCity>
<a:OrigCountry>US</a:OrigCountry>
<a:OrigState>CT</a:OrigState>
<a:OrigZip>06010</a:OrigZip>
<a:ProfileCode>xxxxx</a:ProfileCode>
<a:RequestId>5bd55929-94e4-4399-8986-2397f68a2583</a:RequestId>
<a:Route i:nil="true"/>
<a:SCAC i:nil="true"/>
<a:ServiceLevelCode i:nil="true"/>
<a:ShipmentDate>2014-07-08</a:ShipmentDate>
<a:Shipments>
<a:Shipment>
<a:Class>50</a:Class>
<a:HazMat>false</a:HazMat>
<a:Height i:nil="true"/>
<a:Length i:nil="true"/>
<a:NMFC i:nil="true"/>
<a:Pallets>1</a:Pallets>
<a:Pieces i:nil="true"/>
<a:Weight>1000</a:Weight>
<a:Width i:nil="true"/>
</a:Shipment>
</a:Shipments>
<a:SrvToken>BBBBBB</a:SrvToken>
<a:UsrToken>DDDDDD</a:UsrToken>
<a:ZoneCode i:nil="true"/>
</ltlRequest>
</GetLTLRates>
</s:Body>
</s:Envelope>
I am sending
Code:
Array
(
[ClientCode] => AAAA
[ProfileCode] => AAAA
[DestCity] => BEATRICE
[DestCountry] => USA
[DestState] => AL
[DestZip] => 36425
[isBatch] => false
[OrigCity] => MINEOLA
[OrigCountry] => USA
[OrigState] => NY
[OrigZip] => 11501
[RequestId] => 5671a8cea5519
[ShipmentDate] => 2015-12-18
[Shipments] => Array
(
[Shipment] => Array
(
[0] => Array
(
[Class] => 50
[HazMat] => false
[Height] => 40
[Length] => 40
[Pallets] => 1
[Pieces] => 40
[Weight] => 360
[Width] => 40
)
[1] => Array
(
[Class] => 50
[HazMat] => false
[Height] => 40
[Length] => 72
[Pallets] => 2
[Pieces] => 52
[Weight] => 420
[Width] => 40
)
)
)
[SrvToken] => BBBBBBBB
[UsrToken] => DDDDDDDD
)
I am getting the error that reads
Code:
Fatal error: Uncaught SoapFault exception: [a:InternalServiceFault] Object reference not set to an instance of an object.
Not sure why and cannot find an answer thus far and after a whole day, I figure I reach out to you all and see if one of you have had an identical experience and offer some guidance.
thank you all in advance for your help!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.