on 04-18-2011 10:14 PM
Hi Experts,
I need to implement SOAP Receiver Scenario and passing ( Header fields User, Password and token) I have seen a lot of scenario using a XSLT Mapping, to handling the SOAP Header. So need to help to understand some details:
Suppose I need to implement the SOAP Header below? In this case I need add only the fields u201CUsername, Password and AuthenticationTokenu201D. I created the XSLT Transform, the source XML? Where I put it? Or can create it into Message Interface?
Is it possible to do this in Java Mapping?
Thanks!
Best Regards
Fábio Ferri
<soap:Header>
<v1:ExecutionHintHeader>
<v1:Name></v1:Name>
<!Optional:>
<v1:Arguments>
<!1 or more repetitions:>
<v1:Argument Name="?" Value="?"/>
</v1:Arguments>
</v1:ExecutionHintHeader>
<v1:CredentialsHeader>
<!Optional:>
<v1:Username>pi</v1:Username>
<!Optional:>
<v1:Password>jhjhjjhjhjius</v1:Password>
<!Optional:>
<v1:AuthenticationToken></v1:AuthenticationToken>
</v1:CredentialsHeader>
</soap:Header>
You can also change the header information by using the DynamicConfigurationBean
http://help.sap.com/saphelp_nw04s/helpdata/EN/45/da2239feb22e98e10000000a155369/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check out my blog article:
http://simonlesflex.wordpress.com/2011/01/26/sap-pi-customize-message-with-xslt-mapping/
Here you can find the xslt code for solve your problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi spantaleoni,
Fisrt of all, thank you for help! it was very helpfull. I implemented this code using XLST Mapping from your blog. But it doesn't work. I developded RFC to SOAP Syncronous cenario, i am using PI 7.1 with two mapping, the first XLST Mapping to add SOAP Header with user and pass, and the second, is Java Mapping, because i can't do in Grafical Mapping. But when i testing the interface, using TCP Monitor and the SOAP Header doesn't appear in the Message, only JAVA Mapping. I marked "Do not use soap envelop"in the CC SOAP Receiver. In the Operation Mapping the first is XLST and the second is Java Mapping.
My question is: Is there some kind setup to use XLST Mapping?
I configured the Adapter Module "localejbs/AF_Modules/MessageTransformBean".
Could you help me? Please?
Thank you for help!
Best regards!
Fábio Ferri
You need to put XSLT mapping in 2° step mapping in request.
SourceMessageRequest -> Message Mapping -> XSLT Mapping -> DestinationMessageRequest
If you test mapping program, this should be working fine.
In adapter module, put localejbs/AF_Modules/MessageTransformBean with parameter value text/xml; charset=utf-8 and correctly set Conversion Parameter "Do not use Soap Envelop"
XSLT Request Mapping
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<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">
<soap:Header>
<ServiceAuthHeader xmlns="http://WIND.WEBSERVICES.DMS/">
<Username>USER</Username>
<Password>PASSWORD</Password>
</ServiceAuthHeader>
</soap:Header>
<soap:Body>
<xsl:copy-of select="*"/>
</soap:Body></soap:Envelope>
</xsl:template>
</xsl:stylesheet>
Hi ,
You might need to use Axis Framework in SOAP Adpater.
Axis is an open source library for web services. & Process Integration 7.1 uses the Apache Axis framework to enhance the
ability of the standard SOAP adapter.
In your case Axis adapter can be an ption to configure a channel to use the UsernameToken authentication of WS-Security.
for FAQs & use of Axis Adpater, refer SAP NOte - 1039369.
Thanks!
Jyoti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
XSLT mapping is better option.
As you mentioned, you have already created XSLT transform, import it as Imported arhives file & use it as mapping in Operation mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can create SOAP Header using XSLT mapping or Java mapping. YOu need to import your mapping in the operation mapping screen. Basically consecutive mapping. Use XSLT mapping first and then your message mapping.
Edited by: Baskar Gopal on Apr 18, 2011 7:26 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.