cancel
Showing results for 
Search instead for 
Did you mean: 

How to change SOAPHeader in SOAP-Receiver-Channel?

Former Member
0 Kudos

Hello,

For a requiered different SOAP Header Structure. I want to make some changes in the SOAP Header.

How can I do it in Adapter engine ?

Are the any possibilities to make theis changes ?

I have read it that it possible with dynamic configuration, but there are not detailed information or good documents .

It would be nice when I get some detail information in Steps.

Best Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can change the SOAP Header data using the Axis Framework in SOAP adapter.

check the link for same http://help.sap.com/saphelp_nw04/helpdata/en/45/a4f8bbdfdc0d36e10000000a114a6b/content.htm

Regards,

Phani

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can try checking the Do not use SOAP Envelope option in your receiver comm channel. Afterwards, build your SOAP envelope using data types and use Java Mapping for the prefixes.

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mr,

You can use "No soap envelope" option in cc receiver, and set a XSLT mapping (in message mapping) for fill Soap Header.

You can refer to my blog page:

http://simonlesflex.wordpress.com/2011/01/26/sap-pi-customize-message-with-xslt-mapping/

Former Member
0 Kudos

Hello ,

that is a good Idea I think .

But the Problem is the mappings that exists .

based on Target side at a imported structure .

That means i cant make changes on data-type-level for add the soap header structure (because i haven't datatypes ) .

Are there existing any possibilities adapt the structure in message mapping ?

Best Regards

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

What you can do in your Java Mapping is:

1.) Create the header

2.) Create the body and append the payload

3.) Append the header and body in the envelope

Regards,

Mark

Former Member
0 Kudos

Hello,

the solution with xslt mapping is nice, but i have one problem to make the xslt mapping.

in normal case you con make a xslt when the source-structure have a namespace entry like "targetNamespace="urn:Aash:xsltMapping"

But you have the entry "targetNamespace=...." in your source-structure only when you have create the datatype and messagetype self.

In my situation i have an imported structure as source-structure and the onliest entry in the beginning is

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> .....

.....

How i can solve this problem .

Any ideas ?

Best Regards

udo_martens
Active Contributor
0 Kudos

Hi,

the easies way is to create 2 mappings:

1. Normal message mapping: you have to create (import) source and target datatype (message type). The mapping is handling all mapping except soap envelope

2. XSLT mapping: You do NOT have to create a data type. Just add the xslt to operation mapping. Copy the result of first mapping with xsl:copy-of, the envelope can be build static, just write the output including namespace declarations and so on.

Regards,

Udo

Former Member
0 Kudos

Hello,

thank you for your response at first.

I take the second way which you have suggest.

But the problem is to get information from the source structure (IDOC).

MT_TEST1_Result doesn't filled

Any Idea wich could be the problem?

below i have a sample xsl code :

MT_TEST1_Result is the Message type.

Best Regards

***************************Sample*XSL*********************************

<?xml version="1.0"?>

<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:sap="http://www.sap.com/sapxsl"

xmlns:aash="http://TestScenarios/100"

xmlns:ns0="http://www.w3.org/2001/XMLSchema" >

<xsl:template match="/">

<aash:MT_TEST1_Result>

<Data>

<Name>

<xsl:value-of select="ns0:INVOIC02/IDOC/E1EDKA1/ORT01"/>

</Name>

<Marks>

<Total_Marks>

<xsl:value-of select="ns0:INVOIC02/IDOC/E1EDKA1/ORT01"/>

</Total_Marks>

</Marks>

</Data>

</aash:MT_TEST1_Result>

</xsl:template>

</xsl:transform>

*****************************************************************************

                                          • That is the xsd structure from idoc (from in message mapping) **********

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="INVOIC02">

......

...

udo_martens
Active Contributor
0 Kudos

Hi,

i m a bit concerned you missunderstood me:

>I take the second way which you have suggest

I suggested ONE way: Create TWO mappings, one message mapping (easy, because you have the message types) and XSL (easy, because you create the output mainly static).

You are going for just one xsl, that is definitivly NOT the easiest way....

To your stylesheet:

- I think there is a mistake with the IDoc namespace. "ns0" should be "urn:sap-com:document:sap:idoc:messages"

- You have to put the prefix to each element in a path

Regards,

Udo