cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP proxy web service authentication

Former Member
0 Kudos

Hi,

We are trying to develop an ABAP proxy for a web service call on ECC6 (SP14).

The web service (provided by another SAP system) uses basic authentication. The proxy has been created as has the logical endpoint/service (via SOAMANAGER). In the endpoint I have provided the credentials for authentication.

Manually testing the proxy via SE80 works fine.

When I try and call the proxy via a program it prompts for user id/password. If provided the call works.

-


DATA: ZPROXY type REF TO ZMY_PROXY,

INPUT type ZMY_PROXY_REQUEST,

OUTPUT type ZMY_PROXY_RESPONSE.

TRY.

CREATE OBJECT ZPROXY.

CATCH CX_AI_SYSTEM_FAULT.

ENDTRY.

TRY.

CALL METHOD ZPROXY->LIST_USERS

EXPORTING

INPUT = INPUT

IMPORTING

OUTPUT = OUTPUT.

CATCH CX_AI_SYSTEM_FAULT .

CATCH CX_AI_APPLICATION_FAULT .

ENDTRY.

-


My expectation is that the proxy would derive the credentials from the logical endpoint.

Am I missing something?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

>My expectation is that the proxy would derive the credentials from the logical endpoint.

In my tests with the same kind of basic client program, this has been true. (Netweaver abap and basis SP 16). I did not have to provide credentials.

Regards,

Olivier

Former Member
0 Kudos

Hi Olivier,

Thanks for the info. Can you advise the following:

  • whether you did anything special when creating the web service provider or it's endpoint

  • what service branches/nodes you have activated on both the provider and consumer end under SICF

Thanks in advance.

Tim

Former Member
0 Kudos

Hello Tim,

Are you using ABAP Netweaver 7.0 SP > 14 ?

If yes it means that you have to use SOAMANAGER to create the endpoint.

>whether you did anything special when creating the web service provider or it's endpoint

Nothing special : Using the wizard first and then SOAMANAGER

>what service branches/nodes you have activated on both the provider and consumer end under SICF

After Using SOAMANAGER, a new service is created in SICF

/default_host/sap/bc/srt/rfc/sap/<webservice>/<client>/<method>/<binding>

I have to activate it.

I had nothing special to activate on the consumer system. Of course HTTP service must be active in SICM.

Regards,

Olivier

Former Member
0 Kudos

Hi Olivier,

Yes - the consumer system is ABAP Netweaver 7.0.

It has SP14. The webservice provider system is running at the same level.

The webservice provider was created using the wizard to convert an RFC enabled function module. I then used SOAMANAGER to created the provider endpoint. On the consumer side it was the same - wizard to create the proxy & then SOAMANAGER for the endpoint.

I checked the services on the provider system & the service indicated was activated already - which was expected as the web service call itself works fine.

/default_host/sap/bc/srt/rfc/sap/<webservice>/<client>/<method>/<binding>

Any other suggestions?

Thanks again,

Tim

Edited by: Tim Brown on Mar 10, 2009 10:58 PM

Former Member
0 Kudos

Hi Tim,

>Any other suggestions?

Sorry but no. I did nearly the same thing as you did and it worked for me. The only difference is that I used Netweaver Abap 7.0 SP 16.

If it is important for you, I suggest that you open an OSS message with SAP.

Regards,

Olivier