on 08-26-2011 11:41 PM
Hi All,
I have a java mapping where I do a SOAP Lookup to target client system using a USER ID/ PASSWORD to get a session ID. I further use this Session in my target SOAP mapping.
My question is I have hardcoded USER ID / PASSWORD in string variable and use it while constructing my SOAP Lookup xml.
So when I am moving from one environment to another the client USER ID / PASSWORD will change. In that case I have to manually change the java mapping explicitly and transport it.
What is the best way to handle it ? So that I don't have to change the USER ID/ PASSWORD when I am transporting my java mapping from environment to environment.
Regards
Ravijeet
You could store the values for user and password in value mapping.
Then you can change the values easily without changing the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can access the value mapping with this class:
com.sap.aii.mapping.value.api.XIVMService
https://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/value/api/XIVMService.html
for example:
result = XIVMService.executeMapping(sourceContext, sourceAgency, sourceScheme, sourceValue, targetContext, targetAgency, targetScheme);
I would consider Java Parameter Mapping, you can change the userid/password in configuration for each environment. Refer to this blog [/people/shabarish.vijayakumar/blog/2009/12/07/parametrized-java-mapping-in-pi-71-plus-some-other-delicacies|/people/shabarish.vijayakumar/blog/2009/12/07/parametrized-java-mapping-in-pi-71-plus-some-other-delicacies]
Regards
Asif
write a logic in JAVA to idetify environment (dev or qual or prod),and hard code 3 environment passwords in java mapping,based on environment pass user name and password.
this is the best way to handle this kind of requirement,to get system environment use system.getProperty
.Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.