Re: [SOAP] soapClient not creating XML request correctly

[email protected] (Robert Williams) Thu, 9 Aug 2012 09:39:07 -0700
Newsgroups php.soap
Message-ID <CC4932CB.8FF04%[email protected]>
On 8/8/12 14:10, "Bilig Ordos" <[email protected]> wrote:

>$results =3D
>$x->getOrderPlanConfig(array('credential'=3D>array('user'=3D>'user',
>'password'=3D>'pass', 'group'=3D>'group')
>, array('orderPlanFilter'=3D>array('deviceName'=3D>'abc'))));

It's hard to know exactly what the service wants without seeing the actual
WSDL, but this looks a little suspicious to me. If you reformat this for
readability:

$results =3D $x->getOrderPlanConfig(
   array(
      'credential'=3D>array(
         'user'=3D>'user',
         'password'=3D>'pass',
         'group'=3D>'group'
      ),
      array( /*no name?*/
         'orderPlanFilter'=3D>array('deviceName'=3D>'abc')
      )
   )
);


You can see that the plan filter parameter is not named, whereas the
credential one is. Try this:

$credential =3D array(
   'user'     =3D> 'user',
   'password' =3D> 'pass',
   'group'    =3D> 'group',
); //$credential

$orderPlanFilterType =3D array(
   'deviceName'   =3D> 'abc',

   /* following items unused in this case - assuming them to be optional
   'group'        =3D> 'group abc',
   'planName'     =3D> 'planName abc',
   'created'      =3D> array('dateOperator' =3D> 'op', 'value' =3D> 'date
value'),
   'lastModified' =3D> array('dateOperator' =3D> 'op', 'value' =3D> 'date
value'),
   */
); //$orderPlanFilterType

$getorderPlanConfigParams =3D array(
   'credential'      =3D> $credential,
   'orderPlanFilter' =3D> $orderPlanFilterType,
); //$getorderPlanConfigParams

$x->getorderPlanConfig($getorderPlanConfigParams);

If that doesn't work, try pulling the top-level parameters out of the
array:


$x->getorderPlanConfig('credential' =3D> $credential, 'orderPlanFilter' =3D=
>
$orderPlanFilterType);


Hopefully that helps at least a little; web services can certainly be a
pain!


Regards,
Bob
--
Robert E. Williams, Jr.
Associate Vice President of Software Development
Newtek Businesss Services, Inc. -- The Small Business Authority
https://www.newtekreferrals.com/rewjr
http://www.thesba.com/







Notice: This communication, including attachments, may contain information =
that is confidential. It constitutes non-public information intended to be =
conveyed only to the designated recipient(s). If the reader or recipient of=
 this communication is not the intended recipient, an employee or agent of =
the intended recipient who is responsible for delivering it to the intended=
 recipient, or if you believe that you have received this communication in =
error, please notify the sender immediately by return e-mail and promptly d=
elete this e-mail, including attachments without reading or saving them in =
any manner. The unauthorized use, dissemination, distribution, or reproduct=
ion of this e-mail, including attachments, is prohibited and may be unlawfu=
l. If you have received this email in error, please notify us immediately b=
y e-mail or telephone and delete the e-mail and the attachments (if any).