Need fcc configuration on receiver file adapter
Hi,
I am working on file to file scenario using fcc. My source file is picking propely in sxmb_moni its showing properly. but output file is not placing in target directory.
My output record structure iss
Target..1.1(nodE)
detail 0..unbounded
field1 length 15
field2 length 10
field3 length 14
trailer 1...1
field1 length 5
field2 length 2
for this how would i configure reciver fcc at the same time please mention me the properties.
Thanks,
enivass
Hi,
Do you need to convert from XML to Plain Text file? Or simply output the XML?
If you need to convert your XML back to plain you should go with something like that:
XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion
XML2Plain Transform.ContentType text/plain;charset=utf-8
XML2Plain xml.conversionType StructXML2Plain
XML2Plain xml.addHeaderLine 0
XML2Plain xml.recordsetStructure DT_Header,1,DT_Detail,*,DT_Trailer,1
XML2Plain xml.DT_Detail.fieldFixedLengths 15,10,14
XML2Plain xml.DT_Detail.fixedLengthTooShortHandling Cut
XML2Plain xml.DT_Trailer.fieldFixedLengths 5,2
Reference:
http://help.sap.com/saphelp_nw04/Helpdata/EN/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
Similar Messages
-
Need how to configuration on Receiver File adapter
Hi,
I am working on File to File scenario. I need to create a file in output directory with time stamp.
I am also need to create File output directory.
I used create target directory. But the file is not creating in the directory.
Please help me on this issue.
Thanks,
SwathiHi Swathi,
1. To have the file with the Timestamp, use the option "Add Timestamp" in File construction mode.
2. Check the receiver communication channel and in MONI. If the file is not created and is successful in MONI, then the message might stuck in Queue. Check the queues.
Ensure the provide target directory path is correct.
Check this: /people/shabarish.vijayakumar/blog/2007/07/26/troubleshooting-the-file-adapter-last-updated-on-02-july10
Thanks, -
Dyanamic Configuration at receiver file adapter determine target directory
Hi Experts,
I have a requirement to determine the target directory during runtime.
From the source side one particular field determine the Target directory where you need to place file
ECC - PI - File adapter - this is the scenario
In target side 3 directories in the same server . but the directory should determine from source fields - werks
As I am new to PI Please describe the procedure in detail.
Thanks in advance.
KevinHi Kevin,
Use the below UDF and map to the rootnode in the message mapping.
public String GetFileName(Container container){
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
In the Advanced tab of the File adapter, check the option Adapter Specific Message Attributes. Under that, check the Filename option.
This would get the fieldname in the target filename.
Check the below link:
/people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot
http://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/frameset.htm
/people/shabarish.vijayakumar/blog/2007/07/26/troubleshooting-the-file-adapter-last-updated-on-02-july10
Thanks, -
RECEIVER FILE ADAPTER FCC ERROR
Hi team
My scenario is a text file has to be picked up by PI, has to processe it and the receiver is Proxy and it has to get updated and sent back to FTP location.
i am using Sender File Adapter with FCC and Also receiver File Adapter with FCC.
Both the sender and receiver structures are same; i am using the same FCC parameters for both the sides.
in Receiver File Adapter i am getting the following errors
1) Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
2)Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
please help me out
thank you
Edited by: vemugantivn on Aug 16, 2010 12:19 PMHi,
> 1) Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
> Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
> 2)Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
> Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
It is saying that you are not using the fieldSeparator parqameter.
have you provided the field separator parameter? if not then give like below
order_row.fieldSeparator : , (give what ever the separater you are using)
or
order_row.fieldSeparator : 10,5,... (if you are using fixed length)
Regards
Ramesh -
FCC Parameters are required in the Receiver File Adapter
Hi ,
Sorry for posting this question again.. my Structure is
MT_CADVICE_STRING
. . Batach -
1:Unbounded (Node)
. . .Header_String -
1:1
. . .Line_Item -
1:Unbounded (Node)
. . . .LineItem_String -
1:1
for this structure I'm geting data in the XML format.. .. my scenario is simple File to File scenario.. now i want to convert this XML to a normal Text file by using FCC in the Receiver file adapter..
and in the Receiver side i want the file in the bellow format: (each field i want to get in the separate line but at presnt I'm getting the continution of all lines I'm not getting the data in a separate lines..)
Header_string
LineItem_String
LineItem_String
Header_String
LineItem_String
so, any abody can help on this...
And in the Receiver Communication channel i keep the FCC parameters like as bellow :
RecordsetStructure : Batch,LineItem
Batch.fieldSeparator: 'nl'
LineItem.fieldSeparator: 'nl'
Batch.endSeparator: 'nl'
LineItem.endSeparator: 'nl'
For more information.. My source file is like bellow
<?xml version="1.0" encoding="utf-8" ?>
- <nr1:MT_CADVICE_STRING xmlns:nr1="urn:Test.com:SD:CAdvice">
- <Batch>
<Header_String>1 B 1110300014200804108218 36892.80 03 10.000 10.000 0.00 0.00 008000021720080410558000.00 91958.40 649958.40 0.00 649958.40 2678.40 1000003461100000346110000034611000003461123456 18 18 0.00 $</Header_String>
- <LineItem>
<LineItem_String>2 B 1110300014 1 000000000001234567000000000001 5.000 0.00 45000.00 10800.00.00 16.00 279000.00 0.00 rcl/ML0080200804100000000357 200804100.00 01 02 000000002.00 860.13321.00 $</LineItem_String>
</LineItem>
- <LineItem>
<LineItem_String>2 B 1110300014 2 000000000001234567000000000001 5.000 0.00 45000.00 10800.00.00 16.00 279000.00 0.00 rcl/ML0080200804100000000357 200804100.00 01 02 000000002.00 860.13321.00 $</LineItem_String>
</LineItem>
</Batch>
</nr1:MT_CADVICE_STRING >
Regards
JainHi jain
Provide as below definitely it will work,
RecordSet Structure : batch,Line_Item,LineItem_String
batch.fieldSeparator --- 'nl'
Line_Item.fieldSeparator -
'nl'
LineItem_String.fieldSeparator --- 'nl'
All your fields will come in a separate line.
Regards,
Sasi
Edited by: sasitharan on Jul 28, 2008 11:36 AM -
Configuring the Receiver File/FTP Adapter !!
Hi
I am trying to configure the Receiver file adapter using the J2SE adapter engine(Please note , NOT the J2EE adapter engine).I see a prerequisite for configuring as below
"The address (HTTP port and URL) where the adapter can be contacted from the Integration Engine".
What values are to be specified and how can they be validated ?
I could see an example given in the Docs saying below,
If i specify , say for example,
"XI.httpPort=1234 and
XI.httpService=/file/Receiver, the end point address of the file/FTP adapter in the Integration Engine must be specified as follows:
http://<fileadapterhost>:1234/file/Receiver"
Can anyone explain what exactly is this endpoint address and where should it be specified/referred to ?
Thanks
SaravanaHi,
"http://<fileadapterhost>:1234/file/Receiver"
this adress refers to an end point with the end point type "xi-connectivity" in the integration directory (ID)which refers to the settings in the file adapter (httpPort=1234 and XI.httpService=/file/Receiver)
1. you specify these adress in the file adapter (outbound)
2. you refer to these adress in the ID (Receiver System End points)
every file adapter should have an own port, because you can not specify two identical ports in two fileadapters.
hope I could help you,
michele
Message was edited by: Michele Mangieri
Message was edited by: Michele Mangieri -
Hi
I have configured a receiver file adapter to send an XML message to a file directory.
The structure is
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_SiteDetails_MM xmlns:ns0="urn:Retail.net:SiteDetails">
- <ROWSET>
- <ROW>
<ext_cust_id>0003009996</ext_cust_id>
</ROW>
</ROWSET>
</ns0:MT_SiteDetails_MM>
How do I get the line - <ns0:MT_SiteDetails_MM xmlns:ns0="urn:Retail.net:SiteDetails">
out of the message. Is it possible.
Can I use file content conversion.
any help is appreciated.
JoeHi,
>>> have configured a receiver file adapter to send an XML message to a file directory
If i understand it correctly, you need to send X.XML to some directory you configured and you want to do something with <ns0:MT_SiteDetails_MM xmlns:ns0="urn:Retail.net:SiteDetails">.. If i am right, you can use Run OS command after processing option at receiver file adapter.
Write one Shell script and do whatever you want to do with this file. Remove line, add something or anything.
Regards
Aashish Sinha -
Output CSV File Naming Convention - Receiver File Adapter
Dear SAP experts,
I need help regarding my scenario.
My scenario is this, Customer will send EDI message to XI. XI will then translate the message and convert it into XML.. After, a Receiver File Adapter will receive the XML then convert it into .csv file.
I've already configured the Receiver File Adapter to convert the XML into .csv file.
But, my problem now is how will I configure to have my output .csv file has a File Naming Convention.
The output .csv file must be "CustomerName_YearMonthDate".
From the EDI message, there is indicated Sender GLN in which, each customer has its own Sender GLN.
E.g., Globus --> 200, Karstadt --> 300, Metro --> 400.
How will I configure so that I can have an output .csv file of,
If Globus sends the EDI message, the output .csv file is Globus_20080304.csv.
If Karstadt, Karstadt_20080304.csv.
If Metro, Metro_20080304.csv.
Kindly advise for a clear and complete solution.
Thank you very much for your usual support.
FredHi Nisar,
My target message (XML) in the mapping is this,
- <ns0:CSV>
- <SLI>
<PERIO> </PERIO>
<ILN> </ILN?
<EAN> </EAN>
perio, iln, and ean was rooted on SLI field. and the CSV is the rootnode of the target message.
I have created a UDF on the message mapping to accomodate the output customer name, here is the codes:
String fname="";
if(GLN.equals("23456"))
fname ="Globus" +dat;
else if(GLN.equals("5678"))
fname ="Karstadt"+dat;
else if(GLN.equals("6789"))
fname ="Metro"+dat;
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/File",
"FileName");
conf.put(key,fname );
E.g.,
Globus --> 23456 (Sender GLN)
Karstadt --> 5678 (Sender GLN)
Metro --> 6789 (Sender GLN)
This UDF i've made in the Message Mapping was mapped in the root node CSV.
Is this UDF correct?
Then on the File Receiver Configurations, here are the configs,
Transport Protocol: File System (NFS)
Message Protocol: File Content Conversion
Adapter Engine: Integration Server
File Access Parameters
Target Directory: /var/opt/gsss/sample/csv
File Name Scheme: .csv
Processing Parameters
File Construction Mode: Create
- Overwrite Existing File
Write Mode: Directly
File Type: Text
Variable Substitution --> ???
Adapter Specific Message Attributes
- Use Adapter-Specific Message Attributes
- Fail if Adapter-Specific Message Attributes Missing
- File Name
Run Operating System Command After Message Processing
Command Line: chmod 664%F
Content Conversion Parameters
Recordset Structure: SLI
SLI.addHeaderLine: 3
SLI.headerLine: PERIO;ILN;EAN
SLI.fieldSeparator: ;
SLI.endSeparator: 'nl'
Adapter Status:
Status: Active
Kindly advise if my configs are correct.
Thank you very much!
Fred -
REG: File content conversion in Receiver file adapter
HI Gurus,
I have the scenario like proxy to file with content conversion
my message type for the source like this
MT_SOURCE
-----||
|---ROW
------------||
|---LINE
target strucuture also same
MT_TARGET
-----||
|---ROW
------------||
|---LINE
i am using the following FCC parameters in receiver file adapter
LINE.fieldSeparator = ' '
LINE.fixedLineWidth = 90
LINE.lineSeparator = 'nl'
LINE.fieldFixedLengths = 200
LINE.endSeparator = 'nl'
the output file show the data differently in note pad when compare to word
word output
dgepvs 023456987
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
notepad out put
dgepvs 023456987 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01
word output is the correct output wat i am expect but same out put i want in note pad can any help me out for this how can i resolve this
Thanks in advanceThere is nothing wrong in your content conversion parameters. This is pure editors interpretation for the next line character.
I would do in java program to fix this issue using '\r\n' You might want to try and see how that helps for notepad editor. -
Receiver File Adapter J2SE Adapter Engine
Hi,
We have configured a receiver file adapter on a J2SE adapter engine through the administrator page of the J2SE adapter.
XI.httpPort=8222
XI.httpService=/file/Receive
and the rest of the adapter parameters.
I have configured a channel in ID as XI receiver adapter.
host: "hostname"
Service: 8222
Path Prefix: /file/Receive
The messages in sxmb_moni fail to be delivered with "HTTP error 404 Resource not found."
Through a browser I am also not able to make a connection to this url:
"host":8222/file/Receive
Getting Http error "501".
Please can someone shed some light on this problem.
Regards
Willie Hugo>Through a browser I am also not able to make a connection to this url:
>"host":8222/file/Receive
>Getting Http error "501".
This is ok. Since get method not implemeted for this service.
Since from XI you are getting this error "HTTP error 404 Resource not found", can you logon to XI server at OS level and do a telnet test to check if the port is working.
cmd> telnet
telnet> open <J2SEAdpaterEngineHostName (or) IPAddress> 8222 -
Specifying current directory in Receiver File Adapter
Hi Experts,
I have been configuring a receiver file adapter to place a file onto an FTP server. As per the information provided, as soon as I login to the FTP server, I have to place the file in current logged in directory. In this case, how can I mention this in file adapter as to use the current directory path to place the file? What should I enter in 'Target Directory' in File Access Parameters?
Thanks,
DhawalHi Praveen,
Since file directory parameter is mandatory, my question is what should I enter in this parameter so that the file adapter will know that the file should be placed in the root directory itself?
Regards,
Dhawal -
New Line in EBCDIC file created by receiver file adapter
Hi mates,
I've configured the receiver file adapter to create a file in EBCDIC format by specifyin the File encoding 'Cp037'. When the file is viewed on the AS400 system using the command DSPPFM, it appears as a continuous text instead of line-by-line. I've tried specifying 0x0D(CR), 0x0A(LF), 'nl' as the endSeparator for the record type in content conversion, but no luck. Still the file looks like a continuous text.
I learnt from the following links that the New Line character (NL or NEL) in AS400 is Unicode '0x85'.
<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4867251">OutputStreamWriter/InputSreamReader convert NEL to linefeed with Cp037 encoding</a>
<a href="http://search.cpan.org/~guido/libintl-perl-1.16/lib/Locale/RecodeData/IBM037.pm#CHARACTER_TABLE">CHARACTER TABLE</a>
But when I specify this '0x85' as the endSeparator, I get the error below as 0x85 (decimal equivalent 133) is not part of the standard ascii code i.e. basic 127 codes
<i>Conversion initialization failed: java.lang.Exception: java.lang.NumberFormatException: Value out of range. Value:"85" Radix:16</i>
Is there any way I can produce the EBCDIC file with new line as end separator for records?
I appreciate your inputs.
thx in adv
praveenInstead of using binary mode for FTP and specifying encoding, endSeparator, I used the text mode and left the translation to the FTP server on AS400 system.
Desirably, it generated the file with right encoding and new line characters.
praveen -
FCC:Receiver File Adapter
Hi
This is regarding a FCC in receiver File Adapter
My requirement is as follows :
I have the following source structure
DT_Source
Structure
Field 1
Field 2
Field 3
The target file to be created will contain all the 3 fields mapped directly from the source.
but in additional to these 3 fields it will also contain 3 constants ..which aren't coming from the source.
Do I need to include that in the Target data type and map them as constant values in the mapping or can the addition of constant values be taken care of in the File Content conversion ?
thanks
DevThanks Shabarish
So you mean once i get a sample file , according to the blank spaces in the resultant i should have a corresponding field in my target Message type and map it toa constant white spaces ??
ok I have one last question
Can the FIle(on the receiver side ) be a mix of values which are fixed as well as variable lenghs ??
i.e
a typical line item in the file will be like this
Field1,Field2,Constant1, ,Constant2,Field3, ,Constant3,Field4,Constant4
where Field1 and Field3 are fixed length fields with the constants and field 4 and field5 are of variable lengths ????
thanks
Dev -
Configuring Receiver File Adapter for J2SE
Hi All,
I have a scenario in which i need to convert the IDOC data into a fixed length file.
I did mapping according to the output structure of the file.
My Output file format is as follows...
Document1 document2 document3 etc
Each document contains different fields with different lengths
In XI-FIle adapter we give Recordset structure : Document1,Document2,Document3.
But while configuring Receiver File adapter in J2SE.
There is no option mentioned in J2SE Adapter.
<b>http://saphelp.border-states.com/EN/95/bb623c6369f454e10000000a114084/content.htm</b>
Please throw some light on the same.
Thank You
Regards,
Reehanas far as i read the document, what i understood is that the J2SE adapter has a limitation.
your XML structure should be as mention in the link;
<i>To convert a table in XML format to pure text format, the document format must be the same as that which is generated by the sender file/FTP adapter in mode FILE2XMBWITHROWCONVERSION <i>(with the default value <row> for the structure)</i> and the sender JDBC adapter. This means that the document structure looks like this:
<resultset>
<row>
<column-name1>column-value</column-name1>
<column-name2>column-value</column-name2>
<column-name3>column-value</column-name3>
</row>
<row>
<column-name1>column-value</column-name1>
<column-name2>column-value</column-name2>
<column-name3>column-value</column-name3>
</row>
</resultset>
This is an example for 3 columns and 2 lines. The number of lines and columns is, of course, unlimited. <b>The XML elements in italics can be defined by the user and the elements of a line must be grouped within an element of type <row> </row></b>.</i>
So cannot take the <b>recordset structure</b> as we have for the normal File adapter. -
Need to get the Mail attachment name as it is to the receiver file adapter
I am doing a Mail to File scenario. I need to get the attachment from the mail and store it on the file server. I am using the PayloadSwap bean in the sender mail adapter. My requirement is to carry forward the attachement name as it is to the receiver file adapter side and store the file with the same name.
Did any one try doing this? I was looking at developing an adapter module but got struck as I could not find whether the attachement name is stored in the XI payload after it has got swapped using the swap bean.
Any help would be appreciated.
VJOops pressed the send key. Take two.
This is becoming a damn nightmare. When I run the adapter I am getting ModuleExceptions. Can you pass your eyes over these Java config settings to see what I am doing wrong. Using NWDS CE 7.1 with PI 7.1 both at SP07. All the imports were taken from PI 7.1 after SP07 was applied. The build id of NWDS is
SAP NetWeaver Developer Studio
SAP NetWeaver 7.1 Composition Environment SP07 PAT0001
Build id: 200901152336
APPLICATION.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>MailPOP_EAR</display-name>
<description>EAR description</description>
<module>
<ejb>MailPOP_EJB.jar</ejb>
</module>
</application>
APPLICATION-J2EE-ENGINE.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="service">engine.security.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">engine.j2ee14.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="service">com.sap.aii.af.svc.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="interface">com.sap.aii.af.ifc.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">com.sap.aii.af.lib.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">com.sap.base.technology.facade</reference-target>
</reference>
<fail-over-enable mode="disable" />
</application-j2ee-engine>
EJB-J2EE-ENGINE.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
<ejb-j2ee-engine>
<enterprise-beans>
<enterprise-bean>
<ejb-name>GetMailAttachment</ejb-name>
<jndi-name>GetMailAttachment</jndi-name>
<session-props/>
</enterprise-bean>
</enterprise-beans>
</ejb-j2ee-engine>
EJB-JAR.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>EJB JAR description</description>
<display-name>EJB JAR</display-name>
<enterprise-beans>
<session>
<ejb-name>GetMailAttachment</ejb-name>
<home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
<remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
<local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
<local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
<ejb-class>sample.GetMailAttachment</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
SENDER MAIL ADAPTER modules
1 AF_Modules/PayloadSwapBean Local EB 1
2 GetMailAttachment Local EB 2
3 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local EB 3
1 swap.keyName payload-name
1 swap.keyValue MailAttachment-1
RECEIVER FILE MODULES
1 localejbs/AF_Modules/DynamicConfigurationBean Local Enterprise Bean 1
2 localejbs/CallSapAdapter Local Enterprise Bean 2
1 key.0 write http://sap.com/xi/XI/System/File FileName
1 value.0 message.interface
VARIABLE FILENAME SUBST WITH ASMA TURNED ON
fName message:interface_name
JAVA SOURCE
package sample;
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import com.sap.aii.af.lib.mp.module.Module;
import com.sap.aii.af.lib.mp.module.ModuleContext;
import com.sap.aii.af.lib.mp.module.ModuleData;
import com.sap.aii.af.lib.mp.module.ModuleException;
import com.sap.engine.interfaces.messaging.api.Message;
import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
import com.sap.engine.interfaces.messaging.api.TextPayload;
import com.sap.engine.interfaces.messaging.api.XMLPayload;
import com.sap.aii.af.service.cpa.Channel;
@ejbHome <{com.sap.aii.af.lib.mp.module.ModuleHome}>
@ejbLocal <{com.sap.aii.af.lib.mp.module.ModuleLocal}>
@ejbLocalHome <{com.sap.aii.af.lib.mp.module.ModuleLocalHome}>
@ejbRemote <{com.sap.aii.af.lib.mp.module.ModuleRemote}>
@stateless
<code>GetMailAttachment</code>
@SuppressWarnings("unused")
public class GetMailAttachment implements SessionBean, Module {
private static final long serialVersionUID = 7612238514043673502L;
private SessionContext myContext;
private MessagePropertyKey myFileName;
public void ejbRemove() {
public void ejbActivate() {
public void ejbPassivate() {
public void setSessionContext(SessionContext context) {
myContext = context;
@throws CreateException
public void ejbCreate() throws CreateException {
public void getMessageProperty(MessagePropertyKey FileName) {
myFileName = FileName;
@param moduleContext
Contains data of the module processor that might be important
for the module implementation such as current channel ID
@param inputModuleData
Contains the input XI message as principal data plus eventual
set supplemental data
@return ModuleData Contains the (changed) output XI message. Might be the
response message if the module is the last in the chain.
@exception ModuleException
Describes the cause of the exception and indicates whether
an retry is sensible or not.
@SuppressWarnings("deprecation")
public ModuleData process(ModuleContext moduleContext,
ModuleData inputModuleData) throws ModuleException {
try {
Message msg = (Message) inputModuleData.getPrincipalData();
TextPayload payload = msg.getDocument();
String contentType = payload.getContentType();
// Content Type could be something like
// text/plain;charset="UTF-8";name="file.txt"
contentType = contentType.replaceAll("\"", "");
int i = contentType.lastIndexOf("=") + 1;
String fileName = contentType.substring(i);
msg.setMessageProperty(myFileName, fileName);
inputModuleData.setPrincipalData(msg);
} catch (Exception e) {
return inputModuleData;
JAVA ERRORS
2009-02-04 11:41:14 Information Mail: calling the module processor for channel LMK_Common_Mail_Sender
2009-02-04 11:41:14 Information Swap: swapping by payload-name ? MailAttachment-1
2009-02-04 11:41:14 Information Swap: successfully swapped
2009-02-04 11:41:14 Information Mail: message leaving the adapter (call)
2009-02-04 11:41:14 Information The application tries to send an XI message asynchronously using connection AFW.
2009-02-04 11:41:14 Information Backward validation is enabled
2009-02-04 11:41:14 Error Unable to validate the message with message ID 8702df71-f254-11dd-9b9b-001a64a73518
2009-02-04 11:41:14 Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
2009-02-04 11:41:14 Error Mail: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
2009-02-04 11:41:14 Error Mail: error occured: com.sap.aii.af.lib.mp.module.ModuleException
Maybe you are looking for
-
Well I just purchased another Retina mbp 15 and this ones a keeper (sold 2 before this was just looking for a mint one). Now my issue is I cant get ilife (in particular imovie and iphoto) without purchasing it and I dont want to do that.... yet. I d
-
How to get photos from camera or memory card into new macbook?
how to get photos from camera or memory card into newly announced macbook? thank you joanlvh
-
Maintaining global lists for ComboBox values
I would like to maintain multi-lingual lists of allowable categories to be used in ComboBox controls. The values for these lists should be stored external to the application or at some global level to that they can be maintained by someone who is not
-
How to run a java program in another folder
Hello! I want to run for example the java class file in the path ./sourcecode/javafile.class. It works fine if I do the following: cd sourcecode java javafile but it cannot work if I do: java sourcecode/java The error it outputs is NoClassDefFoundErr
-
2007 iMac, replaced hard drive, can't recover old files from old hard drive!
So I have a 2007 intell imac, the hard drive went out, I replaced it and bought a thermalake blacx hard drive doc to get my files off the old hard drive. I run Disk Utility, it can see the old hard drive but it can't repair it or verify it. Do I ne