File Adapter Module - Change name of Generated File
Hello all,
My customer has XI v3.0 SP9. For the moment an upgrade is not envisaged.
Since SP14 it is possible to dynamically change filename generated with receiver File adapter. This is done with a manipulation during mapping and a configuration in adapter.
As I am in SP9, is there another solution, by example using a module processor ?
My XML :
<root>
<lineFile>....</lineFile>
<lineFile>....</lineFile>
<lineFile>....</lineFile>
<filename>
</root>
Thanks a lot,
J.C.
Hi,
AFAIK - as far as I know
>>>>(Too much tests to do on other processes)
it's good this way the customer will learn the need for test tools
like mercury loadrunner - you can store all the tests inside
and when an upgreade comes just execute them...
customers always learn the hard way
Regards,
michal
Similar Messages
-
Receiver File adapter: dynamic folder name based on file name
Hi there,
is it possible to set up one communication channel that will use different target folders based on file name?
E.g.
File abcdef will be saved to /root/abcdef/abcdef or /root/abcdef/abcdef.txt
File xyz will go to /root/xyz/xyz or /root/xyz/xyz.txt
I know I could use Sender/Receiver Service, Interface/namespace or data from message for variable substitution but could not find an easier solution for this scenario than to create multiple communication channels.
Thanks.If you haven't a message mapping, then you can create only an interface mapping with an abap mapping.
In your abap mapping:
DATA l_record type mpp_dynamic.
l_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_record-name = 'FileName'.
l_record-value = "your filename"
dynamic_configuration->add_record( l_record ).
l_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_record-name = 'Directory'.
l_record-value = "your directory ".
dynamic_configuration->add_record( l_record ).
Afther that, you must activate Adapter Specific Message Attributes (directory and/or filename) in your target communication channel .
Regards,
Carme. -
Using File Adapter with Logical Name
I am creating a file adapter with Logical name. Apart from giving the Logical name is there any other configuration that I am suppose to do on the Web Logic before I start using it?
Thanks in Advance.After configuring the file adapter, all you need to do is , give the path as a value for the logical name which you have created earlier. That you can do on the file adapter property inspector. There is no need to do anything on the server level. Lemme know
Thanks,
N -
Generic adapter module to read any xl file
Hi Experts,
I have a requirement where i was suposed to read xl file using sender file adapter module.
Now i see ther are three more xls files of a completely different format, is ther any generic mdue to read so..can i be developed..
or do i have to develope three different modules for this requirement..
pls help me outHi Ravindra
public ModuleData process(
ModuleContext mc,
ModuleData imd)
throws ModuleException {
Object obj = null;
Message msg = null;
String msgType = null;
String nameSpace = null;
try {
obj = imd.getPrincipalData();
msg = (Message) obj;
msgType = (String) mc.getContextData("msgType");
nameSpace = (String) mc.getContextData("nameSpace");
if (msg.getMessageDirection()== MessageDirection.INBOUND)
amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
else
amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.OUTBOUND);
XMLPayload xp = msg.getDocument();
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now got the xml payload object.");
if (xp != null)
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now calling the Convert Method to convert Excel to XML.");
byte by[] = convert(xp.getContent(),msgType,nameSpace);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Conversion Done Successfully.");
xp.setContent(by);
imd.setPrincipalData(msg);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Principle data is set successfully.");
} catch (Exception e)
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Module Exception Caught .");
ModuleException me = new ModuleException(e);
throw me;
return imd; -
Republished files don't change names
Using the publish feature, I published some files to a hard drive using a publish service. Some of the files I had renamed from the default camera name convention to my own name convention. Others I had not changed the name from the default. After working on the original files, I renamed the files that had not been renamed, and then I republished them. I was expecting the republished files to have their new name, but they did not - they had the old names. I've tried republishing several times. I deleted the republished version of the file and then republished and it still came back with the old file name.
What in blue blazes is going on here? How can I get the names of the published files to match the names of the files in Lightroom?You might want to read this thread over at photoshop.com (official site to report problems) and possibly add your vote and a comment to it.
Beat
Message was edited by: b_gossweiler: corrected link -
File Adapter: Is it possible to track files?
Hello XI community,
I've a scenario where the sender and receiver is the file adapter using NFS. When XI picks up the inbound file from a certain directory with a wildcard name like "T_xxx*" is there any chance to see the original name? In addition I'd like to know how to find out the relationship between the inbound filename and the outbound name which is actually created from the file adapter like "xxxxx_timestamp.xxx". The files I'm using are binaries so I don't use the file content in anyway. They are just passed through XI. But I'd like to track the files to be able to know which input file belongs to which output file. Maybe some of you know where to see this.
Thanks in advance
/MichaelHi once emore:
take a look at this document:
https://websmp201.sap-ag.de/nw-howtoguides
-> exchange infrastructure -> how to Create Modules for the J2EE Adapter Engine
it may help you:)
Regards,
michal -
File Adapter gets error while deleting the file
Hi,
We are running on PI 7.0 SP6. I built a simple integration scenario where a file is picked up from a certain directory on the server (PI server itself) and get processed according to some mapping rules and again put to an other directory. I used the file adapter for picking and putting the file with 2 different communication channels.
My integration works fine. File is picked up processed and put into its new location.
But the file adapter cannot work in archiving or deletion mode. So the file (to be picked up by PI) remains in its original location.
I am getting the following error:
Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File##com.sap.aii.adapter.file.File2XI.deleteFile(FileHandle)#J2EE_GUEST#0####18a971f3338011dbcde800145e69a8d4#XI AF File2XI[:EBI:File_from_EBI_to_EXS]##0#0#Error#1#com.sap.aii.adapter.file.File2XI#Java###Deleting of file failed - cannot proceed#1#E:
SCENARIOS
EBITOEXS
RFID
GELEN
tagdata22082006035719.xml#
#1.5#00145E69A8D4005B0000004700000A6400041BC49A1D56D3#1156431120046#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File##com.sap.aii.adapter.file.File2XI.processFileList()#J2EE_GUEST#0####18a971f3338011dbcde800145e69a8d4#XI AF File2XI[:EBI:File_from_EBI_to_EXS]##0#0#Error#1#com.sap.aii.adapter.file.File2XI#Plain###File 'E:
SCENARIOS
EBITOEXS
RFID
GELEN
tagdata22082006035719.xml' - deleting after processing failed - retry#
I tried everything but upgrading to a higher SP level and will do so unless anyone has an other suggestion.
Thanks a lot,
Murat Gölcü
[email protected]Hi,
These are a few things you can do:
Check the permissions of the folder where the file is being Placed. (it will mostly have only read permission, this is what i could understand from your explanation)
If you are doing Content conversion, please can you just remove it and see if the XML file is getting generated.
Also, please check if it's picked up by any other application when you place it on the server.
Regards,
Abhy -
File Adapter does not process the same file twice
SOA: 11.1.1.4 (non-HA).
I have a file adapter that triggers when a new file gets to a directory; the file is not deleted after the process triggers.
The process is supposed to call other services via a mediator and if any remote fault happens it should rollback automatically and re-trigger with the same file at the next polling interval.
I have literally 3 scenarios:
1). The file gets picked up once, the process fails and the file is never picked up again.
Msg in log: The file : /xx/xx/xx/abc.xml is being ignored as it has already been processed
2). If the mediator only routes to one service after the file gets picked up, it works as expect (that is rollback and restart at the next polling interval). If it has more than one sequential routing rule, I see the same error as above.
3). File does not get picked up EVEN if I "touch" or rename the file.
Msg in Log:
File Adapter ProcessName Poller enqueuing file for processing :/xx/xx/xx/abc.xml
File Adapter ProcessName Ignoring File : abc.xml as it is already enqued for processing.
I have already checked, there is no permission issue.
This is what my .jca file looks like:
<adapter-config name="getFile" adapter="File Adapter" wsdlLocation="getFile.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="eis/FileAdapter" UIincludeWildcard="*"/>
<endpoint-activation portType="Read_ptt" operation="Read">
<activation-spec className="oracle.tip.adapter.file.inbound.ScalableFileActivationSpec">
<property name="DeleteFile" value="false"/>
<property name="MinimumAge" value="5"/>
<property name="SingleThreadModel" value="true"/>
<property name="PhysicalDirectory" value="/xx/xx"/>
<property name="Recursive" value="false"/>
<property name="PollingFrequency" value="20"/>
<property name="IncludeFiles" value=".*"/>
<property name="UseHeaders" value="true"/>
<property name="MaxRaiseSize" value="5"/>
<property name="ListSorter" value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"/>
</activation-spec>
</endpoint-activation>
</adapter-config>
Thanks for looking into it in advance.
Any help with the error messages will be appreciated.You have to use MOVE operation, if there is any remote exception occured, then move the file to someother folder and again move back to the same folder where the file pickup will start.
In that way you will be use the same file picked up next time when the polling happens.
It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
Thanks,
Vijay -
File adapter didn't read the whole file
Hi folks,
we use the file adapter since 1 year and in the majority of cases it works fine. But sometimes the file adapter didn't read the whole file. In SAP we are missing some parts. Funnily enough in this cases he archive the whole file and not only the executed parts . Know anybody whats the reason of this effect and how we can solve it?
Kind regards Johann M.Johann
I think you miss understood me/I didn;t explain myself very well....
If you take the file that doesn't work/process correctly, can you replicate the issue where the whole file is not copied across.
If you can, you should be able to extend the FTP/File adapter trace file to find the cause if this issue.
Log onto Visual Admin.
 Services
 Log Configurator
 Locations
 Choose the location (Java package) and the tracing level (severity)
(for example, com.sap.aii.adapter.file)
 Root Location > com > sap > aii > File
 Set the severity and choose Copy Severity to Subtree
Run interface and then check the trace file - remember to switch this back to Error... -
Help required in File Adapter Module Development
Hi All,
I am working out a File to File scenario where my source file is in some different format. Please find the below sample:
<Root>
<ID>100</ID>
<NAME>SAP</NAME>
<END-Root>
Before taking this into IS, I need to change the file to a proper XML format. I need to replace "END-" with "/".
<?xml version="1.0" encoding="UTF-8" >
<Root>
<ID>100</ID>
<NAME>SAP</NAME>
</Root>
I think I can achive this by developing Adapter Modules. I am new to Adapter Module development.
Can you please tell me if there are any inbuilt Adapter Modules for this. If not please suggest me some relevant blogs to solve this issue. Thanks in Advance.Hi Phani Kumar
There are more than one ways to do this. As per your timelines and skill set you can decide
1. You can use the XMLAnonymizerBean this is an inbuilt module
Check Stefen's blog
Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
2. You can read this complete file in a single field and then you can create XSLT or Java mapping to parse it in a target XML you desire.
Check these
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken](XSLT mapping)
Java Mapping (Part I) (Java Mapping)
The specified item was not found. (Java Mapping helper DOM)
The specified item was not found. (XML Node into string)
3. You can develop Adapter modules for this
Refer
Check Guides
XI 3.0
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
PI 7.0
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
PI 7.1
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00838345-708c-2a10-1199-9514c0b0a91c -
FileName in Sender File Adapter Module
Hi Folks,
In my sender file adapter have written a module to read the picked file name. The protocol used is NFS.
Notice that the file name read in the module has the absolute path, including the directory path. E.g The file name xyz has to be picked from source directory
XIServer\Outbound. In the module when I retrieve the file name, it comes up as
XIServer\Outbound\xyz. Is this expected behaviour?
I was expecting just the file name<xyz> to be retrieved.
Thanks,
AnandHI,
Create an UDF and write this code.
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 Adapter u will have Adapter specific parameters check the file name check box.
Using this UDF u will get the file name at target side.
Regards,
Phani. -
Receiver File Adapter Module processor issue
Hello all,
I have deployed (using SDM) a specific module for one of my file communication channel.
In MDT, I have the following error :
Exceptions survenues pour Adapter Framework : Object not found in lookup of Module0001
La diffusion du message vers l'application via File_http://sap.com/xi/XI/System a échoué en raison de : com.sap.aii.af.ra.ms.api.RecoverableException: Object not found in lookup of Module0001.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of Module0001.
Where can be the source of this problem ?
Thanks a lotJean
Also check if the "JNDI" name that you have specified in the Receiver Adapter module
excluding localejbs matches the deployed name in the "J2ee Aministartor Deploy service.
for example if you have
localejbs/sap.com/BeanName
you should have
the service deployed under
/sap.com/BeanName
regards
krishna -
Hello experts,
1.
I want to retrieve the value of <b>Target directory</b> for a file <b>reciever</b> communication channel inside module. Is it possible? Any code samples?
2. My audit logs are not getting printed inspite of having a log-configuration.xml in place and proper audit log statements in the code? anybody face similar situations before? These statements are inside a <b>reciever file</b> adapter module.
AmolHi Kapil,
file.targetFileName
In General put the following piece of code in sender or receiver adapter and u can get all the parameters specific to that Adapter Type in channel(Configuration) for outbound and inbound channel depending on direction of channel in which module is configured.
String[] chattr=ch.getAttributeNames();// ch is channel object
If u put this in receiver module of file adapter, the string array will hold the names of all the parameters pertaining to Receiver File Adapter(file.targetFileName,file.targetDir,etc). Same procedure holds good for sender channel.
Once u get the parameter name, u can get the value as given by my earlier post in this thread.
Hope this helps.
Regards,
Sudharshan -
File Adapter-Module configuration
Hi All,
I have the following requiremnt.
"Duplicate files should not process"
Following are the File Access Parameters.
Source Directory: ABC (ex: contains aa1,aa2,aa3,aa4 files)
Filename: *
File name mask: aa*
My doubt is if they place aa1 file again in ftp , i should not process.
For this I'm thinking to write module configuration.
Can any one suggests , whether this is the correct approach? If it is could u explain how to write this module and where to write this module and how to import in xI, do i need to pass any parameter name in module configuration.
Regards,
venu.Hi Venu,
You can go with Module in the Sender File Adapter.
First you need to check the file name and you need to store this file name in the Database.( you can use Java Database).
If there is an entry in the database for that file, then reject the whole file as per the business requirement. So that you can avoid , overhead of Mapping. Because if there is an error set the flag in the message and check this flag in your Receiver Determination, if it is an error send into error directory.
Another way is outside the XI, i.e using shell scripts.
Regards,
Moorthy -
File adapter module enhancement error
Hello All,
We have a EDI scenario where data for 110 is to be transfered to SAP. Here customer is not able to ahead with seeburger hence decided to develope a adapter module. We have done that and started testing . While testing we are getting a error, in which ":" is field separator which is getting converted to "[]" . This we found when we debugged module process method. Pl can you suggest why this conversion is happening and how to resolve.
If you see , When I use only standared sap module file is getting read as it is. There is no such conversion happening.
Pl can you suggest at the earliest possible.
thanks,
SharadaHi,
I think you have done a typo error. is it not
localejbs/SeeClassifier classifier*
To find the correct JNDI lookup name, log in to Visual Administrator of the J2EE Engine and in server node look for the JNDI Registry Service.Spot your desired bean and fetch the whole JNDI name form there.
Regards,
Sudharshan N A
Maybe you are looking for
-
Log4J-Error + Unexpected Database-Connector-Error
Hello! I am trying to integrate a Report into an existing Java Eclipse-Project usind Crystal Reports for Eclipse. To do this I am modifying the example program which comes together with the installation. I am trying to pass the data to the report dir
-
Error- Postings to G/L accounts with open item management are not permitted
Hi, Can't we post to a GL, which is open item managed, in a non-leading ledger (statutory ledger)? We get this error when we try to post an entry, in the statutory ledger, to a GL that is open item managed. Can anybody explain this, please? Regards,
-
Communication channel monitoring logs
Dear all, on weekend we had a problem with a CC. Messages not have beend pick up from a FTP server. The problem was solved automatically and I was not able to see any error entries in the CC monitoring log files because there were to many entries wit
-
HELP! iPhone went into Recovery but I can't Restore - no space!!!
I was trying to update my phone but in the middle of the update, everything froze. Now my iphone is in recovery mode, and I can't do anything through iTunes because it's telling me that I don't have enough space on my storage disk. HELP ME!!!!!!!!!!!
-
Do I need to make adjustments to my IPAD to use the zooka wireless speaker bar?
Do I need to make an adjustment to my IPAD to use a Zooka wirless speaker bar?