{
String Url = "";
Url = SFDCserverUrl.substring(SFDCserverUrl.indexOf("https"), (SFDCserverUrl.indexOf("/Soap/")));
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/REST","access_token");
conf1.put(key1, token);
DynamicConfiguration conf2 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/REST","serverUrl");
conf2.put(key2, Url);
DynamicConfiguration conf3 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key3 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/REST","Param1");
conf3.put(key3,Param1);
DynamicConfiguration conf4 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key4 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/REST","Param2");
conf4.put(key4,Param2);
return"";
}
private void getSessionIdFromVM() throws ValueMappingException {
String context = "http://sap.com/xi/XI";
// get Token ID1
String senderAgency = "SenderAgencyForToken";
String senderScheme = "SenderSchemeForToken";
String receiverAgency = "Token";
String receiverScheme = "Token1";
String token1 = "";
String token2 = "";
String url = "";
IFIdentifier src = XIVMFactory.newIdentifier(context, senderAgency, senderScheme);
IFIdentifier dst = XIVMFactory.newIdentifier(context, receiverAgency , receiverScheme);
try {
token1 = XIVMService.executeMapping(src, dst, "Token1");
} catch (ValueMappingException e) {
// message the following if not found:
// return ("no ValueMapping found for [" + "Token1" + "]");
}
// get Token ID2
senderAgency = "SenderAgencyForToken";
senderScheme = "senderSchemeForToken";
receiverAgency = "Token";
receiverScheme = "Token2";
src = XIVMFactory.newIdentifier(context, senderAgency, senderScheme);
dst = XIVMFactory.newIdentifier(context, receiverAgency , receiverScheme);
try {
token2 = XIVMService.executeMapping(src, dst, "Token2");
} catch (ValueMappingException e) {
// message the following if not found:
// return ("no ValueMapping found for [" + "Token2" + "]");
}
// get URL
senderAgency = "SenderAgencyForURL";
senderScheme = "SenderSchemeForURL";
receiverAgency = "URLValue";
receiverScheme = "URL";
src = XIVMFactory.newIdentifier(context, senderAgency, senderScheme);
dst = XIVMFactory.newIdentifier(context, receiverAgency , receiverScheme);
try {
url = XIVMService.executeMapping(src, dst, "URL");
// return res;
} catch (ValueMappingException e) {
// message the following if not found:
// return ("no ValueMapping found for [" + "URL" + "]");
}
sessionId = token1 + token2;
SFDCserverUrl = url;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 |