on 12-20-2011 3:14 PM
Hi,
I am working on a scenario where the receiver SOAP adapter will have dynamic user name & password. but the URL remains same. how do we achieve this.
Thanks,
Mahesh
One possible way is to use XSLT mapping and create dynamic username and password in the soap header.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could use XSLT or java mapping for this. Have you seen this link?
You need to discuss with target system to decide the soap header message structure the way they want. So inside soap header tag you can insert user and password. Example as below
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
// comment: blah.. blah... all namespace fields then followed by declare
// comment : Declare user and password as follows
<xsl:variable name="user" select="1184282915'"/>
<xsl:variable name="pwd" select="'3252037'"/>
<xsl:template match="*">
<soap:Envelope>
<soap:Header>
<mod:channel>
<mod:b2bId>
<xsl:value-of select="$user"/>
</mod:b2bId>
<mod:b2bPwd>
<xsl:value-of select="$pwd"/>
</mod:b2bPwd>
</mod:channel>
..
</soap:Header>
</soap:Envelope>
Edited by: Baskar Gopal on Dec 20, 2011 11:08 AM
Baskar,
I checked your above link. in my case the username & password are not part of webservice header to use XSLT mapping.
these are the parameters that we specify on receiver soap adapter to access the webservice. and these parameters should be dynamically changed as per the input value.
Appreciate your help.
Hello,
in my case the username & password are not part of webservice header to use XSLT mapping.
these are the parameters that we specify on receiver soap adapter to access the webservice. and these parameters should be dynamically changed as per the input value
You need to use authentication keys (TAuthKey in dynamic configuration) for your requirement. There is a checkbox for this in the SOAP Receiver Adapter called Authentication Keys. There, you can only store a combination of up to 10 usernames and their equivalent passwords.
If there are more than 10 usernames/passwords here's what you can do:
1. Segregate the users according to function e.g admin, restricted, etc (max of 10) and place them in the authentication keys
2. Use a lookup (valueMapping, hashMap, etc) to determine which equivalent user in the authentication key will be used in dynamic config
Note: The approach above may not always be applicable though.
Hope this helps,
Mark
Hi Baskar,
I have checked all your Replies in SDN related to SOAP Header Creation for Wssec Web Service.
I am working on a Interface (CRM Proxy to Web Service having wssec) in PI 7.0 SP6. I have created the SOAP Header by using XSLT mapping to pass the username token and password but hardcoding user credentials in the XSLT mapping doesn't sound too neat. And transporting it from D to Q to P is even worse.
And also i have 2 username and 2 passwords to access to different instances in the same web service. So i have to pass the different Username and Password based on the Instance in SOAP header dynamically using XSLT mapping.
Therefore i request you help me out on how to pass the Username and password dynamically in the XSLT mapping to Create dynamic SOAP Header to access different instances.
If possible can you provide step-by-step aproach including XSLT mapping and Code for dynamic SOAP Header creation.
Thank you very much for your valuable inputs.
Regards,
Ajay Kodali.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.