cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when adding ABAP custom webservice with Visual Studio 2010

Former Member
0 Kudos

Hi All,

After creating a webservice for a custom RFC function developed in a ECC6.0 SAP machine, I tried to add it to a Visual Studio 2010 windows aplication (through a web reference connection).

The sequence I've done is:

- Create RFC in ABAP, with testing ok

- Create a WEBSERVICE with the ABAP editor

- Configured the webservice with SICF with:

Procedure: Standard

Logon data: standard R3 user

Security requirement: Standard

Authentication: Standard SAP User

Then, in SOAMANAGER I copied the webservice URL and tried to add it to Visual Studio 2010, but it keeps asking me the user and password. I try to supply the R3 username and password but if fails.

Why is ECC6.0 asking the user and passord if I've defined a SAP user for the login process?

Is there any way to disable this?

Thanks,

Manuel Dias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Manuel,

You can use the following code:

CredentialCache cache = new CredentialCache();
      cache.Add(new Uri("WEBSERVICEURL:PORTNUMBER/"), "Basic", new NetworkCredential("USERNAME", "PASSWORD"));

SAP needs a password.

Kind regards,

JK

Former Member
0 Kudos

Thanks John,

The problem occurs when I try to add the webservice in Visual Studio 2010 to my project.

The system always asks for a user login and no matter what user I provide (R3 user, etc) the login always fails, thus not allowing me to add the webservice to my project.

Regards,

Manuel Dias

Former Member
0 Kudos

Manuel,

Try the following system user with the next roles and profile:

Role

SAP_XI_APPL_SERV_USER

SAP_XI_RWB_SERV_USER

Profile

SAP_ALL, SAP_NEW

And login in with this systemuser.

Kind regards,

JK

Former Member
0 Kudos

Hi,

Instead of a "Web Reference" service, I've change to a "Service Reference" in VS2010.

The I used the credentials snipt to add the user and password, and it worked ok.

Thanks anyway,

Manuel Dias

Answers (0)