cancel
Showing results for 
Search instead for 
Did you mean: 

Calling SAP Webservice from .NET

Former Member
0 Kudos

Hi

I'm not sure if this is the right forum to ask this question.

I'm not using PI or SOA middleware, but only saw consuming of SAP webservices from this forum.

I have googled all over the place, without finding any solutions, so hope this forum can help.

This is my scenario.

I have had a webservice from SAP ECC (written from a function module).

It's working OK in other platforms (e.g. being consumed from iPhone/iPad applications).

However, I can't get it working from ASP.Net (using Visual studio 2010).

I have included the webservice using the following URL convention:

http://<servername:port>/sap/bc/soap/wsdl/?services=<fm_name>&sap-client=<client-number>

and it has generated the correct code-behind files and web.config file from Visual studio.

I have passed the user id & password with sap_all authentication.

However, when I run the webservice, I had the following error:

"System.Xml.XmlException: The data at the root level is invalid. Line 1, position 1."

When I checked from fiddler, the webservice actually runs and returns the correct result in textview, but XML tab remains empty.

What went wrong? Did I call the webservice incorrectly? Or is there anything to do with the SOAP protocols?

Pls advise

Thks in advance.

Rgds

Rusyinni

Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Rusinni,

Why dont try to publish the service in the webservice registry and to use the endpoint pointing there? (Setting Up the Connection to the Services Registry - ABAP Workbench Tools - SAP Library)

Regards.

Former Member
0 Kudos

Hi

How do i get about publishing the service in the webservice registry?

Currently the endpoint is pointing towards:

http://<servername:port>/sap/bc/soap/rfc

Appreciate your advice.

Rusyinni