on 01-08-2019 1:07 PM
Hello everyone! I'm new in SAP CPI and I need an urgent help.
I'm trying to create an integration between SAP ECC and another legacy environment called SOC. The communication should be throug SOAP and I need to insert a HEADER but I do not know how to do it. Can anybody help me? As I am new to CPI I need a step-by-step tutorial to understand.
So far I have configured what it shows in the images:
SAP - SENDER:
SOC - RECEIVER:
Hello Venessa,
Could you please share the XML which you are getting now without header also.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sriprasad,
Of course. Here is the XML attached (it's a little big lol ).
Hello Vanessa.
Could you please share input SOAP XML and expected SOAP XML with header.Will try to help you with code.
Usually this error can be avoided by using Message Mapping which makes sure there is no structural differences.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sriprasad,
Here is the code where I create the header in ABAP concatenating into a data:
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Timestamp wsu:Id="TS-' lv_timestamp_id '">
<wsu:Created> lv_created </wsu:Created>
<wsu:Expires> lv_expires </wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-' lv_token_id '">
<wsse:Username> lv_username </wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"> lv_sb64password </wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"> lv_b64nonce </wsse:Nonce>
<wsu:Created> lv_created </wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
I put the values of these variables dynamically, but now I first want to set the header in a fixed way. I hope I was able to make myself clear.And thank you for letting me know about the Message Mapping. I'm reading the guide...
Hello Vanesa,
You can use content modifier to set the header.Below will guide you
Click on the content modifier and navigate to Header tab like below to set the header.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply Sriprasad.
I've already tried with "Content Modifier" but occurs the error: "Error Details java.lang.IllegalArgumentException: The PayLoad elements cannot fit with the message parts of the BindingOperation. Please check the BindingOperation and PayLoadMessage".
Searching in some articles I saw the use of "Groovy Script" to set the header soap security. I do not know if is the best way but I'm doing several tests in here. Unfortunately I don't know the Groovy code and I made the soap header with xml only in the ABAP and SOAMANAGER...
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.