on 07-20-2006 3:27 PM
Hi,
I have a scenario, where I want to put the content of a flat file (text, no csv or similar), which is an attachement of an e-mail, into a simple XML structure: entire file content as content of one XML tag. E.g.:
file content:
"abcdefgh"
xml file:
<root>
<content>abcdefgh</content>
</root>
Do I need to use MessageTransformBean? Or is there an easiert way?
Thanks,
Torsten
Hi Torsten,
if you need the content simply as a whole, you only need to exchange mail body and attachment. This is done with the
PayloadSwapBean.
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm
regards
Dirk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dirk,
thank you for the quick answer.
I tried already what you described, but I have the following problem: After receiving the mail I apply a message mapping, but during execution an exception is thrown (a simple mapping for testing: just copy the receiving field to another field).
Is there a special requirement, how the receiving message type must look like?
Hi Dirk,
When we use MessageTransform, we can use ContentDisposition to specify, as to whether the payload has to go as an attachment or inline(as the mail itself.)
It could also be a text file. Right?
Just take a look at this..
http://help.sap.com/saphelp_nw2004s/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
cheers,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everybody,
thank you for your support! I solved my problem using a mixture of your suggestions:
- I used SwapBean to use attachment
- I used TransformBean that way, that I'm converting the text string in my attachment into a basic XML-Structure (one field, field seperator "°").
Regards,
Torsten
Hi Dirk,
Just a small query. Only the main payload needs to be wrapped in XML right? The attachment can be a text file, right?
cheers,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Torsten,
Implementing MessageTransformBean is pretty similar to using PayloadSwapBean right?
Did u try using MessageTransform??If Yes, what does it say?
cheers,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.