I am new to this forum and a relative newbie to the details of SOAP. I have been using NUSOAP for a few private projects now for some time without any major problems.
I am now trying to understand the technical details of a Dutch national standard for government information exchange "STUF 3.01". It prescribes a lot. The first thing I encounter is that it forbids the use of the rpc binding style, which is the default for NUSOAP.
My question is simple: can I just specify the binding style to be "document" (and "encoded" to be "literal") without changing anything else in my call to NUSOAP ?
If you are writing a client for a service that provides WSDL, use the WSDL from your client, such as
$client = new nusoap_client('wsdl-url', true);
If you are writing a service that must be document/literal, the best way is to write the WSDL first, then pull that into your server, such as
$server = new nusoap_server('/path-to/wsdl-file');
If you are writing a client for a service that does not provide WSDL, specify 'document' and 'literal' for the $style and $use parameters of the call() method on nusoap_client.
The thing is: I do not have a valid WSDL to pull in, only a description of what it should contain, but it is not a clean syntax description. The WSDL of NUSOAP is thus what I want to use. I compare the result with what the specification prescribes.
Besides that: the standard requires a lot of messages for different entities. I have a few scripts which generate the server and client for each of these entity types and use NUSOAP to generate each WSDL.
In the mean time I managed to change the server and client to use "document / literal" by using the complex types for input and output parameters.
I have converted my server an client to exchange the messages with
parameters in register to be style "document" and use "literal". This
seems OK, except my WSDL (generated by NUSOAP) shows soap:binding
style="rpc" although soap:operation shows style="document" and
How can I force the binding style to "document" ??
You are generating WSDL using NuSOAP in your service. You specify the binding style in the call to configureWSDL:
* Sets up wsdl object.
* Acts as a flag to enable internal WSDL generation
* @param string $serviceName, name of the service
* @param mixed $namespace optional 'tns' service namespace or false
* @param mixed $endpoint optional URL of service endpoint or false
* @param string $style optional (rpc|document) WSDL style (also specified by operation)
* @param string $transport optional SOAP transport
* @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false
function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false)
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.