Answer the question
In order to leave comments, you need to log in
Why is no value passed to the __soapCall() parameter?
The following error occurs:
Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'documentType' property
PHP code:
$location = 'https://...';
$client = new SoapClient($location);
$RequestParameters = new SoapParam(array("EdiParameter" =>
array(
"name" => "LastWebID",
"value" => "0",
)), "EdiParameter");
$RequestIdentify = new SoapParam(array(
"npo" => $npo,
"userName" => $userName,
"password" => $password), "identify");
$Status_Order = "NEW_ORDER";
$params = array("identify" => $RequestIdentify,
"documentType" => $Status_Order,
"parameters" => $RequestParameters);
$response = $client->__soapCall('DRS', $params);
var_dump($response);
...
<s:element name="DRS">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="identify" type="tns:Identify"/>
<s:element minOccurs="1" maxOccurs="1" name="documentType" type="tns:EdiType"/>
<s:element minOccurs="0" maxOccurs="1" name="parameters" type="tns:ArrayOfEdiParameter"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Identify">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Npo" type="tns:Npo"/>
<s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
</s:sequence>
</s:complexType>
<s:simpleType name="Npo">
<s:restriction base="s:string">
<s:enumeration value="LCNP"/>
</s:restriction>
</s:simpleType>
<s:simpleType name="EdiType">
<s:restriction base="s:string">
<s:enumeration value="NEW_ORDER"/>
<s:enumeration value="ORDER_REPLY"/>
</s:restriction>
</s:simpleType>
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question