on 04-25-2007 6:15 PM
Hello Everyone,
I am trying to work with Attachments in my Module.
The Scenario I have configured is that I have a Sender File Adapter, which picks up 2 files one as body and the second as attachment :
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
In my Module I want to put the content of the attachment file into the main payload but the following line of Code returns a null value
Message msg = (Message)moduledata.getPrincipalData();
I can see the data in this case is present as Supplementary Data but the Principal Data in the moduledata is null.
Is this expected behavior in this case / all case where we would have attachments in the payload or something is wrong in the Configurations?
Can somebody clear my doubt as to what is exactly contained in the Principal Data and what is contained in the Supplementary Data ?
Any help will be greatly appreciated.
Best Regards,
Kanwaljit
Hi,
Try the same thing without sending attachments, and see if you get null again.
Also, are you sure that the main payload, i.e. body is not null?
Did you check in the Incoming payload in SXMB_MONI?
Regards,
Puloma.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kanwaljit,
I haven't tried to pull attachments, but I use the following code successfully to get the XI message. It looks equivalent to what you're doing. Have you already manipulated the message before this point, using another module. Maybe you've swapped the principal and supplementary data?
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
throws ModuleException {
Object obj = null;
Message msg = null;
try {
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
} catch (Exception e) {
ModuleException me = new ModuleException(e);
throw me;
}
I would look in the JavaDocs for the com.sap.aii.af.mp.module.ModuleData class to see what's available. This SAP Help page tells where to find the JavaDocs.
http://help.sap.com/saphelp_nw2004s/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm
Thanks,
J Wolff
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.