tags:

views:

57

answers:

2

Hi all,

I need to use an WSDL, and call some functions. I need my request will have this format:

username password

I can not get any data back from server, the server can not recognize my transfer parameters.

Thanks for your support.

+1  A: 

Do you know the requests are being made appropriately? Do you have NuSOAP or some other library installed to enable the request? What does your source code look like? You really need to provide a lot more information before any help can be provided.

Thomas
A: 

If you want to call the web service, which is described be your WSDL, try something like this:

class myWebServiceParameter {
 public $username = "me";
 public $password = "secret";
}

try{
 $client = new SoapClient("http://example.org/myWebService.wsdl",
  array('location' =>"http://example.org/myWebServiceEndpoint"));
 $parameter1 = new myWebServiceParameter();
 $result = $client->myWebServiceFunction($parameter1);
} catch (Exception $e) {
 // handle errors
}

myWebServiceParameter must be any class with a member variable foreach WSDL message attribute of the same name. And myWebServiceFunction is the name of the web service method.

Christian Strempfer
Sorry for posting lacking information, but i added one item more for my question, could you see it on: http://stackoverflow.com/questions/1723160/call-wsdl-by-php. Many thanks.
Thie Le