on 02-05-2013 11:24 AM
Hi Experts,
I am trying to consume an third party webservice in ABAP from SE80->Create Client proxy->Entered URL->Complete
But the following errror is raised:Incorrect value: Imported namespace may not be relative URI
Example Namespace:SAP.Test.DataServices.Create.
Is the above namespace is syntactically correct?Or it should be like SAP:Test:DataServices:Create?
Please advise.Your help is highly appreciated.Points will be awarded for helpful answers.
Thanks
Prabaharan
Most SAP namespaces look like this: urn:sap-com:document:sap:idoc:messages. But I would imagine since you are consuming an external .NET web service, it should be the namespace of the web service. For example, http://eviware.com/soapui/config or http://www.w3.org/1999/XSL/Transform.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's nothing wrong with CONSUMING a web service via relative URI, but the defined namespace must be absolute and preferably unique to the service provider.
Good tutorial here:
http://www.sapdev.co.uk/sap-webapps/sap-webservices/ws_abapproxy.htm
The WSDL should contain a targetNamespace element. It can really be anything, but yes, it will usually start with "http://"
In this sample wsdl, the namespace is http://namespaces.snowboard-info.com
Note: As in the sample above, the URL you use for your namespace does not need to exist as a web domain. In fact, it generally does not, in my experience.
Hello case Ahr,
Thanks for the reply.After changing the namespace to Absolute one it worked.Now if i create the proxy it says error like "Incorrect value: Namespace prefix q1 of QName q1:Exception is undeclared". But the same WSDL works in other SAP system but it is higher release(EHP 4)
Please advise.Your answers are valuable to me.
Thanks
Prabaharan
Also, did you set up the WSDL using a URL, similar to that show in this tutorial? http://www.sapdev.co.uk/sap-webapps/sap-webservices/ws_abapproxy.htm
Yourwebservice.asmx?WSDL
Here you go..
<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3...<wsp:Policy wsu:Id="WSHttpBinding_ISalesOrder_policy"><wsp:ExactlyOne><wsp:All><wsaw:UsingAddressing/></wsp:All></wsp:ExactlyOne></wsp:Policy><wsdl:types><xsd:schema targetNamespace="http://tempuri.org/Imports"><xsd:import namespace="http://tempuri.org/" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd0"/><xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd1"/><xsd:import namespace="http://schemas.datacontract.org/2004/07/Salesmetrix.Crm.DataServices.Objects" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd2"/><xsd:import namespace="http://schemas.datacontract.org/2004/07/System" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd3"/><xsd:import namespace="http://schemas.datacontract.org/2004/07/Salesmetrix.Crm.DataServices.Enums.SalesOrder" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd4"/></xsd:schema></wsdl:types><wsdl:message name="ISalesOrder_PushSalesOrderToSAP_InputMessage"><wsdl:part name="parameters" element="tns:PushSalesOrderToSAP"/></wsdl:message><wsdl:message name="ISalesOrder_PushSalesOrderToSAP_OutputMessage"><wsdl:part name="parameters" element="tns:PushSalesOrderToSAPResponse"/></wsdl:message><wsdl:message name="ISalesOrder_CreateSalesOrder_InputMessage"><wsdl:part name="parameters" element="tns:CreateSalesOrder"/></wsdl:message><wsdl:message name="ISalesOrder_CreateSalesOrder_OutputMessage"><wsdl:part name="parameters" element="tns:CreateSalesOrderResponse"/></wsdl:message><wsdl:message name="ISalesOrder_UpdateSalesOrder_InputMessage"><wsdl:part name="parameters" element="tns:UpdateSalesOrder"/></wsdl:message><wsdl:message name="ISalesOrder_UpdateSalesOrder_OutputMessage"><wsdl:part name="parameters" element="tns:UpdateSalesOrderResponse"/></wsdl:message><wsdl:message name="ISalesOrder_GetSalesOrder_InputMessage"><wsdl:part name="parameters" element="tns:GetSalesOrder"/></wsdl:message><wsdl:message name="ISalesOrder_GetSalesOrder_OutputMessage"><wsdl:part name="parameters" element="tns:GetSalesOrderResponse"/></wsdl:message><wsdl:portType name="ISalesOrder"><wsdl:operation name="PushSalesOrderToSAP"><wsdl:input message="tns:ISalesOrder_PushSalesOrderToSAP_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/PushSalesOrderToSAP"/><wsdl:output message="tns:ISalesOrder_PushSalesOrderToSAP_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/PushSalesOrderToSAPResponse"/></wsdl:operation><wsdl:operation name="CreateSalesOrder"><wsdl:input message="tns:ISalesOrder_CreateSalesOrder_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/CreateSalesOrder"/><wsdl:output message="tns:ISalesOrder_CreateSalesOrder_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/CreateSalesOrderResponse"/></wsdl:operation><wsdl:operation name="UpdateSalesOrder"><wsdl:input message="tns:ISalesOrder_UpdateSalesOrder_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/UpdateSalesOrder"/><wsdl:output message="tns:ISalesOrder_UpdateSalesOrder_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/UpdateSalesOrderResponse"/></wsdl:operation><wsdl:operation name="GetSalesOrder"><wsdl:input message="tns:ISalesOrder_GetSalesOrder_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/GetSalesOrder"/><wsdl:output message="tns:ISalesOrder_GetSalesOrder_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/GetSalesOrderResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="WSHttpBinding_ISalesOrder" type="tns:ISalesOrder"><wsp:PolicyReference URI="#WSHttpBinding_ISalesOrder_policy"/><soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="PushSalesOrderToSAP"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/PushSalesOrderToSAP"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="CreateSalesOrder"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/CreateSalesOrder"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="UpdateSalesOrder"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/UpdateSalesOrder"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetSalesOrder"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/GetSalesOrder"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="SalesOrder"><wsdl:port name="WSHttpBinding_ISalesOrder" binding="tns:WSHttpBinding_ISalesOrder"><soap12:address location="http://localhost:6868/Services/DataServices.SalesOrder.svc"/><wsa10:EndpointReference><wsa10:Address>http://localhost:6868/Services/DataServices.SalesOrder.svc</wsa10:Address></wsa10:EndpointReference></wsdl:port></wsdl:service></wsdl:definitions>
The WSDL you attached is badly formed. There is a closing tag </wsdl:service> with no opening tag.
Can you get the complete WSDL using
http://localhost:6868/Services/DataServices.SalesOrder.svc?WSDL?
Hello,
My client who is going to consume the web service is runing SAP so I am assuming they have followed the steps mentioned in the tutorial. Thanks for the link.
I looked at the wsdl xml and it has the closing tag "</wsdl:service>" in the xml. Please see below, i adjusted it so it does not wrap on the browser.
Thanks for your assistance.
<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/" name="SalesOrder"><wsp:Policy wsu:Id="WSHttpBinding_ISalesOrder_policy"><wsp:ExactlyOne><wsp:All><wsaw:UsingAddressing/></wsp:All></wsp:ExactlyOne></wsp:Policy><wsdl:types><xsd:schema targetNamespace="http://tempuri.org/Imports"><xsd:import namespace="http://tempuri.org/" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd0http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd0"/><xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd1http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd1"/><xsd:import namespace="http://schemas.datacontract.org/2004/07/Salesmetrix.Crm.DataServices.Objects" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd2http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd2"/><xsd:import namespace="http://schemas.datacontract.org/2004/07/System" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd3http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd3"/><xsd:import namespace="http://schemas.datacontract.org/2004/07/Salesmetrix.Crm.DataServices.Enums.SalesOrder" schemaLocation="http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd4http://localhost:6868/Services/DataServices.SalesOrder.svc?xsd=xsd4"/></xsd:schema></wsdl:types><wsdl:message name="ISalesOrder_PushSalesOrderToSAP_InputMessage"><wsdl:part name="parameters" element="tns:PushSalesOrderToSAP"/></wsdl:message><wsdl:message name="ISalesOrder_PushSalesOrderToSAP_OutputMessage"><wsdl:part name="parameters" element="tns:PushSalesOrderToSAPResponse"/></wsdl:message><wsdl:message name="ISalesOrder_CreateSalesOrder_InputMessage"><wsdl:part name="parameters" element="tns:CreateSalesOrder"/></wsdl:message><wsdl:message name="ISalesOrder_CreateSalesOrder_OutputMessage"><wsdl:part name="parameters" element="tns:CreateSalesOrderResponse"/></wsdl:message><wsdl:message name="ISalesOrder_UpdateSalesOrder_InputMessage"><wsdl:part name="parameters" element="tns:UpdateSalesOrder"/></wsdl:message><wsdl:message name="ISalesOrder_UpdateSalesOrder_OutputMessage"><wsdl:part name="parameters" element="tns:UpdateSalesOrderResponse"/></wsdl:message><wsdl:message name="ISalesOrder_GetSalesOrder_InputMessage"><wsdl:part name="parameters" element="tns:GetSalesOrder"/></wsdl:message><wsdl:message name="ISalesOrder_GetSalesOrder_OutputMessage"><wsdl:part name="parameters" element="tns:GetSalesOrderResponse"/></wsdl:message><wsdl:portType name="ISalesOrder"><wsdl:operation name="PushSalesOrderToSAP"><wsdl:input message="tns:ISalesOrder_PushSalesOrderToSAP_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/PushSalesOrderToSAPhttp://tempuri.org/ISalesOrder/PushSalesOrderToSAP"/><wsdl:output message="tns:ISalesOrder_PushSalesOrderToSAP_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/PushSalesOrderToSAPResponsehttp://tempuri.org/ISalesOrder/PushSalesOrderToSAPResponse"/></wsdl:operation><wsdl:operation name="CreateSalesOrder"><wsdl:input message="tns:ISalesOrder_CreateSalesOrder_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/CreateSalesOrderhttp://tempuri.org/ISalesOrder/CreateSalesOrder"/><wsdl:output message="tns:ISalesOrder_CreateSalesOrder_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/CreateSalesOrderResponsehttp://tempuri.org/ISalesOrder/CreateSalesOrderResponse"/></wsdl:operation><wsdl:operation name="UpdateSalesOrder"><wsdl:input message="tns:ISalesOrder_UpdateSalesOrder_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/UpdateSalesOrderhttp://tempuri.org/ISalesOrder/UpdateSalesOrder"/><wsdl:output message="tns:ISalesOrder_UpdateSalesOrder_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/UpdateSalesOrderResponsehttp://tempuri.org/ISalesOrder/UpdateSalesOrderResponse"/></wsdl:operation><wsdl:operation name="GetSalesOrder"><wsdl:input message="tns:ISalesOrder_GetSalesOrder_InputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/GetSalesOrderhttp://tempuri.org/ISalesOrder/GetSalesOrder"/><wsdl:output message="tns:ISalesOrder_GetSalesOrder_OutputMessage" wsaw:Action="http://tempuri.org/ISalesOrder/GetSalesOrderResponsehttp://tempuri.org/ISalesOrder/GetSalesOrderResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="WSHttpBinding_ISalesOrder" type="tns:ISalesOrder"><wsp:PolicyReference URI="#WSHttpBinding_ISalesOrder_policy"/><soap12:binding transport="http://schemas.xmlsoap.org/soap/httphttp://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="PushSalesOrderToSAP"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/PushSalesOrderToSAPhttp://tempuri.org/ISalesOrder/PushSalesOrderToSAP"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="CreateSalesOrder"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/CreateSalesOrderhttp://tempuri.org/ISalesOrder/CreateSalesOrder"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="UpdateSalesOrder"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/UpdateSalesOrderhttp://tempuri.org/ISalesOrder/UpdateSalesOrder"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetSalesOrder"><soap12:operation style="document" soapAction="http://tempuri.org/ISalesOrder/GetSalesOrderhttp://tempuri.org/ISalesOrder/GetSalesOrder"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="SalesOrder"><wsdl:port name="WSHttpBinding_ISalesOrder" binding="tns:WSHttpBinding_ISalesOrder"><soap12:address location="http://localhost:6868/Services/DataServices.SalesOrder.svchttp://localhost:6868/Services/DataServices.SalesOrder.svchttp://localhost:6868/Services/DataService..."/>
<wsa10:EndpointReference><wsa10:Address>http://localhost:6868/Services/DataServices.SalesOrder.svc</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port></wsdl:service></wsdl:definitions>
Hi Case, I am trying to consume one third party WSDL in SAP, I am getting URI namespace specific error. Could you please let me know what could be the possible reason for this?
I tested the WSDL using Eclipse tool and I found one exception :there is no input parameter missing in one of the methods. And they have not provided us the XSD file along with the WSDL.
Please help me out in this. Appreciate your help.
Best,
Souvik
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.