on 07-29-2013 2:45 PM
Hi
In SAP PI 7.11 I would like to pick up a file with an attachment from a mail server and place the attachment in a folder where the name of the folder is a combination of the subject and the sender from the mail.
As I understand the SAP help http://help.sap.com/saphelp_nwpi71/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm I am supposed to use Variable Tranport Binding and specify SHeaderSUBJECT and SHeaderFROM. In order to make the directory path dynamic I create the directory value in a java mapping:
(part of the code:)
DynamicConfiguration dynamicConfiguration = input.getDynamicConfiguration();
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail","SHeaderFROM");
String SHeaderFROM = dynamicConfiguration.get(key1);
DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail","SHeaderSUBJECT");
String SHeaderSUBJECT = dynamicConfiguration.get(key2);
Directory = mainDirectory + SHeaderFROM + "_" + SHeaderSUBJECT;
DynamicConfigurationKey key3 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","Directory");
dynamicConfiguration.put(key3,Directory);
I get mainDirectory from a parameter value in the operation mapping.
The configuration of the sender mail channel is like this:
Transport protocol: POP3
Message protocol: XIPAYLOAD
Use Mail Package: ticked
Keep Attachments: ticked (I use a module which sets the name of the attachment as the FileName in the dynamic configuration)
QoS: Exactly Once
Set ASMA: ticked
Variable Transport Binding: ticked and with values SHeaderSUBJECT and SHeaderFROM one each separate line
Module tab:
AF_Modules/PayloadSwapBean (swap.keyName = payload-name, swap.keyValue = MailAttachment-1)
I get this error (also when I comment out the SHeaderSUBJECT and SHeaderFROM in the java mapping) :
SOAPFault received from Integration Server.
ErrorCode/Category: XIProtocol/WRONG_VALUE; Params:
SOAP:Envelope(1)SOAP:Header(1)sap:DynamicConfiguration(3)sap:Record(24),
PS2(zz9371I1861Ic85fhde40hzz1f42h208ch1ee6h1de0h1d18h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082k1f8fizz1de097hz2dh2a8h668h839hd25hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1bceh1d07h1d0ch1d2eh1d3fh1dc1h1de9h1dfeh1dffh1e1dh34h1155h),
ST: ST_XMS_MSGHDR30_DYNAMIC; AdditionalText: An error occurred when
deserializing in the simple transformation program ST_XMS_MSGHDR30_DYNAMIC;
ApplicationFaultMessage: null; ErrorStack: XML tag
SOAP:Envelope(1)SOAP:Header(1)sap:DynamicConfiguration(3)sap:Record(24) (or one
of the attributes) has incorrect value
PS2(zz9371I1861Ic85fhde40hzz1f42h208ch1ee6h1de0h1d18h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082k1f8fizz1de097hz2dh2a8h668h839hd25hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1bceh1d07h1d0ch1d2eh1d3fh1dc1h1de9h1dfeh1dffh1e1dh34h1155h)
An error occurred when deserializing in the simple transformation program
ST_XMS_MSGHDR30_DYNAMIC Data loss occurred when converting
PS2(zz9371I1861Ic85fhde40hzz1f42h208ch1ee6h1de0h1d18h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082k1f8fizz1de097hz2dh2a8h668h839hd25hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1bceh1d07h1d0ch1d2eh1d3fh1dc1h1de9h1dfeh1dffh1e1dh34h1155h)
Any suggestions?
BR
Mikael
Hi,
Please take a look at the following links:
http://scn.sap.com/thread/3166761
http://scn.sap.com/thread/1653020
Hope it helps!
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
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.