0
请帮助我。我有一个复杂的类型如WSDL这样的:如何从复杂类型的wsdl使用php获得响应
<WL5G3N0:definitions name="commandModificationiSiska">
<xsd:complexType name="Input">
<xsd:sequence>
<xsd:element minOccurs="0" name="dn" nillable="true" type="xsd:string"/>
<xsd:element name="ptOffer" nillable="true" type="tns:ptOffer"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ptOffer">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="array" nillable="true" type="tns:array"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="array">
<xsd:sequence>
<xsd:element name="itemTyp" nillable="true" type="xsd:string"/>
<xsd:element name="itemCode" nillable="true" type="xsd:string"/>
<xsd:element name="itemRefPack" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
其实我已经在尝试发现跟随this link一个解决方案。在那个链接是类似于我的问题,但仍然无法正常工作。
,这是我的PHP脚本我写
error_reporting(E_ALL);
ini_set('display_errors', 1);
$param = new StdClass();
$param->array = new StdClass();
$param->input = new StdClass();
$param->input->dn = "XX2042XXXX";
$param->array->itemTyp = "2";
$param->array->itemcode = "AUTOCON2";
$param->array->itemRefPack = "";
$wsdl_file = "test.wsdl";
$client = new SoapClient($wsdl_file,array("trace"=> 1,"exceptions" => 0,"cache_wsdl" => 0));
print_r($client->commandModificationiSiska($param));
echo "<br/>================<br/>";
echo "<p>Request :".htmlspecialchars($client->__getLastRequest()) ."</p>";
echo "<p>Response:".htmlspecialchars($client->__getLastResponse())."</p>";
也许某个地方已经解决了这个问题,并可以帮助我在这里..解决
感谢@Anju Vineesh编辑我的问题。你能回答吗? – firman 2014-10-29 04:47:59