webservice output clarifications

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rskandarpa
Forum Newbie
Posts: 2
Joined: Tue Jan 05, 2010 9:00 am

webservice output clarifications

Post by rskandarpa »

Code: Select all

<?php
 
  //include the NuSOAP class file:
  require 'lib/nusoap.php';
 
  //instantiate the NuSOAP class and define the web service URL:
  $client = new nusoap_client('http://www.webservicex.net/globalweather.asmx?WSDL', 'WSDL');
 
  //check if there were any instantiation errors, and if so stop execution with an error message:
  $error = $client->getError();
 
  if ($error)
  {
    die("client construction error: {$error}\n");
  }
 
  //perform a function call without parameters:
  $answer = $client->call('http://www.webservicex.net/globalweather.asmx?op=GetWeather(Hyderabad,India)');
 
  //check if there were any call errors, and if so stop execution with some error messages:
  $error = $client->getError();
 
  if ($error)
  {
    print_r($client->response);
    print_r($client->getDebug());
    die();
  }
 
  //output the response (in the form of a multidimensional array) from the function call:
  print_r($answer);
 
?>
the above is the code written for consuming weather web service. the below is the output for the same... i am unable to resolve the problem. please help...

Code: Select all

2010-01-08 21:57:31.009332
nusoap_client: ctor wsdl=WSDL timeout=20 response_timeout=100 endpoint=string(50) "http://www.webservicex.net/globalweather.asmx?WSDL"
2010-01-08 21:57:31.009418
nusoap_client: will use lazy evaluation of wsdl from http://www.webservicex.net/globalweather.asmx?WSDL 2010-01-08 21:57:31.009470
nusoap_client: call: operation=http://www.webservicex.net/globalweather.asmx?op=GetWeather(Hyderabad,India), namespace=http://tempuri.org, soapAction=, rpcParams=, style=rpc, use=encoded, endpointType=wsdl params=array(0) { }
headers=bool(false)
2010-01-08 21:57:31.009530
nusoap_client: instantiating wsdl class with doc: http://www.webservicex.net/globalweather.asmx?WSDL 2010-01-08 21:57:31.009689
wsdl: ctor wsdl= timeout=20 response_timeout=100 2010-01-08 21:57:31.009742
wsdl: parse and process WSDL path= 2010-01-08 21:57:31.009789
wsdl: setCredentials username= authtype= certRequest= array(0) { }
2010-01-08 21:57:31.009837
wsdl: parse and process WSDL path=http://www.webservicex.net/globalweather.asmx?WSDL 2010-01-08 21:57:31.009873
wsdl:
 
parse WSDL at path=http://www.webservicex.net/globalweather.asmx?WSDL 2010-01-08 21:57:31.009910
wsdl:
 
getting WSDL http(s) URL http://www.webservicex.net/globalweather.asmx?WSDL 2010-01-08 21:57:31.010014
soap_transport_http:
 
ctor url=http://www.webservicex.net/globalweather.asmx?WSDL use_curl= curl_options: array(0) { }
2010-01-08 21:57:31.010072
soap_transport_http:
 
parsed URL scheme = http 2010-01-08 21:57:31.010108
soap_transport_http:
 
parsed URL host = http://www.webservicex.net 2010-01-08 21:57:31.010147
soap_transport_http:
 
parsed URL path = /globalweather.asmx 2010-01-08 21:57:31.010176
soap_transport_http:
 
parsed URL query = WSDL 2010-01-08 21:57:31.010213
soap_transport_http:
 
set header Host: http://www.webservicex.net 2010-01-08 21:57:31.010285
soap_transport_http:
 
set header User-Agent: NuSOAP/0.7.3 (1.114) 2010-01-08 21:57:31.010322
soap_transport_http:
 
set header Accept-Encoding: gzip, deflate 2010-01-08 21:57:31.010353
soap_transport_http:
 
set header Connection: close 2010-01-08 21:57:31.010406
soap_transport_http: entered send() with data of length: 0 2010-01-08 21:57:31.010449
soap_transport_http:
 
 
connect connection_timeout 20, response_timeout 100, scheme http, host http://www.webservicex.net, port 80 2010-01-08 21:57:31.010493
soap_transport_http: Unknown scheme http
2010-01-08 21:57:31.010541
wsdl:
2010-01-08 21:57:31.010595
nusoap_client: checkWSDL 2010-01-08 21:57:31.010634
nusoap_client: getOperations returned false
 
please help me resolve this problem...
Last edited by rskandarpa on Fri Jan 08, 2010 11:25 am, edited 1 time in total.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Re: webservice output clarifications

Post by Charles256 »

Post Reply