开发者

Error returning a valid object back from viewSubscription() from php soap request

开发者 https://www.devze.com 2023-01-04 00:54 出处:网络
I am trying to connect to Yudu\'s web service via soap/php. When I send this test, I am getting the following fault response and code:

I am trying to connect to Yudu's web service via soap/php. When I send this test, I am getting the following fault response and code:

ERROR: env:Server-java.lang.RuntimeException: com.yudu.webservice.InternalError

If I dont specify a subscriptionId I get the following fault:

Client-SOAP-ERROR: Encoding: object hasn't 'subscriptionId' property

So I think I am close but I have no idea what I may be missing or if I am accessing the right node. I am using the test开发者_Python百科 login in the api doc.

Any response would be greatly appriated! Below is my code. Thanks!

 $soapClient = new
SoapClient("http://login.yudu.com/webservice-static/ManageSubscriptions.wsdl");

       // Prepare SoapHeader parameters
       $sh_param = array(
                   'username'    =>    'webservicetest@yudu.com',
                   'password'    =>    'DigitalEditions');

       $headers = new SoapHeader('https://login.yudu.com/webservice/ManageSubscriptions',
'authenticationDetails', $sh_param);

       // Prepare Soap Client
       $soapClient->__setSoapHeaders(array($headers));

       // Setup the RemoteFunction parameters
       $ap_param = array(
                   'subscriptionId'     =>    33136);

       // Call RemoteFunction ()
       $error = 0;
       try {
           $info = $soapClient->__call("viewSubscription", array($ap_param));

       } catch (SoapFault $fault) {
           $error = 1;
           var_dump($info);
           print("ERROR: ".$fault->faultcode."-".$fault->faultstring);
       }


The authentication details are a child of the searchSubscription element rather than a header element

0

精彩评论

暂无评论...
验证码 换一张
取 消