Re: [SOAP] soapClient not creating XML request correctly
[email protected] (Bilig Ordos) Thu, 9 Aug 2012 13:58:46 -0700 (PDT)
| Newsgroups | php.soap |
|---|---|
| Message-ID | <[email protected]> |
Bob,=0A=0AThank you very much for the help. That made a huge difference and= now I see the "orderPlanFilter" part as well:=0A=0A<SOAP-ENV:Body>=0A<ns2:= getConfig>=0A<ns1:credential>=0A<ns1:user>user</ns1:user>=0A<ns1:password>p= ass</ns1:password>=0A<ns1:group>group</ns1:group>=0A</ns1:credential>=0A<or= derPlanFilter>=0A<deviceName>abc</deviceName>=0A</orderPlanFilter>=0A</ns2:= getConfig>=0A</SOAP-ENV:Body>=0A=0AI feel that it is almost there, but=A0it= is=A0still not getting the data because the "orderPlanFilter" doesn't have= the "ns2:" prefix. =0A=0AHow can I make the client to send the request out= =A0as the following=A0=A0which works fine when I test via soapUI:=0A=0A<SOA= P-ENV:Body>=0A<ns2:getConfig>=0A<ns1:credential>=0A<ns1:user>user</ns1:user= >=0A<ns1:password>pass</ns1:password>=0A<ns1:group>group</ns1:group>=0A</ns= 1:credential>=0A<ns2:orderPlanFilter>=0A<deviceName>abc</deviceName>=0A</ns= 2:orderPlanFilter>=0A</ns2:getConfig>=0A</SOAP-ENV:Body>=0A=0AThanks again,= =0A=0ABilig=0A=0A=0A________________________________=0AFrom: Robert William= s <[email protected]>=0ATo: "[email protected]" <[email protected]> = =0ASent: Thursday, August 9, 2012 12:39 PM=0ASubject: Re: [SOAP] soapClient= not creating XML request correctly=0A=0AOn 8/8/12 14:10, "Bilig Ordos" <bi= [email protected]> wrote:=0A=0A>$results =3D=0A>$x->getOrderPlanConfig(ar= ray('credential'=3D>array('user'=3D>'user',=0A>'password'=3D>'pass', 'group= '=3D>'group')=0A>, array('orderPlanFilter'=3D>array('deviceName'=3D>'abc'))= ));=0A=0AIt's hard to know exactly what the service wants without seeing th= e actual=0AWSDL, but this looks a little suspicious to me. If you reformat = this for=0Areadability:=0A=0A$results =3D $x->getOrderPlanConfig(=0A=A0=A0= =A0array(=0A=A0 =A0 =A0 'credential'=3D>array(=0A=A0 =A0 =A0 =A0=A0=A0'user= '=3D>'user',=0A=A0 =A0 =A0 =A0=A0=A0'password'=3D>'pass',=0A=A0 =A0 =A0 =A0= =A0=A0'group'=3D>'group'=0A=A0 =A0 =A0 ),=0A=A0 =A0 =A0 array( /*no name?*/= =0A=A0 =A0 =A0 =A0=A0=A0'orderPlanFilter'=3D>array('deviceName'=3D>'abc')= =0A=A0 =A0 =A0 )=0A=A0=A0=A0)=0A);=0A=0A=0AYou can see that the plan filter= parameter is not named, whereas the=0Acredential one is. Try this:=0A=0A$c= redential =3D array(=0A=A0=A0=A0'user'=A0 =A0=A0=A0=3D> 'user',=0A=A0=A0=A0= 'password' =3D> 'pass',=0A=A0=A0=A0'group'=A0 =A0 =3D> 'group',=0A); //$cre= dential=0A=0A$orderPlanFilterType =3D array(=0A=A0=A0=A0'deviceName'=A0=A0= =A0=3D> 'abc',=0A=0A=A0=A0=A0/* following items unused in this case - assum= ing them to be optional=0A=A0=A0=A0'group'=A0 =A0 =A0 =A0 =3D> 'group abc',= =0A=A0=A0=A0'planName'=A0 =A0=A0=A0=3D> 'planName abc',=0A=A0=A0=A0'created= '=A0 =A0 =A0 =3D> array('dateOperator' =3D> 'op', 'value' =3D> 'date=0Avalu= e'),=0A=A0=A0=A0'lastModified' =3D> array('dateOperator' =3D> 'op', 'value'= =3D> 'date=0Avalue'),=0A=A0=A0=A0*/=0A); //$orderPlanFilterType=0A=0A$geto= rderPlanConfigParams =3D array(=0A=A0=A0=A0'credential'=A0 =A0 =A0 =3D> $cr= edential,=0A=A0=A0=A0'orderPlanFilter' =3D> $orderPlanFilterType,=0A); //$g= etorderPlanConfigParams=0A=0A$x->getorderPlanConfig($getorderPlanConfigPara= ms);=0A=0AIf that doesn't work, try pulling the top-level parameters out of= the=0Aarray:=0A=0A=0A$x->getorderPlanConfig('credential' =3D> $credential,= 'orderPlanFilter' =3D>=0A$orderPlanFilterType);=0A=0A=0AHopefully that hel= ps at least a little; web services can certainly be a=0Apain!=0A=0A=0ARegar= ds,=0ABob=0A--=0ARobert E. Williams, Jr.=0AAssociate Vice President of Soft= ware Development=0ANewtek Businesss Services, Inc. -- The Small Business Au= thority=0Ahttps://www.newtekreferrals.com/rewjr=0Ahttp://www.thesba.com/=0A= =0A=0A=0A=0A=0A=0A=0ANotice: This communication, including attachments, may= contain information that is confidential. It constitutes non-public inform= ation intended to be conveyed only to the designated recipient(s). If the r= eader or recipient of this communication is not the intended recipient, an = employee or agent of the intended recipient who is responsible for deliveri= ng it to the intended recipient, or if you believe that you have received t= his communication in error, please notify the sender immediately by return = e-mail and promptly delete this e-mail, including attachments without readi= ng or saving them in any manner. The unauthorized use, dissemination, distr= ibution, or reproduction of this e-mail, including attachments, is prohibit= ed and may be unlawful. If you have received this email in error, please no= tify us immediately by e-mail or telephone and delete the e-mail and the at= tachments (if any).=0A=0A--=0APHP Soap Mailing List (http://www.php.net/)= =0ATo unsubscribe, visit: http://www.php.net/unsub.php=A0=A0=A0=A0=A0=A0=A0= =A0=A0