Hi all,

I've been searching for some hours on an issue I am having using SoapClient. When trying to connect to a the WSDL url it times out with the error

Warning: SoapClient::SoapClient(http://www.webservicex.com/CurrencyConvertor.asmx?wsdl) [soapclient.soapclient]: failed to open stream: HTTP request failed! in /home/developer/becton_kenso/webroot/classes/class.ContactFormIntegration.php on line 20

I can view the wsdl file fine from a web browser so I don't understand why it would timeout with SoapClient.

The method I'm using to open to connection is

$client = new SoapClient("http://www.webservicex.com/CurrencyConvertor.asmx?wsdl");

I am running Kubuntu 9.04 with PHP5.2.6

Can anyone shed any light on what the problem is here?

    download the latest nusoap.php

    this is the code i always use to connet such a service:

    $soapclient = new soapclient('https://sitename/pagename.asmx?wsdl','wsdl');

    if (!$err = $soapclient->getError())
    $soapProxy = $soapclient->getProxy() ;

    if ( (!$soapclient) OR ($err = $soapclient->getError()) ) {
    echo $error ;

    return('unsuccessfull');

    }

    else {

    $params = array( 
    
                'pin' => $pin ,  // this is our PIN NUMBER 
                'amount' => $price, 
                'orderId' => $orderId, 
                'callbackUrl' => $callbackUrl, 
                'authority' => $authority, 
                'status' => $status 
              ); 
    
    
    $sendParams = array($params) ; 
    $res = $soapclient->call('methodName', $sendParams);

    .....

    otherwise, write your code here, specially the line caused error. others will help more.

      Write a Reply...