Skip to end of metadata
Go to start of metadata

The following blog entry has an example of how to write a PHP client for a web service exposed using XFire:

http://arsenalist.com/2007/01/19/php-client-for-web-services/

To consume XFire services from PHP requires the document/literal style of SOAP.

The PHP below assumes this entry in your services.xml:


Incidentally, enabling MTOM does not appear to work yet with PHP.

From PHP you'll need to specify this for your SOAP client


document/literal style requires that the argument be a document, with you make by an associative array.  The response is also a document, in this case with one field, "out".


XFire does not support RPC/Encoding and PHP does not support wrapped document/literal, but they both do support RPC/Literal.

To use that, make this change to your services.xml:


and this to your PHP constructor:


Then you can make calls like this:


Labels: