on 05-10-2011 10:08 AM
Hi All
I have a adapter module in a receiver file adapter. In the code I try to access the file name through dynamic configuration,The file name gets set in the mapping.
String strFileName = msg.getMessageProperty(new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File"));
When my module get executed I get error: nested exception is: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageProperty(com.sap.engine.interfaces.messaging.api.MessagePropertyKey) of an object loaded from local variable 'msg'
Is it possible to get file name in receiver adapter? if so why does this error occur?
Yes it is possible...chk this
/people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
i guess u have added this import statement in ur code:
import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
Code will be soemthing like this (FOR PI7.1)
MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
String filename = msg.getMessageProperty(mpk);
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please check if you have mentioned the correct configuration on receiver channel as in the below wiki:
-Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.