Avatar of gplana
gplana
Flag for Spain

asked on 

How to call a web-service method from PHP, which has an out parameter

Hi.

I'm having a problem while trying to consume this web-service (WSDL contents here):

<wsdl:definitions targetNamespace="http://tempurl.org"><wsdl:types><s:schema elementFormDefault="qualified" targetNamespace="http://tempurl.org"><s:element name="obtenir_apunts"><s:complexType><s:sequence><s:element minOccurs="1" maxOccurs="1" name="pl_nhc" type="s:int"/><s:element minOccurs="0" maxOccurs="1" name="ps_tipus_cc" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="papunts" type="tns:ArrayOfTapunt"/></s:sequence></s:complexType></s:element><s:complexType name="ArrayOfTapunt"><s:sequence><s:element minOccurs="0" maxOccurs="unbounded" name="tapunt" nillable="true" type="tns:tapunt"/></s:sequence></s:complexType><s:complexType name="tapunt"><s:sequence><s:element minOccurs="0" maxOccurs="1" name="centre" type="s:string"/><s:element minOccurs="1" maxOccurs="1" name="nhc" type="s:int"/><s:element minOccurs="1" maxOccurs="1" name="ingres" type="s:int"/><s:element minOccurs="1" maxOccurs="1" name="data" type="s:dateTime"/><s:element minOccurs="1" maxOccurs="1" name="hora" type="s:dateTime"/><s:element minOccurs="0" maxOccurs="1" name="tipus_cc" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="professional" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="cclinic" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="orientdx" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="restringir" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="diagnostic" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="dxtancat" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="nom_professional" type="s:string"/></s:sequence></s:complexType><s:element name="obtenir_apuntsResponse"><s:complexType><s:sequence><s:element minOccurs="0" maxOccurs="1" name="obtenir_apuntsResult" type="s:string"/><s:element minOccurs="0" maxOccurs="1" name="papunts" type="tns:ArrayOfTapunt"/></s:sequence></s:complexType></s:element></s:schema></wsdl:types><wsdl:message name="obtenir_apuntsSoapIn"><wsdl:part name="parameters" element="tns:obtenir_apunts"/></wsdl:message><wsdl:message name="obtenir_apuntsSoapOut"><wsdl:part name="parameters" element="tns:obtenir_apuntsResponse"/></wsdl:message><wsdl:portType name="n_ws_cc_aegerusSoap"><wsdl:operation name="obtenir_apunts"><wsdl:input message="tns:obtenir_apuntsSoapIn"/><wsdl:output message="tns:obtenir_apuntsSoapOut"/></wsdl:operation></wsdl:portType><wsdl:binding name="n_ws_cc_aegerusSoap" type="tns:n_ws_cc_aegerusSoap"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="obtenir_apunts"><soap:operation soapAction="http://tempurl.org/obtenir_apunts" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="n_ws_cc_aegerusSoap12" type="tns:n_ws_cc_aegerusSoap"><soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="obtenir_apunts"><soap12:operation soapAction="http://tempurl.org/obtenir_apunts" style="document"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="n_ws_cc_aegerus"><wsdl:port name="n_ws_cc_aegerusSoap" binding="tns:n_ws_cc_aegerusSoap"><soap:address location="http://vm-webappsrv/ws_cc_aegerus/n_ws_cc_aegerus.asmx"/></wsdl:port><wsdl:port name="n_ws_cc_aegerusSoap12" binding="tns:n_ws_cc_aegerusSoap12"><soap12:address location="http://vm-webappsrv/ws_cc_aegerus/n_ws_cc_aegerus.asmx"/></wsdl:port></wsdl:service></wsdl:definitions>

Open in new window


As you can see, method obtenir_apunts has 3 parameters, the third of which is an out parameter where webservices returns some rows of data as an array.

How can I make the call from php properly?

Thank you.
PHPWeb Services

Avatar of undefined
Last Comment
gplana

8/22/2022 - Mon