I’m trying to call a webservice that has complexTypes described as input and output params
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="getTermsForService">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="universalid" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getTermsForServiceResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getTermsForServiceResult" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
And
<wsdl:message name="getTermsForServiceSoapIn">
<wsdl:part name="parameters" element="tns:getTermsForService" >
</wsdl:message>
<wsdl:message name="getTermsForServiceSoapOut">
<wsdl:part name="parameters" element="tns:getTermsForServiceResponse" />
</wsdl:message>
<wsdl:portType name="Service1Soap">
<wsdl:operation name="getTermsForService">
<wsdl:input message="tns:getTermsForServiceSoapIn" />
<wsdl:output message="tns:getTermsForServiceSoapOut" />
</wsdl:operation>
</wsdl:portType>
I thought, calling it would be as eaysy as:
$client = new Zend_Soap_Client($this->config->webserviceWsdlFile);
try {
$result = $client->getTermsForService($_GET['universalid']);
} catch (Exception $e) {
// @TODO catch correctly
var_dump($e);
}
But it seems it isn’t. So what do I have to do to get a correct result with a string in the answer…
actually it was really easy
gave the correct result: