Jump to content

soapclient - PHP


harshpandya

Recommended Posts

Hi guys, Here is my code to connect to the soap client $client = new SoapClient("test.wsdl", $this->soapCfg);$streamCatalog = $client->Query($this->streamQuery);Problem is - i am not able to find Query function anywhere in my code (not even in other include files) - but echo $streamCatalog; returns bunch of values from wsdl file or something....Any idea???? I thought it was just a library function for SoapClient but also can not find anything on google. Please help??Thanks,

Link to comment
Share on other sites

  • 2 weeks later...

When you use a WSDL file, the SoapClient object gets methods as defined in the WSDL file.So, you're not seeing any documentation on "Query" because that's not a SoapClient method. It's a method defined in "test.wsdl". Or to be more precise, it's defined on the SOAP server as pointed in the WSDL file.If you didn't got anything from the above, the whole procedure works like this:-Someone defines something that is executed on their server.-They create a WSDL file in which they describe to clients where their server URL is, what methods does their server have, what data types it accepts and what datatypes it returns.-Clients (like yourself) get the WSDL file.-The SOAP client sends a SOAP message which contains the name of the desired method to call, the input data and its type.-The SOAP server sends back another SOAP message which contains the resulting data and its data type.-The SOAP client can then do whatever it wants with the data.So...

echo $streamCatalog;

really returns the value as returned by the SOAP server.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...