We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When specifying document/literal return types an error is generated:
<SOAP-ENV:Fault> <faultcode xsi:type="xsd:string">SOAP-ENV:Server</faultcode> <faultstring xsi:type="xsd:string">unable to serialize result</faultstring> <faultactor xsi:type="xsd:string"/> <detail xsi:type="xsd:string"/> </SOAP-ENV:Fault>
Example:
require_once("nusoap-0.9.17/src/nusoap.php"); $server = new nusoap_server(); // Create a instance for nusoap server $server->configureWSDL("Soap Demo","urn:soapdemo"); // Configure WSDL file $namespace = "test"; $server->register( "get_price", // name of function array("name"=>"xsd:string"), // inputs array("return"=>"xsd:integer"), // outputs false, false, 'document', // <==== 'literal', // <===== 'Test Docs' ); $server->service(file_get_contents("php://input")); function get_price($name) { $products = [ "book"=>20, "pen"=>10, "pencil"=>5 ]; foreach($products as $product=>$price) { if($product==$name) { return $price; break; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When specifying document/literal return types an error is generated:
Example:
The text was updated successfully, but these errors were encountered: