Jump to content

Recommended Posts

Posted

I'm accessing a sample weather web service at http://live.capescience.com/wsdl/GlobalWeather.wsdl via SOAP_WSDL. There are two bindings within that service (if this is the correct terminology): "StationInfo" and "GlobalWeather". After creating creating the proxy object, I only have access to the StationInfo methods. The StationInfo binding is defined first in the WSDL, so I don't think this is a coincidence. In other words, the following code:

 

>require_once 'SOAP/Client.php';
$wsdl = new SOAP_WSDL('http://live.capescience.com/wsdl/GlobalWeather.wsdl');
$weather = $wsdl->getProxy();

 

yields an object ($weather) with only the StationInfo methods. I tried:

 

>$weather = $wsdl->getProxy('GlobalWeather');

 

but that fails deep within the bowels of SOAP_WSDL.

 

Does anyone know how to access the "other" binding? I must be missing something.

 

Thanks for any help. A reference to an online resource with plenty of examples that explain the above would be greatly appreciated.

 

Dorsey

  • 10 months later...
Posted

Either no one knows the answer or no one else is interested, but I've found the solution. Invoking the setPort( string ) method will access any port defined by the WSDL.

Posted

Thanks for the update, Dorsey.

 

I'm sorry we missed your post the first time but I'm glad to see you found your way. Thumbs Up

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...