cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming a SAP NetWeaver WebService in .Net !!

Former Member
0 Kudos

Hello All,

I have a sample webservice I built using Java in SAP NW.

at the bottom there is the WSDL that describe it at

http://localhost:5080/KLFService/Config1?wsdl&style=document

When I try to add the previous link as a 'web reference' in Visual Studio .net, I get an error (no Ports defined).

It Seems that .Net has a problem in the 'import' statement.

How do I get over that ? I don't seem to find any other posts or documents describing how to do this ?

Shall I manually massage the document and include the imported binding myself ?.

WSDL DOCUMENT

-


<?xml version="1.0" encoding="utf-8" ?>

- <!-- Generated by WSDLDefinitionsParser

-->

- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="KLFServiceWsd" targetNamespace="urn:KLFServiceWsd" xmlns:bns0="urn:KLFServiceWsd/Config1/document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<wsdl:import location="http://localhost:5080/KLFService/Config1/bindings?wsdl&style=document" namespace="urn:KLFServiceWsd/Config1/document" />

- <wsdl:service name="KLFService">

- <wsdl:port name="Config1Port_Document" binding="bns0:Config1Binding">

<soap:address location="http://localhost:5080/KLFService/Config1?style=document" />

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

Included in the IMPORT

-


<?xml version="1.0" encoding="utf-8" ?>

- <!-- Generated by WSDLDefinitionsParser

-->

- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:KLFServiceWsd/Config1/document" xmlns:prt0="urn:KLFServiceWsd/KLFServiceVi/document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<wsdl:import location="/KLFService/Config1/porttypes?wsdl&style=document" namespace="urn:KLFServiceWsd/KLFServiceVi/document" />

- <wsdl:binding name="Config1Binding" type="prt0:KLFServiceVi_Document">

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

- <wsdl:operation name="HelloWorld">

<soap:operation soapAction="" />

- <wsdl:input>

<soap:body use="literal" parts="parameters" />

</wsdl:input>

- <wsdl:output>

<soap:body use="literal" />

</wsdl:output>

</wsdl:operation>

- <wsdl:operation name="getVacationDays">

<soap:operation soapAction="" />

- <wsdl:input>

<soap:body use="literal" parts="parameters" />

</wsdl:input>

- <wsdl:output>

<soap:body use="literal" />

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

</wsdl:definitions>

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi all,

Did anyone try this before, I'm not sure why this message became 'in-active' :(.

Best Regards

Ahmed K.

Former Member
0 Kudos

Ahmed,

Did you found a solution for your problem and if so. what was the problem.

Former Member
0 Kudos

It's been a month since the last post on this thread. Surely someone in the world knows how to call an SAP NetWeaver webservice from .NET land..

Anyone????

Former Member
0 Kudos

I got this to work this morning.

When you try and set-up the SAP wsdl in .NET it complains about not seeing any port's or complex types. This is because SAP has moved these out into seperate files. .NET doesn't try to link these files at this time. If you simply click on "Add as reference" in Visual Studio at the time of importing the WSDL your problems disappear like magic..

Hope this helps someone..

Jarrod