on 11-06-2010 8:13 AM
Hi Experts,
I am currently working with a module where I need to work with attachments coming with emails.
Can any one please help me , how can I use the different methods of this interface?
My requirement is to read only the content type of the attachment, taking only the content of the attachment.
we have two methods in this interface- getContentType() and getContent() , I think this will serve the purpose. we have another method toString() - will this method return the content of the attachment as a String?
in the below code fragment-
Message msg = (Message)inputModuleData.getPrincipalData();
Payload payload =msg.getDocument();
will return the main document as XMLPayload.
can I use this
Attachment attachment= msg.getDocument();
and use the method as -
String str= attachcment.toString(); ---> will this return the attachment content as String ?
any code fragment for these method in Attachment interface will be helpful.
I need another help- is it possible to call the adapter module in the next sequence from the previous module code conditionally?
e.g- I have written I custom module where I need to restrict the processing of the next module ( e,g- payloadswapbean) conditionally? like- the payloadswapbean will called only after certain verification of the attachment other wise it will not be called.
Request your help
Thanks to all
Sugata B Majumder
Hi All,
I forgot to update one thing, I am using PI 7.0 SP15, and I am interested only dealing with the the Attachment contents, what I just found that Attachment interface is not possible to use in PI 7.0 as it requires the operational mapping level check - Read Attachment.
Is there any way so that the content of attachment can only be get and the content type of the attachment?
I want to use this custom module before the payloadswapbean.
Request your help
Thanks
Sugata B Majumder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.