cancel
Showing results for 
Search instead for 
Did you mean: 

Error when Consuming .NET webservice in SAP

former_member184739
Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member197445
Contributor
0 Kudos

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.

former_member184739
Contributor
0 Kudos

Hi case ahr

I get the above error because the wsdl namespace is relative URI. I think you ve suggested me absolute URI . Do SAP consumer only absolute URI? Please advise in choosing the correct URI

Thanks

former_member197445
Contributor
0 Kudos

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

former_member184739
Contributor
0 Kudos

Hello case

Can you tell me what is an absolute namespace?should it start with http: ? Also please advise me how to extract namespace from wsdl file.

Please bare me for my simple question.

Thanks

former_member197445
Contributor
0 Kudos

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.

former_member184739
Contributor
0 Kudos

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

former_member197445
Contributor
0 Kudos

Try switching between WSDL types.  If you're using SOAP, try XML.  Or the other way around.

former_member184739
Contributor
0 Kudos

Hi case

Thanks for the response. I am novice in web service. Can you give brief description of how to switch between wsdl types . Is there any tool for converting soap wsdl to xml wsdl?

Pls advise

Thanks

Former Member
0 Kudos

Hello,

Did you find a solution to this issue? I am having the same issue and any help is greatly appriciataed.

former_member197445
Contributor
0 Kudos

Try to attach your wsdl so I can examine it, please.

former_member197445
Contributor
0 Kudos

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

Former Member
0 Kudos

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>

former_member197445
Contributor
0 Kudos

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?

Former Member
0 Kudos

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>

former_member197445
Contributor
0 Kudos

That WSDL looks good.  Are you still getting the error with mention of "q1" namespace when you use this wsdl to generate o proxy?  If so, at what point in the process do you receive the error?

Former Member
0 Kudos

Hello,

I get the error when I try to generate the report. And when I tried to generate the proxy I get a "No Vendor Specified" error. Looks like a moving target. I am not really farmilar with SAP to give more details.

Attached is the actual error message from SAP.

Thanks again.

Former Member
0 Kudos

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

Answers (0)