Information on File Adapter
Hi,
I need to output data to a fixed length file. However, when i download the file and check the same on my local machine ..after writing 256 characters the file adapter is ignoring the rest of the data. Does any property need to be set in the adapter configuration for it to write record with lengths >256?
Any help is appreciated
Hi,
I need to output data to a fixed length file. However, when i download the file and check the same on my local machine ..after writing 256 characters the file adapter is ignoring the rest of the data. Does any property need to be set in the adapter configuration for it to write record with lengths >256?
Any help is appreciated
Similar Messages
-
Need information on File Adapter
Hi all,
I am passing more than 25 lines of payload to be written in the file using File Adapter. But i see only the first line written on the file.
Is there any configuration to be setup in the file adapter configuration so that all the contents are written in the file. Please advicePls find below the xsd:
<?xml version = '1.0' encoding = 'UTF-8'?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.api.org/pidXML/v1.1" xmlns:pidx="http://www.api.org/pidXML/v1.1">
<xs:element name="Invoice">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:InvoiceProperties"/>
<xs:element ref="pidx:InvoiceDetails"/>
<xs:element ref="pidx:InvoiceSummary"/>
</xs:sequence>
<xs:attribute name="transactionPurposeIndicator" use="required" form="qualified" type="xs:NCName"/>
<xs:attribute name="version" use="required" form="qualified" type="xs:decimal"/>
</xs:complexType>
</xs:element>
<xs:element name="InvoiceProperties">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:InvoiceNumber"/>
<xs:element ref="pidx:InvoiceDate"/>
<xs:element maxOccurs="unbounded" ref="pidx:PartnerInformation"/>
<xs:element ref="pidx:InvoiceTypeCode"/>
<xs:element ref="pidx:PrimaryCurrency"/>
<xs:element ref="pidx:ServiceDateTime"/>
<xs:element ref="pidx:ReferenceInformation"/>
<xs:element ref="pidx:Comment"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="InvoiceNumber" type="xs:NCName"/>
<xs:element name="InvoiceDate" type="xs:NMTOKEN"/>
<xs:element name="PartnerInformation">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:PartnerIdentifier"/>
<xs:element ref="pidx:PartnerName"/>
<xs:element ref="pidx:AddressInformation"/>
<xs:element ref="pidx:ContactInformation"/>
</xs:sequence>
<xs:attribute name="partnerRoleIndicator" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="PartnerIdentifier">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="partnerIdentifierIndicator" use="required" type="xs:NCName"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="PartnerName" type="xs:string"/>
<xs:element name="ContactInformation">
<xs:complexType>
<xs:choice>
<xs:element ref="pidx:ContactIdentifier"/>
<xs:element ref="pidx:ContactName"/>
</xs:choice>
<xs:attribute name="contactInformationIndicator" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="ContactIdentifier">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:NCName">
<xs:attribute name="contactIdentifierIndicator" use="required" type="xs:NCName"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="ContactName" type="xs:string"/>
<xs:element name="InvoiceTypeCode" type="xs:NCName"/>
<xs:element name="PrimaryCurrency">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:CurrencyCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Comment" type="xs:NCName"/>
<xs:element name="InvoiceDetails">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:InvoiceLineItem"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="InvoiceLineItem">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:LineItemNumber"/>
<xs:element ref="pidx:InvoiceQuantity"/>
<xs:element ref="pidx:LineItemInformation"/>
<xs:element ref="pidx:PurchaseOrderInformation"/>
<xs:element ref="pidx:JobLocationInformation"/>
<xs:element ref="pidx:Pricing"/>
<xs:element ref="pidx:AllowanceOrCharge"/>
<xs:element ref="pidx:Tax"/>
<xs:element ref="pidx:LineItemTotal"/>
<xs:element ref="pidx:ServiceDateTime"/>
<xs:element ref="pidx:PaymentTerms"/>
<xs:element maxOccurs="unbounded" ref="pidx:ReferenceInformation"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LineItemNumber" type="xs:integer"/>
<xs:element name="InvoiceQuantity">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:Quantity"/>
<xs:element ref="pidx:UnitOfMeasureCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Quantity" type="xs:decimal"/>
<xs:element name="LineItemInformation">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:LineItemIdentifier"/>
<xs:element ref="pidx:LineItemDescription"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LineItemIdentifier">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="identifierIndicator" use="required" type="xs:NCName"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="LineItemDescription" type="xs:string"/>
<xs:element name="PurchaseOrderInformation">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:PurchaseOrderNumber"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PurchaseOrderNumber" type="xs:string"/>
<xs:element name="JobLocationInformation">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:WellInformation"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="WellInformation">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:WellIdentifier"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="WellIdentifier" type="xs:NMTOKEN"/>
<xs:element name="Pricing">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:UnitPrice"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="UnitPrice">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:MonetaryAmount"/>
<xs:element ref="pidx:UnitOfMeasureCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AllowanceOrCharge">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:AllowanceOrChargePercent"/>
<xs:element ref="pidx:AllowanceOrChargeTypeCode"/>
</xs:sequence>
<xs:attribute name="allowanceOrChargeIndicator" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="AllowanceOrChargePercent" type="xs:integer"/>
<xs:element name="AllowanceOrChargeTypeCode" type="xs:NCName"/>
<xs:element name="Tax">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:TaxTypeCode"/>
<xs:element ref="pidx:TaxLocation"/>
<xs:element ref="pidx:TaxRate"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TaxTypeCode" type="xs:NCName"/>
<xs:element name="TaxLocation">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:AddressInformation"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TaxRate" type="xs:integer"/>
<xs:element name="LineItemTotal">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:MonetaryAmount"/>
<xs:element ref="pidx:CurrencyCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PaymentTerms">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:Discounts"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Discounts">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:DaysDue"/>
<xs:element ref="pidx:DiscountsDueDate"/>
<xs:element ref="pidx:PercentDiscount"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DaysDue" type="xs:integer"/>
<xs:element name="DiscountsDueDate" type="xs:NMTOKEN"/>
<xs:element name="PercentDiscount" type="xs:integer"/>
<xs:element name="InvoiceSummary">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:TotalLineItems"/>
<xs:element ref="pidx:InvoiceTotal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TotalLineItems" type="xs:integer"/>
<xs:element name="InvoiceTotal">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:MonetaryAmount"/>
<xs:element ref="pidx:CurrencyCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AddressInformation">
<xs:complexType>
<xs:sequence>
<xs:sequence minOccurs="0">
<xs:element ref="pidx:POBoxNumber"/>
<xs:element ref="pidx:BuildingHouseNumber"/>
</xs:sequence>
<xs:sequence minOccurs="0">
<xs:element ref="pidx:StreetName"/>
<xs:element maxOccurs="unbounded" ref="pidx:AddressLine"/>
<xs:element ref="pidx:CityName"/>
</xs:sequence>
<xs:element ref="pidx:StateProvince"/>
<xs:sequence minOccurs="0">
<xs:element ref="pidx:PostalCode"/>
<xs:element ref="pidx:PostalCountry"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="POBoxNumber" type="xs:NCName"/>
<xs:element name="BuildingHouseNumber" type="xs:NCName"/>
<xs:element name="StreetName" type="xs:NCName"/>
<xs:element name="AddressLine" type="xs:NCName"/>
<xs:element name="CityName" type="xs:NCName"/>
<xs:element name="StateProvince" type="xs:NCName"/>
<xs:element name="PostalCode" type="xs:string"/>
<xs:element name="PostalCountry">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:CountryCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CountryCode" type="xs:NCName"/>
<xs:element name="CurrencyCode" type="xs:NCName"/>
<xs:element name="ServiceDateTime">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:NMTOKEN">
<xs:attribute name="dateTypeIndicator" use="required" type="xs:NCName"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="ReferenceInformation">
<xs:complexType>
<xs:sequence>
<xs:element ref="pidx:ReferenceNumber"/>
<xs:element ref="pidx:Description"/>
</xs:sequence>
<xs:attribute name="referenceInformationIndicator" use="required" type="xs:NCName"/>
</xs:complexType>
</xs:element>
<xs:element name="ReferenceNumber" type="xs:string"/>
<xs:element name="Description" type="xs:string"/>
<xs:element name="UnitOfMeasureCode" type="xs:NCName"/>
<xs:element name="MonetaryAmount" type="xs:decimal"/>
</xs:schema> -
Hi All,
Can you please share some useful information on File Adapter? Is it possible to make use of 2 or more file adapters in a single BPEL Process.
Scenario is:
First to read a file from one location.
Has to place the reaqd file in a different location.
Club this file with other file in a differnt location, and put that clubbed/merged file in a different location.
EX: Read from A
Write to B ( Read another file in B and merge the file A content with in it)
PLace the (A+B) file in location c with in a different Location.
Is it possible to read or write a file of size more than 10 MB, how much size does a File Adapter supports? how to read or write files of more size ( more than 10 MB Size)?
Edited by: user12679330 on Aug 3, 2010 5:35 AMhi',
Read file1 copy the contents to temp_file1, then write that to locationA, in the same process do a synchronous read for file2 and copy the contents to temp_file2, now while writing the file back with contents (file1+file2) you will require a new XSD which will have mapping for both the file elements, and then you can pass the value of temp_file1 and temp_file2 to this file adapter.
-Yatan -
File Adapter Fixed Field Length
Hello,
I have the following problem. The file that is being generated is fixed length. However, there is no "\n" end line character in the end of each record. It is one big row of data. Is there any way to separate such file into records of information using File Adapter, since it seems with no "\n", File Adapter always has just ONE record.
Thank you for your help,
Dmitriy MindichWe're running J2EE.
Specifying 'nl' is newline - I don't have newline, just one gigantic stream...
Example -
Row contains Header(1), Line(n)
All records are fixed-width
Header has 3 fields
===================
RecordType 3 chars (this is the key - indicated by 450)
OrderNum 5 chars
Order Type 2 chars
Line has 3 fields
===================
RecordType 3 chars (this is the key - indicated by 475)
LineNum 4 chars
PartNo 5 chars
So the data would look like this
450Ord01ZS4750001PartA4750002PartB
This would be an order w/ 2 lines. If I send this stream in, only the header is read, the lines are dropped, and my mapping fails b/c the lines need to be there. -
File Adapter - special character in Filename
Hi,
i have a question concerning file adapter.
Scenario: we are polling files via file sender adapter (FTP).
Problem: if the filename contains a special character, an error is thrown with 'The System cannot find the file specified'
Scope: Special character in filename (not in payload)
Installed: XI 3.0 SP 19 on Linux
Questions:
- what FTP implementation does XI use?
- What do i have to check/upgrade to unicode?
- is it an OS problem or an Java problem or a XI problem?
- or is it not possible copiing files with special characters in filename?
Thank you very much in advance.
MichaelHi Michael,
The file/FTP adapter supports both passive and active FTP data connection. You can select the data connection while configuring the adapter.
The file/FTP adapter follows specification RFC 959. The specification can be found on the Internet under www.ietf.org/rfc/rfc0959.txt.
For FAQs about the file/FTP adapter, see SAP Note 821267. Please note that you'll need an account to log in on service.sap.com.
Question: How are you specifiying the file name? i.e. Are you using placeholders, like ?, *, *.txt, etc ?
If there's a problem with the filenames, then it should be a problem in the JAVA implementation of the adapter I assume. So you could for instance build your own adapter extension to by-pass that problem.
Just for your information; I haven't encounter a problem with filenames in other projects.
Good luck! -
Unzip file using PayloadZipBean in Sender FILE adapter
I am trying to unzip a flat file in Sender FILE adapter using PayloadZipBean.
I am getting mapping error. The problem is File adapter is reading data without unzipping. I am getting weird characters/data, so mapping error.
I searched all the blogs/ forum threads and help.sap.com, everywhere the focus is on zipping, not unzipping.
the file I have is with .gz extension, but I tried with .zip extension also.
Please help in resolving this issue.
Edited by: Gopal Janagama on May 2, 2008 11:42 PMGopal,
GZIP and ZIP format are slightly different, as stated here :
"GZIP compresses only one file and does not have a header. ZIP contains header information about what files are contained in the file."
So I'm not sure the PayloadZipBean supports GZIP format ... Try to ungzip and then zip its content and see if the bean works for it
Rgds
Chris -
Date and Time in Sender File Adapter Target Directory
Hi there,
is there a way of using Date and Time from XI to the Target Directory naming? To use variable substitution some fields of the message had to contain that date and time information, which is not our case.
For filename you can use "add time stamp" option, but and for target directory?
Thanks and regards,
Henrique.> <i>Do you have further information on how to perform
> this with shell commands?</i>
> >> You need to write a shell script. This script will
> add the date/time stamp into the folder in the target
> system. This shell script is executed from the File
> adapter. So once the file is written into the target
> directory, then it will rename the directory.
Hi there, Moorthy
We've tried to write that shell script that you mentioned, but now we have a few doubts on how to make it create the proper directory.
In the file adapter, my target directory is "/%var1%/%var2%/", where %var1% and %var2% are variable substitutions, referencing data which comes from the payload. Now, I need the shell script to append "/<Year>/<Month>/" in the target directory. But where to archive the script? If it stays in the root directory, than how to make it create "/<Year>/<Month>/" folders inside a directory which is variable (/%var1%/%var2%/)?
Is there a way of passing %var1% and %var2% as parameters for the shell script?
Thanks a lot,
Henrique. -
Multiple directory locations in Sender File adapter
Hi All,
I have a scenario where my single adapter needs to poll from 7 different directory locations. Is it posible to configure all seven sorce directory location in single sender file adapter.
Regards,
XierHi,
I apologize for wrong information, actually I never tried but it's possible after seeing this.
Note:821267
11. File Sender: Processing Multiple Source Directories
Q: Can the File Sender Adapter be configured to poll multiple source directories from a single channel?
A: This functionality is available starting with XI 3.0 Support Package 14 as well as PI 7.0.
raj. -
Variable Substitution settings for Receiver File Adapter
Hi All,
I wanna use variables for File Name Sheme in the File Access Parameters.I had used by enclosing the variable names within %. When i wanna substitute values for those variables, it is given in the documentation(help.sap.com) that v need to set the Enable indicator. only after setting the indiactor, v can use the variables and can then enter the values for those variables in a table. but i can't see either the indicator or the table in my editor. how can i provide the values for the variables used in file name scheme/Target Directory. and for ur information,i'm using sp12.
any help wud b appreciated.
thnx
AnilHi Anil,
Please check out the following link ...
Re: Variable substitution - Pseudo Path Variable - file adapter
Re: Variable substitution problem
Regards,
Raj -
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 -
Dynamic File name in File Adapter
Hi,
I have a requirement to pass dynamic file name in File Adapter.
Is there any way to pass a variable for the file name attribut in file adapter.
I am looking for some options apart from %yyMMddHHmmss%,%SEQ%...etc
Please suggest if any of you have information on how to put values from a variable to file name attribute in file adapter
regards
SaijuHi Saiju,
Yes there is.
Assign your file name to a variable, let's say 'fileName'.
Now go to your invoke activity(for the specific fileadapter) -> Property tab-> find a property call jca.file.FileName -> in the value field assign 'fileName' variable.
That's it... (assuming you are using 11g)
Arik
Edited by: Arik on Jun 27, 2012 3:12 PM -
Receiver File Adapter - Adapter Engine
I am able to read files using Sender File Adapter. But when I try to write a file using Receiver File Adapter I get the following erro:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!--
Call Adapter
-->
- <SAP:Error xmlns:SAP="<http://sap.com/xi/XI/Message/30>" xmlns:SOAP="
<http://schemas.xmlsoap.org/soap/envelope/>" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
<SAP:P1>af.exi.usxid</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>3: No service user name found for Integration
Server is.00.usxid</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error when reading the access data (URL, user, password)
for the Adapter Engine af.exi.uswalexi</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I tried executing the function module SAI_AE_DETAILS_GET but I am not getting the error URL Not found. This was working in the past. We upgraded to SP15 this showed up again.
Any help appreciated.I'm working on integration of SAP with 3rd party application. While sending data from SAP to XI, i'm getting the following error which i've found in sxmb_moni (XML Message->Call Adapter).
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<!-- Call Adapter --> -
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
<SAP:P1>af.xp1.sapxi</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>3: No service user name found for Integration Server is.00.sapxi</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error when reading the access data (URL, user, password) for the Adapter Engine af.xp1.sapxi</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Plz help me to solve this issue. If possible mail me the solution to my personal email-id [email protected]
Note:
1. We are using CIM 1.3
2. In XI Server Message Monitoring, i'm getting the System Error message in Integration Engine.
3. In Payloads, i'm getting the required information in XML format as desired.
Thanks in advance.
Regards,
Navaneeth.S -
Receiver file adapter not responding
Hi guys,
I have 2 interfaces in XI development system that make use of receiver file adapter in order to receive some .txt files. Although these communication channels used to work until yesterday, for some strange reason they stopped functioning, but only in development system. However, I cannot see any error in Runtime Workbench (Communication channel monitoring), it's status is "correctly configured and started" and has a green sign. But, when I sent a file from sender adapter, it is sent correctly, but it never gets received from receiver communication channel.
There is no error in SXMB_MONI either.
In XI production system, the same interfaces are functioning well.
Any ideas?
Best Regards
--EvaggelosHi Amit,
I went into Message Monitoring for this interface and I can see all the messages for the last 24 hours that should be written into a file that have status "to be delivered".
When I go into Details -->Audit Log for a single message:
2007-06-13 11:49:33 Success Processing child message of multi-message with message ID ff896d50-198a-11dc-cdfa-00145e694b16
2007-06-13 11:49:33 Success Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
2007-06-13 11:49:33 Success Message successfully put into the queue.
And in Message Data there is the following information:
Status To Be Delivered
Repeatable Yes
Cancelable Yes
Error Category
Error Code
Start 13.06.2007 11:49:33
End
Sender Party
Sender Service TPBS_GR
Receiver Party
Receiver Service TPBS_GR
Interface http://famar.gr:LoyaltyDataMNSToSRS
MI_LoyaltyDataMNSToGR_IB
Quality of Service Exactly Once
Message b2685674-7626-5141-bfa1-13155ad0d25a
Reference
Conversation ID
Serialization Context
Direction INBOUND
Message Type Recv
Profile XI
Connection File_http://sap.com/xi/XI/System
Transport HTTP
End Point http://fmgralxi01:50000/MessagingSystem/receive/AFW/XI
Authorization
Sequential Number 0
Number of Retries 3
Failed 0
Retries 300000
Valid to
Persist Until 13.07.2007 11:49:33
Schedule Time 13.06.2007 11:49:33 -
Receiver File Adapter - FTPEx: 550 Access denied
Hi Experts,
In my receiver file adapter scenario I'm getting 550 Access denied in RWB.
I am a little confused here because I could access the FTP client from my desktop using the same User and Password informed in the Receiver CC. I also could drag and drop a file there.
Here you have Detail Display in RWB, it seems that at least the user is working fine for PI also:
Success: Connecting to FTP server "<FTP IP>"
Success: Write to FTP server "192.168.10.85", directory "\Transportadoras\10326750000101\", file "Nfe_teste.xml"
Success: Transfer: "TXT" mode, size 8881 bytes, character encoding UTF-8
Error: Attempt to process file failed with An error occurred while connecting to the FTP server '192.168.10.85:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Access denied.'. For details, contact your FTP server vendor.
Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: An error occurred while connecting to the FTP server '192.168.10.85:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Access denied.'. For details, contact your FTP server vendor.
Regards,
Daniela
Edited by: Daniela Machado on Aug 11, 2010 10:18 PMHi Daneial,
This is an issue due to any firewall or proxy between your Xi system and the FTP.In this case the direct logon
works with same user but when XI tries to create file at runtime you get this error due to network issues.
To resolve this contact your Basis/Network guys and
1. Set the permissions to FTP User you are using as 777 rights(full access to read , write and delete)
2.If you have access to PI server, try to telnet /connect to ftp using command prompt (open ftp .....) the FTP server form there, you should see the same error there , inform this to your network guys.
3.Clear all the files places already in the ftp (take backup) and test afresh after permissions are set by basis team.
Regards,
$rinivas -
Dynamic file name (Date) in Receiver File Adapter
Hi,
can any one tell me how to create outbound file name with receiver file adapter in format like Name_22-08-2006.dat. I need from a current Date in the name of the message (without any other information). In message payload I dont have that date. Is it possible to use variable from user defined function in message mapping for that name?
Regards,
NaychoNaycho,
that's exactly what I've managed to perform using DynamicConfiguration. Check these links:
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm
Particularly, I've created a Java API for using setDirectory and setFileName methods through mappings. I use XSLT with java enhancement because it's a million times easier to parse and get node values with XSL than pure java.
I'm writing a blog on the subject, if you don't resolve the problem until it's out, let me know.
Regards,
Henrique.
Maybe you are looking for
-
I recognize the two "unwanted" folders but have no idea how they got in the library. In the past year I have had two major computer crashes. The last one required a complete reformatting of my formerly partitioned hard drive. I think the file restore
-
Where can I get a cable to connect my 2nd generation iPod to a USB port on a Windows PC?
My wife wants to give her old iPod to her sister but we don't have a cable that will connect to a PC's USB port. Are there adapters or something similar available that will enable our old 2nd generation iPod to communicate with a PC via a USB connec
-
PCs not showing in Collection/Queries Config Manager 2012 R2 - Direct Rule
Hello, I have been creating some collections and queries using a direct rule or manual entry of the device and the PC is not showing in the collection. Example: Created collection for a .NET 4.5.2 install that I rolled out. Manually added the devi
-
IDoc Extension: Finding out user exit
Hi, Is there any standard way of finding out user exit for the extended IDoc? like documentation... Thanks and Regards, Madhu
-
Hi, I'm receiving following error while sending message to an ftp link from BizTalk 2010 in production. Unable to connect to FTP server "ipaddress" as user "username". Inner Exception details: "No FTP server found on the specified address. ". Previou