tags:

views:

33

answers:

0

Hello,

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 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'    =>    '[email protected]',
                   '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);
       }