logo       

NuSOAP Client help: msg#00081

php.nusoap.general

Subject: NuSOAP Client help

Hi,
 
I've created a client calling the function (checkOrder) connecting to the server using the NuSOAP Toolkit (v1.73).
 
I wrote the following PHP code, but the productID is missing in the request. Could someone help me with this? Thank you.. 
 
 
--------------------------- Request ---------------------------
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoaporg/soap/encoding/"  xmlns:SOAP-ENV="http://schemas.xmlsoaporg/soap/envelope/"  xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:SOAP-ENC="http://schemas.xmlsoaporg/soap/encoding/"  xmlns:si="http://soapinterop.org/xsd"  xmlns:impl="http://elgr.com/scm/warehouse"  xmlns:tns3="http://elgr.com/scm/warehouse/processing"><SOAP-ENV:Body>
<impl:checkOrder>
<checkOrderReq xsi:type="tns3:CheckOrderReqType">
<orderDetailReq xsi:type="tns3:OrderDetailReqType">
<productId xsi:type="tns3:ProductIdType"></productId>
<quantity xsi:type="xsd:int">125</quantity>
</orderDetailReq>
<orderDetailReq xsi:type="tns3:OrderDetailReqType">
<productId xsi:type="tns3:ProductIdType"></productId>
<quantity xsi:type="xsd:int">5</quantity>
</orderDetailReq>
</checkOrderReq>
</impl:checkOrder></SOAP-ENV:Body></SOAP-ENV:Envelope>
 
 
--------------------------- PHP Code ---------------------------
require_once('nusoap.php');
$client =new soapclient('http://localhost:8080/axis/services/Warehouse?wsdl', true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Create the proxy
$proxy = $client->getProxy();
 
$orderDetailReq = array();
$orderDetailReq[] = array(
'productId' => 10001,
'quantity' => 125,
);
$orderDetailReq[] = array(
'productId' => 10002,
'quantity' => 5,
);
$param = array(
'orderDetailReq' => $orderDetailReq,
);
 
$result = $proxy->checkOrder($param);
 
 
 
------------------------------------ Part of WSDL file ------------------------------------
<schema targetNamespace="http://elgr.com/scm/warehouse/processing" xmlns="http://www.w3.org/2001/XMLSchema">
  <import namespace="http://schemas.xmlsoaporg/soap/encoding/" />
- <simpleType name="OrStatusType">
- <restriction base="xsd:string">
  <enumeration value="Sufficient" />
  <enumeration value="Insufficient" />
  </restriction>
  </simpleType>
- <complexType name="ProductIdType">
- <simpleContent>
  <extension base="xsd:int" />
  </simpleContent>
  </complexType>
- <complexType name="OrderDetailReqType">
- <sequence>
  <element name="productId" nillable="true" type="tns3:ProductIdType" />
  <element name="quantity" type="xsd:int" />
  </sequence>
  </complexType>
- <complexType name="CheckOrderReqType">
- <sequence>
  <element maxOccurs="unbounded" name="orderDetailReq" nillable="true" type="tns3:OrderDetailReqType" />
  </sequence>
  </complexType>
- <complexType name="OrderDetailRespType">
- <sequence>
  <element name="productId" nillable="true" type="tns3:ProductIdType" />
  <element name="quantity" type="xsd:int" />
  <element name="status" nillable="true" type="tns3:OrStatusType" />
  </sequence>
  </complexType>
- <complexType name="CheckOrderRespType">
- <sequence>
  <element maxOccurs="unbounded" name="orderDetailResp" nillable="true" type="tns3:OrderDetailRespType" />
  </sequence>
  </complexType>
  </schema>
 
- <wsdl:message name="checkOrderRequest">
  <wsdl:part name="checkOrderReq" type="tns3:CheckOrderReqType" />
  </wsdl:message>
 
- <wsdl:portType name="Warehouse">
- <wsdl:operation name="checkOrder" parameterOrder="checkOrderReq">
  <wsdl:input message="impl:checkOrderRequest" name="checkOrderRequest" />
  <wsdl:output message="impl:checkOrderResponse" name="checkOrderResponse" />
  </wsdl:operation>
 
- <wsdl:binding name="WarehouseSoapBinding" type="impl:Warehouse">
  <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="checkOrder">
  <wsdlsoap:operation soapAction="" />
- <wsdl:input name="checkOrderRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoaporg/soap/encoding/" namespace="http://elgr.com/scm/warehouse" use="encoded" />
  </wsdl:input>
- <wsdl:output name="checkOrderResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoaporg/soap/encoding/" namespace="http://elgr.com/scm/warehouse" use="encoded" />
  </wsdl:output>
  </wsdl:operation>
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise