cancel
Showing results for 
Search instead for 
Did you mean: 

web service proxy issue

Former Member
0 Kudos

Hi

experts,

Here the issue, i just want to push the data in to sap, thorugh micro soft .net , As i have aready created web service for sales orders, next what are all the things required to establish connectivity between the two systems.

suggest.

thanks

Edited by: muzammil12 on Aug 3, 2009 9:25 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

ok, if you already have a SAP webservice for administrating the sales order, then it is relatively simple to connect from .NET.

I assume the SAP webservice uses basic authentication;

Steps:

1) generate the .wsdl from your SAP webservices;

a) you can do this in the browser via the test webservice page, log on with a valid user account, and on the overview page click on the wsdl hyperlink. This redirects the browser to the wsdl overview page. Example; http://ams-dis-1.topforce.local:51080/sap/bc/srt/rfc/sap/ZWSWSN_FUNCMOD?sap-client=200&wsdl=1.1

b) or, you can also generate the WSDL from within SAP NetWeaver Development studio; start transaction /wsadmin, navigate to your SAP webservice, and from the 'Web service' menu click 'wsdl'.

2) generate a .NET WCF proxy

a) most simple is by doing it in the VS 2005/2008 IDE. You can then either directly connect to the url/endpoint of your SAP webservice, or use an hardcopy of the wsdl (step 1)

b) you can also explicitly generate a proxy via commandline tool svcutil

3) use the WCF proxy in your .NET client code. Few things to be aware of here are:

i) you need to pass in valid credentials when invoking the SAP webservice; in case of basic authentication, a username and password

ii) check the BAPI result value afterwards if you want to be able to pass functional errors to the caller.

You might also check out the SAP / Microsoft whitepaper [Utilizing State Oriented Communication for Web Services Based on Business APIs (BAPI) with Microsoft Visual Studio 2005|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/004975cc-2a7f-2a10-f8a8-82b90ff07396&overridelayout=true] ; it contains text and screen examples from both SAP NetWeaver as Visual Studio environments for both how to create a SAP webservice, and how to consume it from .NET.

Best regards, William.

Former Member
0 Kudos

Hi williams.

when i try to create proxy for generated WSDL IT IS AKSING FOR DEVLEOPER KEY, CAN I CREATE PROXY WITHOUT DEVLOPER KEY.

SUGGEST

THANKS

REGARDS

Former Member
0 Kudos

Hi,

please outline a bit further; 'what' is asking for a development key ?

Do you mean when trying to create a webservice proxy in the Visual Studio environment ?

Do you there connect to the endpoint of your SAP WS, or import a WSDL file ?

Best regards, William.

Former Member
0 Kudos

in se80 transation code i have selected my web service through function module,when i create proxy from web service and i entered wsdl URL IN IT, AFFTER ASSIGHNING PACKAGE IT SHOWSERROR FOR DEVLOPER KEY

SUGGEST

Former Member
0 Kudos

Hi,

why are you trying to generate a ws proxy in SAP NetWeaver ?

You want to connect from .NET code to a SAP webservice, so your proxy must be .NET generated:

1) start up VS

2) create a new project

3) right click 'References', and select 'Add Service Reference...'

4) in the popup, type in the URL of the wsdl page of your SAP WS for the address field. An example: http://ams-dis-1.topforce.local:51080/sap/bc/srt/rfc/sap/ZWSWSN_FUNCMOD?sap-client=200&wsdl=1.1

5) [optional] change the name of the .NET namespace at like

6) press OK to generate the .NET WCF proxy.

Best regards, William.

Former Member
0 Kudos

hi

wiliams,

Thanks for your valuable inputs, the thing is i just wanna know what are all the softwares requrired to establish connection between micro soft.net, and sap. suggest

thanks

regards

Former Member
0 Kudos

Hi,

at the .NET / client / invoking side:

you preferable have .NET 3.0, with WCF functionality, as your runtime and minimal-development environment. Within the .NET SDK you'll find the tool svcutil, you can apply this to generate within a command tool the .NET WCF proxy to any external webservice; in your case your SAP WS.

NB: you can also connect without applying WCF; but since this is a free add-on to the Windows OS; I frankly don't see any reason why you wouldn't have that available at the client-side which is invoking the SAP WS.

BTW: are you developing a .NET web application, a WPF or WinForm or console, or a Silverlight ?

If you happen to have Visual Studio available, then you can also generate the WCF proxy from there. It's an easier approach compared to directly yourself operating the svcutil tool. Still, svctutil on itself is enough / all you need to generate the proxy...

At the SAP NetWeaver side: well, you state that you already have your SAP WS, so I guess you've this covered...

Success, William.

Former Member
0 Kudos

hi

williams

As you mention about the .net software, but how about sap what are the things needs to be installed to have connectivity.

suggest

thaks

Former Member
0 Kudos

Hi,

(nb, you declared this thread answerred, but in your response still raised a question. So I'm still responding to that)

Qua SAP WS generation, see http://help-sap.blogspot.com/2008/10/wsdl-file-in-sap.html for an stepswise example.

Note that you'll need a SAP Developer Key for auto-generated a SAP WS on top of your BAPI function module (or RFC, whatever is applicable in your situation).

Qua runtime operations, you need to have the SAP NetWeaver Application Server (SAP NetWeaver AS) for hosting and executing the SAP BAPI webservice;

but this is the foundation layer of your NetWeaver technology-stack/environment, thus should be available and running already for you.

Best regards, William.

Answers (0)