on 05-25-2010 12:07 PM
Hi,
I am having a requirement where i have to access the filename configured using Dynamic configuration inside my receiver file adapter MODULE code. I am having PI7.1.
For accessing the DC filename i have inserted this piece of code inside my adapter module code:
MessagePropertyKey MPK =new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
String filename = msg.getMessageProperty(MPK);
But when i am tesing this module i am getting: "Message processing failed. exception encrypting session key".
This module is basically written for encryption.I am referring this blog:
/people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
Do i need to do something else for accessing DC filename inside my module??Please help??
Thanks
Amit
Hi,
My code is something like this:
public ModuleData process(ModuleContext mc,
ModuleData inputModuleData)
throws ModuleException {
Object obj = null;
Message msg = null;
MessageKey amk = null;
String inpKeyLocation = (String) mc.getContextData("inpKeyLocation");
try {
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
XMLPayload xpld = msg.getDocument();
MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
String filename = msg.getMessageProperty(mpk);
InputStream inps = (InputStream) xpld.getInputStream();
and so on ......
My encryption method somewhere down the line will use "filename" as one of its input.
Please help??
Thanks
Amit
Edited by: AmitSri on May 25, 2010 1:43 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varun,
I am using PI 7.1and referring this java doc:
where it has been mentioned :
String getMessageProperty(String namespace, String name)
Deprecated. Use getMessageProperty(MessagePropertyKey), instead.
But stil i have used this and getting the same session key encryption exception.
Thanks
Amit
User | Count |
---|---|
93 | |
11 | |
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.