- Why haven't you finished the classes?
I am actively developing SOAPx4... for NuSphere.
- Where is the documentation?
Will be released with the NuSphere version.
- How do I deploy a web service with SOAPx4?
Here's a simple "hello world" example. First create file "hello.php."
Put your SOAPx4 classes in the same directory, or in your include directory, or enter
the path to them in the require_once() calls. Then paste the code below into the file. That's it!
require_once('class.soap_client.php');
require_once('class.soap_server.php');
$server = new soap_server;
$server->service($HTTP_RAW_POST_DATA);
function hello ($name){
return "Hello $name.";
}
NOTE: for complex or custom types, you must call the add_to_map() method to get your return types
properly serialized. See the server.php file in the distribution for examples of this.
Accessing the service via a SOAPx4 client:
require_once('class.soap_client.php');
$soapclient = new soapclient("http://yourdomain.com/hello.php");
echo $soapclient->call("hello",array("name"=>"dietrich"));
- How do I turn on debugging?
Client:
Set the debug_flag property to true, eg: $soapclient->debug_flag=true
Access the debug information via the debug_data property, eg: echo $soapclient->debug_data
Server:
Same as above. If debugging is on, the server will encode it into it's response, as a comment
at the end of the message.
- How do I access the wire dumps?
In the soapclient class, the dumps are available via the "request" and "response" properties.
For the server, the request is available via the "request" property. I don't currently have it grabbing the
response, will be in next release, if there is one.
|