cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Consuming WSDL in ABAP

Former Member
0 Kudos

Dear Gurus,

Hop you all are well. I am trying to consume an external WSDL in ABAP (SE80- Service Consumer), but i am getting an error.

" Incorrect value: Unknown namespace http://schemas.xmlsoap.org/soap/encoding/ "

When i try the WSDL in XML spy and in SOAP UI, it works fine. Can somebody tell me what could be the problem.

Here is the screen shot of error.

I google this error and some says it is the problem in WSDL structure. But WSDL works fine in SOAP UI and XML Spy. Here is the WSDL

<?xml version="1.0" encoding="ISO-8859-1"?>

<definitions 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="http://10.10.10.10/soap/WSDLTST" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://-.-.-.-/soap/WSDLTST">

  <types>

  <xsd:schema targetNamespace="http://10.10.10.10/soap/WSDLTST">

  <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

  <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>

  <xsd:complexType name="Product">

  <xsd:all>

  <xsd:element name="index" type="xsd:int"/>

  <xsd:element name="size" type="xsd:string"/>

  </xsd:all>

  </xsd:complexType>

  <xsd:complexType name="ProductArray">

  <xsd:complexContent>

  <xsd:restriction base="SOAP-ENC:Array">

  <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Product[]"/>

  </xsd:restriction>

  </xsd:complexContent>

  </xsd:complexType>

  </xsd:schema>

  </types>

  <message name="Method1Request">

  <part name="Datum" type="xsd:string"/>

  <part name="Datum1" type="xsd:string"/>

  </message>

  <message name="Method1Response">

  <part name="return" type="tns:ProductArray"/>

  </message>

  <portType name="WSDLTSTPortType">

  <operation name="Method1">

  <documentation>bla bla bla</documentation>

  <input message="tns:Method1Request"/>

  <output message="tns:Method1Response"/>

  </operation>

  </portType>

  <binding name="WSDLTSTBinding" type="tns:WSDLTSTPortType">

  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

  <operation name="Method1">

  <soap:operation soapAction="http://10.10.10.10/abcd/SOAP-SERVER/lib/one.php/Method1" style="rpc"/>

  <input>

  <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.10.10.10/abcd/SOAP-SERVER/lib/one.php"/>

  </input>

  <output>

  <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.10.10.10/abcd/SOAP-SERVER/lib/one.php"/>

  </output>

  </operation>

  </binding>

  <service name="WSDLTST">

  <port name="WSDLTSTPort" binding="tns:WSDLTSTBinding">

  <soap:address location="http://10.10.10.10/abcd/SOAP-SERVER/lib/one.php"/>

  </port>

  </service>

</definitions>

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Imran,


Currently I have the same error.

How do you have solved?

I checked OSS note 1327511 but in my system is not implementable.

Thanks.

Former Member
0 Kudos

Dear Lilibeht,

make sure that you are not using "soap:binding style="rpc"" in your wsdl. Do not use RPC binding style. instead go for document/literal binding style. Follow WS-i WSDK standard.

Former Member
0 Kudos

Hi Imran,

  I do not think this is a complete WSDL. In soapUI, after uploading the WSDL, it only shows the interface and not the operations(methods in SAP). SAP is giving the generation error because of the incomplete WSDL.

Thanks,

Anna

Former Member
0 Kudos

Hi Annapurna,

But this WSDL works fine in SOAP UI and XMLSPY. Ok tell me one thing,. ON  one thread i have read that SAP only accepts WS-i WSDL. On one thread, it is mentioned that SAP also does not accept "soap:binding style="rpc"" in WSDL. Do you have any idea about these? Thanks

Former Member
0 Kudos

I see that your WSDL is RPC.

Please check this link for more information on RPC  https://help.sap.com/saphelp_nwesrce/helpdata/en/43/ce993b45cb0a85e10000000a1553f6/frameset.htm

It does say that though SAP expects a document style, it can convert RPC to a document style with the restriction on usage of Array types.

I see Array is being used in the Method1 response. Changing it should work.

Thanks,

Anna

Former Member
0 Kudos

Dear Annapuma,

I tried another dummy WSDL with document/literal binding but i am still getting the same error in SAP. Again this WSDL works fine in SOAP UI and XMLSPY. Kindly have a look on this WSDL please. I think this is complete WSDl as well.

<?xml version="1.0" encoding="ISO-8859-1"?>

<definitions 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="urn:servicename" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:servicename">

  <types>

  <xsd:schema elementFormDefault="qualified" targetNamespace="urn:servicename">

  <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

  <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>

  <xsd:complexType name="DoSomethingRequestType">

  <xsd:all>

  <xsd:element name="Name" type="xsd:string" form="unqualified"/>

  <xsd:element name="Age" type="xsd:int" form="unqualified"/>

  </xsd:all>

  </xsd:complexType>

  <xsd:complexType name="DoSomethingResponseType">

  <xsd:all>

  <xsd:element name="Pass" type="xsd:boolean" form="unqualified"/>

  </xsd:all>

  </xsd:complexType>

  <xsd:element name="DoSomething" type="tns:DoSomethingRequestType"/>

  <xsd:element name="DoSomethingResponse" type="tns:DoSomethingResponseType"/>

  </xsd:schema>

  </types>

  <message name="DoSomethingRequest">

  <part name="parameters" element="tns:DoSomething"/>

  </message>

  <message name="DoSomethingResponse">

  <part name="parameters" element="tns:DoSomethingResponse"/>

  </message>

  <portType name="servicenamePortType">

  <operation name="DoSomething">

  <documentation>N/A</documentation>

  <input message="tns:DoSomethingRequest"/>

  <output message="tns:DoSomethingResponse"/>

  </operation>

  </portType>

  <binding name="servicenameBinding" type="tns:servicenamePortType">

  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

  <operation name="DoSomething">

  <soap:operation soapAction="http://10.101.0.10/abcd/SOAP-SERVER/lib/two.php#DoSomething" style="document"/>

  <input>

  <soap:body use="literal" namespace="urn:servicename"/>

  </input>

  <output>

  <soap:body use="literal" namespace="urn:servicename"/>

  </output>

  </operation>

  </binding>

  <service name="servicename">

  <port name="servicenamePort" binding="tns:servicenameBinding">

  <soap:address location="http://10.101.0.10/abcd/SOAP-SERVER/lib/two.php"/>

  </port>

  </service>

</definitions>

Former Member
0 Kudos

As suggested in another thread, please check OSS note 1327511