Re: How to Send SOAP Request and Receive Soap Response Using PHP Programming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 February 2011 08:01, valluriravi <valluriravi9@gmail.com> wrote:
>
> Hi All,
>
> Â Â Â Â Â I am new to webservices(soap). So please explain with an example
> for how to send ÂSOAP Request and Receive Soap Response Using PHP
> Programming. ÂSo it is a quick project. If i get this information i can move
> further.
>
> Regards
> Ravi

PHP 5 includes native support for creating a SOAP Client [1] and a
SOAP Server [2].

I use an opensource tool called wsdl2php [3] which converts a WSDL
file into a set of PHP classes. I then have a simple mechanism to
prove the service is operational. My wsdl2php is slightly modified and
bugfixed, following the patches supplied by RazorsEdgeUK on the
sourceforge site.

I can then use those classes to talk to the web service without any
need to create or process XML or handle any of the SOAP protocols.

All that is required from the client perspective is the ability to
find the function to be called (a method in a class), find its
parameter(s) (which will be class types most likely), instantiate and
populate those complex types (recursively maybe), obey any rules
regarding security (SOAP Headers [4] maybe).


I've never used nuSoap, but I believe it is only really for PHP4 (as
PHP5 has the functionality in the php_soap extension). Of course, if
you are on a shared hosting service and the ISP has not supplied
php_soap, then alternatives like nuSoap are an option.


With regard to PHP5 though, here are some links ([5], [6]) to scripts
I've previously created for this list showing the results of using
wsdl2php. The conversation relating to these scripts are available at
[7] - [13].


If you need specific instructions on a particular web service, then
let us know. I can quickly and easily create the PHP classes for a Web
Service and a simple demo to prove it working.

Regards,

Richard Quadling.

[1] http://docs.php.net/manual/en/class.soapclient.php
[2] http://docs.php.net/manual/en/class.soapserver.php
[3] http://www.urdalen.no/wsdl2php/ and
http://sourceforge.net/projects/wsdl2php/
[4] http://docs.php.net/manual/en/class.soapheader.php
[5] http://pastebin.com/VfgrhzKy (WAPI Web Service PHP Classes created
using wsdl2php)
[6] http://pastebin.com/f8CBcLHc (WAPI Web Service PHP Classes Usage)

[7] http://news.php.net/php.soap/3245

The following links are 1 conversation which refers to the link above.
[8] http://news.php.net/php.soap/3248
[9] http://news.php.net/php.soap/3249
[10] http://news.php.net/php.soap/3250
[11] http://news.php.net/php.soap/3251
[12] http://news.php.net/php.soap/3252
[13] http://news.php.net/php.soap/3253
-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux