Skip to Content
avatar image
Former Member

SOAP Sender Web Service Authenication

Dear Experts,

Is there a way to authenticate a web service call from a third party system to local (to the company) De-central adapter. I would like to embed the required username and password in the SOAP call. I know it can be done in the URL of a HTTP request but can it be done by customising the SOAP header ?

Many thanks

Mark

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 21, 2011 at 01:26 PM

    You have to configure SSL to use certificate authentication and bypass the logon/pass. Please check the note below.

    #856597 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 SOAP Adapter

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 21, 2011 at 01:35 PM

    Hi,

    If user name is passed in header within standard field 'sap-user' in case of sender SOAP adapter, it can be read using DynamicConfiguration.

    Remote User SRemoteUser

    Remote Host SRemoteHost

    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","SRemoteUser");
    String userName = conf.get(key);
    

    Further you can map this retrieved value to required field from target structure.

    Hope this explanation helps.

    To store adapter attributes in the message header of the XI message, set the Set Adapter-Specific Message Attributes indicator.

    The following attributes are added to the XI message header if the sender makes them available, and if the Variable Transport Binding indicator is set. SRemoteUser and SRemoteHost .

    You can check the originating user and Host in mapping and you may decide not to answer to the soap call .Means fails the mappings

    http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm

    Also see

    Security Settings for the Sender SOAP Adapter

    http://help.sap.com/saphelp_nw04/helpdata/en/1f/7e2441509fa831e10000000a1550b0/content.htm

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 21, 2011 at 01:56 PM

    There are various ways of doing authentication like Basic authentication, certificate authentication and so... Certificate authentication via SSL communication is a pretty standard. Reason is even your user credentials (userid/pwd) are not exposed in the network routing media. If you need certificate authentication, basically you have to import client certificate in netweaver keystore(java stack or abap stack) and communicate using https port (default port example;50001). If you just want to use basic authentication then you can use dynamic configuration in udf to add in the SOAP header mesg.

    Add comment
    10|10000 characters needed characters exceeded