PDA

Click to See Complete Forum and Search --> : Creating a Web Reference to WSDL in PHP


SurgeProto
Jun 2nd, 2006, 09:06 PM
I have some code that I'm converting from VB into PHP that refers to the a class called Outbound. I was told Outbound is merely a reference to a WSDL (for example http://www.mydomain.com/mywsdl.wsdl). How can I create this reference in PHP so I can use this class?

Also, as a bonus, once I have access to it, how can I translate the following vb code into PHP:


Dim CallItemObject As New Outbound.CallItem
CallItemObject.siteNumber = SiteNumber

Dim WebServiceCall As New Outbound.OutboundCallService
placecallresponse = WebServiceCall.placeCall(placecallobject)


ANY help on this would be tremendously appreciated.

modpluz
Jun 2nd, 2006, 09:30 PM
welcome to the forums...

CornedBee
Jun 3rd, 2006, 05:57 PM
In theory, this should be possible with the PHP SOAP extension. (Requires PHP 5.)
http://www.php.net/manual/en/ref.soap.php

Something like this:
$remoteObject = new SoapClient('http://www.mydomain.com/mywsdl.wsdl');
$remoteObject->someMethod();

visualAd
Jun 4th, 2006, 03:56 AM
PEAR (http://pear.php.net/package/SOAP) also has a SOAP implementation. Niether actually create the supporting types. But if you wait a few days I'll post a link to my next article on PHP Builder that demonstrates how to automatically create the supporting types and extend them.