Skip to Content
avatar image
Former Member

Change SOAP Header in C4C/PDI

Hi experts,

I need to connect a SOAP webservice to a C4C tenant. To do so, I followed a tutorial by Jens Limbach (https://blogs.sap.com/2014/01/14/video-how-to-invoke-an-external-web-service-via-coding/) but my webservice needs a special header for security reasons.

To be more concrete, this is the aimed header:

<soapenv:Header> 
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="0fd17cd5-8b41-4201-8eaa-f03d4a77e06a" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>XX</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XX</wsse:Password>
         </wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>

Unfortunately, I was not able to find such a setting for the webservice's authentication.

Actually, I found this as an idea to improve the C4C:

https://ideas.sap.com/D33605?status_id_filter=F884CEC6-376F-4B29-BD97-A85B03034A45&tag_filter=soap¤t_tab=Recent&row_num=2≥tparameters=1

I doubt that it is not possible because in the SDK documentation it is stated that "WS-Security and Reliable Messaging are supported" (8.14.5.5) but where to make these settings?

Many thanks for your support.

Kind regards,
Jens

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 17, 2017 at 08:22 AM

    Hello Jens,

    To Access SOAP webservice in to coding first you need to configure External Webservice integration, Communication scenario in to PDI.

    Go to Communication Scenario (xx.csd)

    Select Web Service Type : SOAP
    Communication Type : A2X

    Go to Service Tab -> Custom Outbound Service (select your respective xxxx.wsid service)

    -Now Go to Web UI Create Communication Arrangement

    Maintain Host and Maintain Credential for Outbound Services.

    -Create Communication System Select Above Communication Arrangement.

    Now in coding you can use this above service.

    Thanks,

    Tasnim

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 18, 2017 at 08:20 AM

    Hello Tasmin,

    thank you for your answer but to be honest, I processed all those steps by following the video tutorial by Jens Limbach. My problem is not how to set up a typical webservice connection, but how establish a connection to a webservice that requires the authentication: WS-Security by OASIS (which needs the above-mentioned custom SOAP header). According to chapter 8.14.5.5 of SDK documentation, this should be possible.

    - Is there any setting for this authentication protocol in the C4C?
    - Or is there any way to define a custom SOAP header in the CAS?

    Kind regards,
    Jens

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 06, 2017 at 12:41 PM

    Hello Jens,

    I am also facing same issue. By any chance did you solve this issue.

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded