cancel
Showing results for 
Search instead for 
Did you mean: 

XI30 SPS16 - SOAP Sender Adapter - self-defined SOAP-Header

Former Member
0 Kudos

Hi Folks!

My scenario is that I have to send a synchronous SOAP message to an external receiving system which expects certain processing information in the SOAP header. That external system then synchronously sends back a response SOAP message to tell me the processing results of my request message.

The How-To Guide SOAP Adapter says that for the request message I have to create the whole SOAP Envelope (SOAP Enevelope, Header and Body) on my own within the mapping and that I have to remove the SOAP header in the response message. Unfortunately this guide does not tell me how this can be realized.

In other SDN threads I've read that this can be achieved by using XSLT mappings. Unfortunately I have never done this before and currently I have no clear idea how to do this. And to be honest: I am everything else than an XSLT expert (historically I'm coming from the ABAP part of SAP R/3).

My plan is to create the request payload using the graphical mapping tool and to add an XSLT mapping as 2nd mapping to build the SOAP "overhead" around the payload.

For the response my plan is to first use XSLT mapping to remove the SOAP "overhead" from the response message and then use the graphical mapping to handle the payload.

Questions:

1. Is this possible?

2. How can I achieve this?

3. Can anybody send me an XSLT mapping sample to create a SOAP envelope, header and body around the payload for the request message?

4. Can anybody send me an XSLT mappping sample to remove the SOAP envelope, header and body around the payload for the response message?

Because I'm everything else than an expert in XSLT mappings, some kind of a "click guide with samples" would be VERY GREAT!

Thanx in advance to anybody who will help me!!! For real help maximum points are guaranteed.

Regards,

Volker

mail: vk@bfact.com

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prakash!

GREAT!!! It works fine for the request message.

Any idea how to create an XSLT Mapping to remove the SOAP Envelope for the incoming response message?

Thanx! at least 10 points so far.

Regards,

Volker

former_member206604
Active Contributor
0 Kudos

Hi,

For response message you can use that.

Refer this thread

I have posted how to handle the response message. You can achieve that by Adapter module.

Thanks,

Prakash

former_member206604
Active Contributor
0 Kudos

Hi Volker,

One more way just striked my mind, correct me if am worng.

Try defining your response strucutre in this fashion


Envelope
  Header
   AdditionnalDetaisl u added
     .
     .
  Body
   Body Strucutre
     fields
     .
     .

So your response payload will fit into this structure and you can access the values during the response mapping. I don't know if this will work, but if this dose we can avoide adapter module and will be a simple solution.

Try and let me know... You can also check the same in the other thread am posted for a clear idea.

Thanks,

Prakash

Former Member
0 Kudos

Use the following code to strip the headers section and body tag.

Liang


<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

	<xsl:output method="xml" encoding="UTF-8"/>
	<xsl:template match="/">                
		      <xsl:copy-of select="//Body[1]/*"/>
        </xsl:template>            
</xsl:stylesheet>

Edited by: Liang Ji on Apr 11, 2008 8:19 PM

Answers (1)

Answers (1)

former_member206604
Active Contributor
0 Kudos

Hi Volker,

Try this XSLT code, chanfe the TODO part.. add the SOAP header part. Save it as .xsl. ZIP it and import it in the Imported archive. Please test it I have'nt test the code as I dont have a system access now.

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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="/">

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<Header xmlns="http://schemas.xmlsoap.org/soap/envelope/">

--- TODO -


</Header>

<soap:Body>

<xsl:copy-of select="*"/>

</soap:Body></soap:Envelope>

</xsl:template>

</xsl:stylesheet>

For the rest have a look at this thread

Thanks,

Prakash