Reputation: 772
I've coded a WS SOAP server using NuSOAP library, and it's working pretty fine, but as the client should be a SAP implementation, there are some issues when trying to reach it from SAP.
My WSDL is automatically generated by nusoap contains following definitions
<definitions targetNamespace="https://example.com/ws/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="https://example.com/ws/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema elementFormDefault="qualified" targetNamespace="https://example.com/ws/">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
This WSDL is validated by soap-ui 5.5 and it works fine with php clients, but not with SAP.
At first time I must switch from rpc/encoding
style to document/literal
and I can achieve it changing some configurations values in nusoap server class.
Anyway there is a remaining issue according to SAP diagnostics and it is fired by <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
.
The error in SAP is
Incorrect value: Unknown namespace http://schemas.xmlsoap.org/soap/encoding/
I've tested that URL and is correct.
Also I'm trying to strip out that line from soap server class without success, because I found it and commented at line 1106 in class.soap_server.php
:
$this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true);
But it doesn't have any effect in generated WSDL.
Any idea will be really appreciated. Thank you in advance.
Upvotes: 1
Views: 910
Reputation: 10621
I must switch from rpc/encoding style to document/literal
SAP doesn't support RPC-style in Web-services, hence the error.
Here the SAP note which explains how to adapt it
https://launchpad.support.sap.com/#/notes/856597 / Offline version
I attach samples which explaining WSDL format which are contained in the note in case you do not have S-login to access the note.
Upvotes: 0