cancel
Showing results for 
Search instead for 
Did you mean: 

Soap Sender Adapter Preserve And Access Soap Header

Former Member
0 Kudos

Hi,

I would like to preserve the Soap Header created by a client and access it in a mapping using the the Soap Sender Adapter (SP16). Does anybody know how to do this?

Kind regards,

Heiko

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Heiko,

just check on "Keep Headers".

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

I've done this and would expect to see the header of my Soap message somewhere in the message monitoring. But I can't find it. Do you possibly know where it would be located?

<?xml version="1.0" encoding="UTF-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Header SOAP-ENV:actor="test" />

<SOAP-ENV:Body>

...

Cheers,

Heiko

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Look into the Message Display tool and see what is the data that the webserivce is sending.

http://hostname:portnumber/MessagingSystem/monitor/monitor.jsp

Regards,

Bhavesh

udo_martens
Active Contributor
0 Kudos

Hi Heiko,

you should find it under "Inbound Message (CENTRAL), Payloads, MainDocument".

Of course logging must be switched on: SXMB_ADM, LOGGING=1, TRACE > 0

Regards,

Udo

bhavesh_kantilal
Active Contributor
0 Kudos

And, as (if) it is a synchronous scenario, SYNCH_LOGGING should also be turned on.. SXMB_ADM--> Integration Engine Configuration --> LOGGIN_SYNC value to 1.

Regards,

Bhavesh

Former Member
0 Kudos

Ok, thank's, I can see it now. Suppose that I have to apply an XSLT transformation to access it in message mapping?

Cheers,

Heiko

udo_martens
Active Contributor
0 Kudos

Hi Heiko,

a message mapping cannot work cause the data type would be wrong. You need a XSL, Java or ABAP mapping or need to change your data type /message type.

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

I would prefer a user define function in a Java mapping. I know that there is a defined API to access the dynamic configuration of a message. Do you know if something similar exists for accessing the header?

Cheers,

Heiko

udo_martens
Active Contributor
0 Kudos

Hi Heiko,

User defined functions are Java parts of Message Mappings. As I told you it could be difficult to use a message mapping. Access to runtime constants of configuration exist in every mapping kind. But in ur case i have some doubt's that this provides success. I assume that in the view of XI the SOAP header is now part of your payload - so you can extract the values with simple expressions of your mapping.

Regards,

Udo

Former Member
0 Kudos

Hello Udo,

I have found a solution to this problem. It is possible to add header entries to the DynamicConfiguration which is available by an API:

...

soapMsg.append("<SOAP-ENV:Header>");

soapMsg.append("<SAP:DynamicConfiguration xmlns:SAP=\"http://sap.com/xi/XI/Message/30\" xmlns:SOAP=\"http://schemas.xmlsoap.org/soap/envelope/\" SOAP:mustUnderstand=\"1\">");

soapMsg.append("<SAP:Record namespace=\"http://sap.com/xi/XI/System/SOAP\" name=\"SRmsUser\">test</SAP:Record>");

...

This code snip shows Java client code to add an element to the SOAP header which corresponds to the DynamicConfiguration. In XI it will be accessable using the respective API.

Cheers,

Heiko

Former Member
0 Kudos

Hello Heiko,

I am having a similar requirment whr

1. i need to access contents of the soap header.

2. i need to put in some info in the soap header,

Can you tell me what API i can use during the mapping to acheive this?

Thnk u very much,

Hank

Answers (0)