|
More on passing array of complex type: msg#00077php.nusoap.general
I'm also having a problem with arrays of objects. Saw the previous thread, but it didn't solve my case. I've set up an axis soap server, and can pass the array from java just fine. But from php nusoap, my data doesn't seem to make it into the soap request. Here's what I'm doing: $card = new Card("mastercard", "xxxxxxxxxxxx55554444", 2, 2005); $card2 = new Card("mastercard", "xxxxxxxxxxxxxx54444", 2, 2005); $cards = array($card, $card2); $soapclient = new soapclient(CC_AUTH_SOAP_SERVER_WSDL, "wsdl"); $soap_proxy = $soapclient->getProxy(); $result = $soap_proxy->cardArrayTest($cards); But when I examine the request body, the data isn't there: <SOAP-ENV:Body><nu:cardArrayTest> <cards xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns1:Card[2]"> <item xsi:type="tns1:Card"></item> <item xsi:type="tns1:Card"></item> </cards></nu:cardArrayTest></SOAP-ENV:Body> Any thoughts would be much appreciated! Here's my wsdl (auto-generated by axis): <wsdl:definitions targetNamespace="http://my.domain.edu:8080/axis/services/CastellPaymentS ervices"> <wsdl:types> <schema targetNamespace="urn:edu.castell.lib"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="Card"> <sequence> <element name="cardNumber" nillable="true" type="xsd:string"/> <element name="cardType" nillable="true" type="xsd:string"/> <element name="expirationMonth" type="xsd:int"/> <element name="expirationYear" type="xsd:int"/> <element name="wellformed" type="xsd:boolean"/> </sequence> </complexType> </schema> <schema targetNamespace="http://my.domain.edu:8080/axis/services/CastellPaymentS ervices"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="ArrayOf_tns1_Card"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Card[]"/> </restriction> </complexContent> </complexType> </schema> </wsdl:types> <wsdl:message name="cardArrayTestResponse"> <wsdl:part name="cardArrayTestReturn" type="xsd:string"/> </wsdl:message> <wsdl:message name="cardArrayTestRequest"> <wsdl:part name="cards" type="impl:ArrayOf_tns1_Card"/> </wsdl:message> <wsdl:portType name="Epay"> <wsdl:operation name="cardArrayTest" parameterOrder="cards"> <wsdl:input message="impl:cardArrayTestRequest" name="cardArrayTestRequest"/> <wsdl:output message="impl:cardArrayTestResponse" name="cardArrayTestResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="CastellPaymentServicesSoapBinding" type="impl:Epay"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="cardArrayTest"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="cardArrayTestRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://epay.countway.hms.harvard.edu" use="encoded"/> </wsdl:input> <wsdl:output name="cardArrayTestResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://my.domain.edu:8080/axis/services/CastellPaymentService s" use="encoded"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="EpayService"> <wsdl:port binding="impl:CastellPaymentServicesSoapBinding" name="CastellPaymentServices"> <wsdlsoap:address location="http://my.domain.edu:8080/axis/services/CastellPaymentServices "/> </wsdl:port> </wsdl:service> </wsdl:definitions> ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg297 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: HTTP_RAW_POST_DATA Strangeness: 00077, John Steele |
|---|---|
| Next by Date: | problem with digest auth: 00077, Michael Hamann |
| Previous by Thread: | HTTP_RAW_POST_DATA Strangenessi: 00077, Subs |
| Next by Thread: | Re: More on passing array of complex type: 00077, Scott Nichol |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |