cancel
Showing results for 
Search instead for 
Did you mean: 

AxInvokerBean and MessageTransformBean in SOAP Receiver Channel Module Chain

0 Kudos

Good evening. I am struggeling with the following task and would appreciate help with it.

Setting is Proxy->SOAP, problem is in the Module Chain of the SOAP Receiver Channel.

I have to satisfy the security requirements of an external WebService I need to consume. I have configured the following steps in my scenario:

1. Fetch a SAML Security Token from another Service in a previous call (using a X.509 certificate to sign the request) and hold it in the ABAP Backend.

2. Send this Security Token together with request data from ABAP to PO.

3. In PO, first do an XSLT Mapping in the Interface Determination part of the ICO to create a SOAP header and put the Security Token into this header. (And to map some other things, which are not important here.)

4. Then this is passed to a SOAP Receiver Channel with "Do Not Use SOAP Envelope" checked.

I configured the following Module Chain:

modules.jpg

parameters.jpg

I need the AxInvokerBean to call WSDoAllSender to add a Timestamp and sign Timestamp and Body with a certificate from the Keystore. This works fine.

Then the payload looks like:

Envelope

- Header

- - Security

- - - Signature

- - - Timestamp

- - SAML Token

- Body

But I need this:

Envelope

- Header

- - Security

- - - SAML Token

- - - Signature

- - - Timestamp

- Body

In other words: I have to put the SAML Token inside of the Security node. To achieve this, I created a small XSLT Mapping and call it using MessageTransformBean:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0">
	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*"/>
			<xsl:apply-templates/>
		</xsl:copy>
	</xsl:template>	
	
	<xsl:template match="saml:Assertion"/>
	
	<xsl:template match="wsse:Security">
		<wsse:Security>
			<xsl:copy-of select="/soap:Envelope/soap:Header/saml:Assertion"/>
			<xsl:apply-templates/>
		</wsse:Security>
	</xsl:template>
	
</xsl:stylesheet>

(I deleted all the namespace declarations to make it easier to read, but in real life, they are there). During development, I save the payload before each module call using AxInvokerBean and LogHandler.

This Mapping is the last step I need to call this WebService. If I put the payload which comes out of AxInvoker into the xslt in eclipse, it produces what I want to have. This is NOT an xslt question.

And finally my PROBLEM:

In this Module Chain, the xslt simply does nothing, the payload looks the same before and after the call (except for some whitespaces). I can see in xpi_inspector that it is found and called and the transformation is "executed successfully", but it just does not do anything, and I am out of ideas why.

Thank you!

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member190293
Active Contributor
0 Kudos

Hi Christian!

It's hard to suggest in such case. I would try to use "//saml:Assertion" for "select" attribute in your template first, to be sure that XPath expression is evaluated the right way during runtime module processing.

Regards, Evgeniy.

0 Kudos

Hi Evgeniy,

glad you are here.

Both Xalan and Saxon, both are working fine with my xslt. In the SWCV I use Saxon (and not Xalan, as written first) in Mapping Runtime (needed XSLT 2.0 for the first interface), but I guess that's not what is used in the Module.

Do you know if there's a way to tell the Module which processor to use? (Best idea I can come up with is to develop my own module for xslt transformations and use Xalan in it, but I hope there's an easier way...)

Kind regards,
Christian

Muniyappan
Active Contributor
0 Kudos

Hi Christian,

Could you please share your input xml here?

also, you could try to put some logging in the xslt, so that you could see what happens when xslt executes using the xpi_inspector log.

hope you are using the correct xalan version jar in eclipse.

https://answers.sap.com/questions/316247/how-to-find-the-xalan-jar-version-in-sap-po-74-sp.html

Regards,

Muni

former_member190293
Active Contributor
0 Kudos

Hi Christian!

Did you use Xalan processor for testing in Eclipse?

Regards, Evgeniy.