Soap API won't let me use function

时间:2016-03-04 18:17:30

标签: php soap wsdl

I have made a successful connection to a wsdl file and I'm getting back all of the available functions.

    $soapURL ='http:/wsdlfile';

    $soapClient = new SoapClient($soapURL);

    $response = $soapClient->__getFunctions();

    print_r($response);

But when I try to use an individual function:

   $response2 = $soapClient->getOrders();

I don't get anything back.

UPDATE: This is the response I am receiving:

Array ( [0] => getOrdersResponse getOrders(getOrders $parameters) [1] =>       getConractualOrderDetailsResponse getConractualOrderDetails(getConractualOrderDetails $parameters) [2] => getSubscriptionsByAccNumberResponse getSubscriptionsByAccNumber(getSubscriptionsByAccNumber $parameters) [3] => getContractsResponse getContracts(getContracts $parameters) [4] => isContentPresentResponse isContentPresent(isContentPresent $parameters) [5] => getOrderResponse getOrder(getOrder $parameters) 

But when I try to use one of those functions I get this error:

Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /var/www/html/bill/onebill.php:21 Stack trace: #0 [internal function]: SoapClient->__doRequest('__call('getOrders', Array) #2 /var/www/html/bill/onebill.php(21): SoapClient->getOrders() #3 {main} thrown in /var/www/html/bill/onebill.php on line 21

I don't understand I got a response initially, here is the documentation of the API that I'm trying to connect to:

http://onebillapi.helpdocsonline.com/how-to-access-the-onebill-apis

Thank you

0 个答案:

没有答案