BeSimple Soap Library - php

Does anyone have experience using the "BeSimple Soap Library"?
I'm looking for a php client to consume a ws-* soap service - and I have yet to find one. I am wondering if this will work for all ws-* features. There's very little by means of documentation.

It works with some of the WS-Security and WS-SecurityPolicy which is just tricky to do with the stock SoapClient class. Also it supports better determined namespacing, which is also problematic with some broken SOAP servers.
nuSoap and ZF2 SoapClient are ok, but BeSimple is more flexible in architectural PoV.

The usual SOAP client in PHP would be the SoapClient class. See documentation. It works reasonably well, but is also not documentat that well.
Another alternative would be NuSoap.

Related

Features of PHP SOAP

I am wondering the features that are fully supported within PHP Soap, I have tried researching this, but there is very little documentation to support PHP Soap.
Also how is Soap used during the exchange of data through client machine to web service then server.
I know this is fairly vague, but as I am constantly being asked this myself I thought it was better to find more about it.
PHP has some build in SOAP classes for both client and server. Docs is on here.
But you have to be sure that your PHP build is compilled with SOAP support.
"The features that are fully supported within PHP" are pretty much non-existent.
Built in SOAP client is ok only for basic services. It doesn't support any WS extensions, so you have to add support manually, e.g. including headers for WS-Security.
Also, there are some problems with namespace handling and creating requests.
If you'll be using it and are having trouble with missing parameters or badly formatted requests, you'll probably want to modify requests - this can be done by extending SoapClient class and overriding doRequest function.

wsdl 2.0 support in PHP

If I want to create a web service or consume a web service that is defined as WSDL 2.0, what options do I have in PHP?
As I understand it the in-built SOAP libs in 5.x don't currently support WSDL 2.0 spec, and I can't see future support for this.
One of my former colleagues used to devour SOAP services manually, simply because he disliked the current .net implementation.
The SOAP implementation is based around you posting XML across the web to the service, and you "just" need to build a such XML and parse the results coming back. It is not as simple as it sounds, but it definitely is possible.
The WSDL2PHP project seems very interesting, and im very sure this can lead you in the right direction.

Alternative SOAP implementation besides those offered by Microsoft

The most useful thing I like about SOAP vs REST is the WSDL. It makes my life much easier when creating applications for the iPhone as my classes can be generated for me without me doing much monkey work.
However, I'm trying to find a suitable alternative to ASMX/WCF. I predominantly use a Mac so Java, PHP or Mono solutions are mainly of interest to me.
I understand PHP has a SOAP service offering but it can't automatically generate a WSDL? Are there any tools which can facilitate this?
There are many java based soap stacks. I would look at Apache CXF (http://cxf.apache.org/). See also its WSDL generation at http://cxf.apache.org/docs/soap-12.html.
The latest versions have pretty good support for WSDL.
http://php.net/manual/en/book.soap.php
Here's a quick guide for it:
http://www.phpbuilder.com/columns/adam_delves20060606.php3

Why use NuSOAP rather than PHP SOAP? Any benefits?

As far as I have scourged the web, I can see an abundance of articles on how to setup NuSOAP and use it to setup a SOAP server and client in PHP.
However, none of them seem to point to any advantages of using it than PHP's own native SOAP library. What are the pros/cons between:
NuSOAP
PHP
SOAP
PEAR::SOAP
Zend SOAP
NuSOAP generates WSDL.
PHP's SoapServer does not.
That is why I decided to use NuSOAP.
For client, I use native client, it has better error reporting.
PHP's SoapClient class requires PHP5 or above. Nusoap and Pear Soap run on PHP4. That's the main difference. At last check NuSoap wasn't officially compatible with PHP5. I had to find a port someone put on google code in order to run it under php5.
That's pretty much it. Although I have run into random weird WSDL parsing issues when using PHP's SoapClient as opposed to NuSoap. Most notably netenberg.com's licensing API. But basically if you are running PHP5, you'll probably just want to use PHP's SoapClient and save yourself the hassle of using an external library

What is the best solution for creating a SOAP Server in PHP?

I need some advice on which library is the best choice when it comes to creating SOAP servers (and eventually SOAP clients) in PHP.
I know there is built-in functions for this, but is that really the best way to go about it?
Also, if you could attach some arguments as to why a certain library/method is the better, i'd be much delighted.
The only requirement i currently have (apart from the obvious client/server part) is that it can generate WSDL.
Does the WSDL version really matter at all? 1.1 or 2.0 what's the real difference/benefit of using 2.0?
I would recommend looking at the Zend_Soap class of Zend Framework.
Its fairly complete and robust and has been available in the framework long enough to have most if not all of its rough spots smoothed out. Plus its part of a framework that is being actively maintained so it will continue to support new standards and any bugs that are found will be fixed.
I use PHP's built-in SoapServer class to serve requests because it's implemented in C so it's faster than any other class implemented in PHP (Zend, nusoap).
The limitation here is that SoapServer can't generate WSDL (as of May'11) so i am using Zend SOAP Autodiscovery to generate it.
I use nuSoap: http://sourceforge.net/projects/nusoap/

Categories