[dba-Tech] Creating WebServices using PHP (preferred) or PERL

Shamil Salakhetdinov shamil-users at mns.ru
Mon Jan 12 13:48:38 CST 2004


Marty,

I tested the script again with the latest version of NuSOAP - the
problem is with my ISP - they have blocked getSocket() function call
:(...

Shamil

P.S.

Constructor error
wsdl error: HTTP ERROR: Couldn't open socket connection to server:
http://www.xmethods.net/sd/2001/BNQuoteService.wsdl, Error (92):
Protocol not available
Error
operation getPrice not present.
Request

Response

Debug
soapclient: instantiating wsdl class with doc:
http://www.xmethods.net/sd/2001/BNQuoteService.wsdl
soapclient: wsdl debug:
wsdl: initial wsdl file:
http://www.xmethods.net/sd/2001/BNQuoteService.wsdl
wsdl: getting URL http://www.xmethods.net/sd/2001/BNQuoteService.wsdl
wsdl: transport debug data...
soap_transport_http: scheme = http
soap_transport_http: host = www.xmethods.net
soap_transport_http: path = /sd/2001/BNQuoteService.wsdl
soap_transport_http: entered send() with data of length: 0
soap_transport_http: calling fsockopen with host www.xmethods.net
soap_transport_http: Couldn't open socket connection to server
http://www.xmethods.net/sd/2001/BNQuoteService.wsdl, Error (92):
Protocol not available

wsdl: HTTP ERROR: Couldn't open socket connection to server:
http://www.xmethods.net/sd/2001/BNQuoteService.wsdl, Error (92):
Protocol not available

soapclient: got wsdl error: HTTP ERROR: Couldn't open socket connection
to server: http://www.xmethods.net/sd/2001/BNQuoteService.wsdl, Error
(92): Protocol not available
soapclient: call: getPrice, Array, , , ,
soapclient: endpointType: wsdl
soapclient: No data for operation: getPrice
soapclient: operation 'getPrice' not present.
soapclient: wsdl debug:

----- Original Message ----- 
From: "Shamil Salakhetdinov" <shamil-users at mns.ru>
To: "Discussion of Hardware and Software issues"
<dba-tech at databaseadvisors.com>
Sent: Monday, January 12, 2004 9:04 PM
Subject: Re: [dba-Tech] Creating WebServices using PHP (preferred) or
PERL


> <<<
> The PHP would probably  look something like this
> >>>
> Marty,
>
> Did you try this .php script?
> I tried to use it but I didn't get it to work correctly.
> Then I made a slightly corrected version of your sample .php script:
>
> http://www.smsconsulting.spb.ru/phptest/soap/test.php?isbn=0060188782
>
> <?php
> // include nuSoap.php
> require_once('./nu/nusoap.php');
> // get parameter
> $isbn = $HTTP_GET_VARS['isbn'];
> // make parameters array for Web Service call
> $parameters = array('isbn'=>$isbn);
> // test echoing of the parameters array
> echo "<b>Parameters:</b><br/>";
> while(list($key, $value) = each($parameters))
> { echo "$key = $value<br/>";}
> // create soapclient object
> $soapclient = new soapclient(
>    'http://www.xmethods.net/sd/2001/BNQuoteService.wsdl', 'wsdl');
> // call getPrice Web Service
> $result = $soapclient->call('getPrice',$parameters);
> // echo Web Service call results
> echo "<br/><b>Result:</b><br/>";
> print "price=$result<br/>";
> ?>
>
> It didn't work either :(
>
> And teh following VB.Net code with a Web Reference set to
> http://www.xmethods.net/sd/2001/BNQuoteService.wsdl
>
> Dim wsrv As New net.xmethods.www.BNQuoteService()
> Me.txtPrice.Text = wsrv.getPrice("0060188782")
>
> works OK and returns:
> 13.75
>
> Do you think the problem is with NuSOAP.php or with the corrected .php
> script?
>
> TIA for any additional tips and tricks,
> Shamil
>
> ----- Original Message ----- 
> From: "MartyConnelly" <martyconnelly at shaw.ca>
> To: "Discussion of Hardware and Software issues"

<<< skipped for brevity >>>



More information about the dba-Tech mailing list