Re: HELP !!!!! PHP SOAP Not building objects correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 16, 2008 at 1:04 PM, Tim Traver <tt-list@xxxxxxxxxxxxx> wrote:

> Hi all,
>
> sorry for the cross post to the general PHP list as well as the SOAP PHP
> list, but I'm a little bit desperate...
>
> Ok, for some reason when I am sending the proper objects to the __soapCall
> method, it is not including those objects in the XML call itself...
>
> I am using PHP 5.2.6 now after using 5.2.5 and thinking this may be fixed
> in an upgrade, but it is not...
>
> ok, here is a dump of the object I am sending the __soapCall method as an
> argument :
>
> [struct] => CreateCustomerPaymentProfile Object
> (
>           [merchantAuthentication] => MerchantAuthenticationType Object
>               (
>                   [name] => xxxxxxxxx
>                   [transactionKey] => xxxxxxxxxx
>               )
>           [customerProfileId] => 181854
>           [paymentProfile] => CustomerPaymentProfileType Object
>               (
>                   [payment] => PaymentSimpleType Object
>                       (
>                           [creditCard] => CreditCardType Object
>                               (
>                                   [cardNumber] => XXXXXXXXXXXXXXXX
>                                   [expirationDate] => XXXX-XX
>                               )
>                       )
>                   [customerType] => individual
>                   [billTo] => CustomerAddressType Object
>                       (
>                           [firstName] => Tim
>                           [lastName] => Traver
>                       )
>               )
>           [validationMode] => none
>       )
>
> And here is the call that is generated :
> [__last_request] => <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="
> https://api.authorize.net/soap/v1/";>
> <SOAP-ENV:Body>
>  <ns1:CreateCustomerPaymentProfile>
>       <ns1:merchantAuthentication>
>           <ns1:name>xxxxxxxxxxxx</ns1:name>
>           <ns1:transactionKey>xxxxxxxxxxxxxxxx</ns1:transactionKey>
>       </ns1:merchantAuthentication>
>       <ns1:customerProfileId>181854</ns1:customerProfileId>
>       <ns1:paymentProfile>
>           <ns1:customerType>individual</ns1:customerType>
>           <ns1:billTo>
>               <ns1:firstName>Tim</ns1:firstName>
>               <ns1:lastName>Traver</ns1:lastName>
>           </ns1:billTo>
>           <ns1:payment/>
>       </ns1:paymentProfile>
>   <ns1:validationMode>none</ns1:validationMode>
> </ns1:CreateCustomerPaymentProfile>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> As you can see, all of the object variables are created correctly, except
> that the "payment" object is not. It is simply represented by <ns1:payment/>
> and has no start, and no variables that were sent in the object.
>
> This is very strange, and I can't figure out where to look to try and solve
> this problem, but it is a very big problem.
>
> I have tried to changed the order of the objects, what the actual values of
> the objects are, but I'm now banging my head as to why the soap construction
> is not including these values...
>
> Any help would be greatly appreciated,
>
> Tim.


first thing that comes to mind, the SoapClient::__call() method is
deprecated.  have you tried using the SoapClient instance directly?  for
example, if you are in WSDL mode and the wsdl defines a method doStuff(),
you can use a SoapClient instance $sc as $sc->doStuff().  i would try that
and see what happens.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux