Receiver File adapter - 'Empty Message Handling' option to ignore not worki
Hi,
I am trying to create the Files in receiver based on condition.But I am gettiung error in communication channel when there is no payload. Receiver I am usuing FCC and processing tab I selected -'Empty Message Handling' option to ignore .
one source -> Target 1 (0..1 occurance in signature tab changed, message mapping and operation mapping)
and Target 2 (0..1 occurance in signature tab changed)
and I put the message type level condition. While creating first message If did not create the Message type in my maaping still my Receiver File communication channel is giving error. even thow I my receiver interface occurance is 0..1
Right now I am in PI7.1 and SP7 is the bug for support pack do I am missing any thing. and do I need to upgrade any nwe patch. appreciate your help.
Regards,
Venu.
Hi,
here is the my requirment one source -> two target interfacess (0..1)
If u have 2 target interfaces,then this is not suffice..... u should make it as 0..unbounded both in operation mapping and message mapping.
But based on ur requirements posted above i guess u have only one inbound interface at a time based on some conditions....
But,
<messages>
<messages1>
based on condition first message type not created in mapping.
<messgaes2>
The error u r getting is because.... u want only one interface in target at a time....
Then u should not generate Message1 also in the target.
So avoid mapping to message1 if u want only message2.
If both message1 and message2 are created in target means... it is triggering for two interfaces.... so avoid one message1 or message2... based on some conditions u have..
Still nt solved do post...
Babu
Similar Messages
-
Receiver AS2 Adapter : Empty Message Handling
Hello Experts ,
We are trying to work on following requirement .
File -> PI -> AS2 ( File) ( We are using Pranke to drop our message to the receiver system) (MDN ack too is in place )
There are times when none of the source records are valid and we have an empty payload post mapping.
In AS2 adapter we are using StrictXML2Plain.
Scenario works fine for all target messages which have data and a file is created at the receiver end. MDN ACK works fine too.
Problem is when we have empty target payloads , We get following error in communication Channel monitoring.
Information
SEEBURGER/AttribMapper: Finished succesfully, 1 properties set or deleted
Information
MP: processing local module localejbs/ModuleProcessorExitBean
Information
Message entered AF MP exit bean and will be passed to the JCA adapter now.
Information
SEEBURGER/AS2: Received order from system.
Error
Message could not be forwarded to the JCA adapter. Reason: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # , SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond #
Error
MP: exception caught with cause javax.resource.ResourceException: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # , SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond #
Error
Adapter Framework caught exception: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # , SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond #
Has anyone handled such situation ? Is there any workaround at the SAP end to handle this issue ?
Or is this to be handled at the Pranke end ?
Attaching the Seeburger AS2 monitor error as well for empty messages ,
State
Error on send, will be retried
Status Description
Could not deliver as2 message to partner: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # null
Little urgent and your expertise is appreciated PI geeks
SayaleeHi,
here is the my requirment one source -> two target interfacess (0..1)
If u have 2 target interfaces,then this is not suffice..... u should make it as 0..unbounded both in operation mapping and message mapping.
But based on ur requirements posted above i guess u have only one inbound interface at a time based on some conditions....
But,
<messages>
<messages1>
based on condition first message type not created in mapping.
<messgaes2>
The error u r getting is because.... u want only one interface in target at a time....
Then u should not generate Message1 also in the target.
So avoid mapping to message1 if u want only message2.
If both message1 and message2 are created in target means... it is triggering for two interfaces.... so avoid one message1 or message2... based on some conditions u have..
Still nt solved do post...
Babu -
Recevier adapter empty message-handling ignore
Hi all,
I configured file receiver adapter with file content conversion (comma separated).
In processing parameters Empty-message handling is set to Ignore.
Payload that is in message generated from SAP is:
<?xml version="1.0" encoding="utf-8" ?>
<mt_ap_invoice xmlns:prx="urn:sap.com:proxy:DES:/1SAI/TAS128FC2C2C3C8E901DC22:700:20 08/06/25" />
There are no any data that is filling structure (structure main node is defined as 0...unbounded) and still empty file with 0 bytes is created.
Please can you tell what is wrong in this setup as In case of empty message I don't want that file is generated?
Regards,
Nenad- open Integration Builder
- open your file receiver adapter
- go to tab Processing
- change Empty Message-Handling to 'Ignore'
Cheers,
André -
Receiver File Adapter - Empty document found error
Hi,
I have a slight issue that I do not understand.
For example, I have a file that is 256 bytes in size and definitely has some content. However, when the file adapter processes the file it says in the log "Empty document found" - but I can see the file has content.
Any ideas ? I am using using XI 3.0 SP19.
Cheers
Colin.hi colin,
i will agree with u,
may be the XI can not understand your test data,
can u tell me the language of test data.
In file adapter go to encoding select TEXT and UTF-8.
may be this will works.
regards
sandeep. -
Empty Message Handling with Receiver File adapter
Hi,
We were using the "Empty-Message-Handling" (status set to Ignore) of Receiver file adapter to stop a 0 KB file from being written to the specified directory.
However, inspite of this, a 0KB file continues to be written.
The specifications are given below-
File Construction Mode - Add Time Stamp
Put File - Directly
Empty Message Handling - Ignore
Maximum Concurrency - 1
File Type - Binary
Can anyone please help with this.
Thanks and Regards,
ShiladityaHI,
In one of thread the same problem was coming. Just look at the thread.
Receiver file adapter creates empty files, Empty-Message Handling SP19
Or
Follow the weblog for the same requirement.
/people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module
Thnx
Chirag
Reward points if it helps. -
Receiver file adapter creates empty files, Empty-Message Handling SP19
Hello,
We have just upgraded the system to SP19.
One of the new features is that it should be possible to determine how XI messages with an empty main payload are to be handled in the receiver file adapter.
If the parameter Empty-Message Handling is set to 'Ignore' no file should be created if the main payload is empty. In our case an empty file (size 0 kb) is still created even though the main payload is empty and the flag is set to 'Ignore'.
Has anybody experienced the same problem?
// Best regards HansThis should work:
Use your own adapter module that parses incoming message and checks if it has any record sets in the document. If it does not have any record sets, then set the message to empty and then give this modified message to File receiver.
For example, see the example code below:
Module imports..
Audit log import..
DOM imports/SAX imports..
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
try {
// get the XI message from the environment
Message msg = (Message) inputModuleData.getPrincipalData();
AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"RemoveRootTag: Module called");
XMLPayload payLoad = msg.getDocument();
Document doc = parseXmlFile(payLoad.getInputStream());
if(doc != null){
if(!doc.getDocumentElement().hasChildNodes()){
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Document is empty!!");
payLoad.setContent("".getBytes());
msg.setDocument(payLoad);
// provide the XI message for returning
inputModuleData.setPrincipalData(msg);
} catch (Exception e) {
// raise exception, when an error occurred
ModuleException me = new ModuleException(e);
throw me;
// return XI message
return inputModuleData;
private Document parseXmlFile(InputStream xmlpayload) {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
// Create the builder and parse the file
Document doc = factory.newDocumentBuilder().parse(xmlpayload);
return doc;
} catch (SAXException e) {
} catch (ParserConfigurationException e) {
} catch(IOException e){
return null; -
Empty-Message Handling is not working in receievr File Adapter
Hi All,
I have selected "Empty-Message Handling" = 'Ignore'in Receiver File adapter, but still empty files are creating in target directory.
Message mapping generates output based on the conditon, if the condition is 'false' mapping will generate empty file (no data is being mapped).
Why Receiver file adapter is processing empty fiels even i set 'ignore' empty fiels in configuration (ID)?
Hoe can i manage not to place empty fiels in target directory?
File type is '.txt'
Your help would be appreiciated greatly.
Thanks,
RajeshNot sure why is it not working. Make sure the channel is activated and cache is refreshed properly. But as a workaround you may use OS script checking for size of message and deleting it or configure a BPM to avoid the file creation. Or else an adapter module as shown
/people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module
Regards,
Prateek -
How to ignore the empty file using Receiver file adapter with Coma separato
Hi,
I am trying to create the .csv file at the receiver but when there is no data I wan to ignore the file even I do not want to create the file with comma also (I just went and check in my file system created with commas)
Source1 -> T1
T1
-> S1
->Field1
-> Field2
Because I am using receiver side FCC populating with empty node
Based on condition T1 is populating when condition fails I am populating target T1 and structure elements are mapped with constant.
Ex: Target payload when condition failed below data is populating ..
In this I want to ignore creating the file.
<T1>
<S1>
<Field1/>
<Field2/>
</S1>
</T1>
Here Is the my content conversion parameters,
S1.fieldNames - Field1,Field2
S1.fieldSeparator - ,
S1.endSeprator u2013 u2018nlu2019
I used processing tab u2018Ignoreu2019 option id did not worked. Appreciate your help.
Regards,
Venu.Hi Raj,
I went my receiver mapping signature tab I chagned occurance from 1 to 0..1
then my mapping got lossed now message type level I put the condition. When my condition not satisfy I am not creatin gthe target node itself.(I mean here message type) Messages ->message1 only is creating..
but in SXMB_MONI below error I am getting..
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <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="MAPPING">GENERIC</SAP:Code>
<SAP:P1>Split mapping created no messages</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>Split mapping created no messages</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Thanks for your response.
Regards,
Venu. -
"Put file" Option in Receiver File Adapter
Hi All,
Even though this seems to be a basic Question, i didn't found any answer to this in SDN.
Please share your thoughts on this.
We have one option called Put file in the receiver file adapter, When i read the use of this option i found some thing on SAP help.
But i am not clear about that option, if any one can clear that, it would be great.
RegardsHi,
Put file is put the file directle in the receiver file path.
there are 2 options for put file
1. Directly 2. Use Temporary File.
Directly: Directly will directly place the file in specified folder. In some cases ur file is large then this option wont work.
Use Temporary File: In some cases u want to wait more time to create output file then the sepecified poll interval.In that cases in file is read some data and saved in a temporary file, after reading or completion of whole file then only only it will place the file in speficied server path.
Thanks,
Enivass -
OS Command for receiver file adapter
Hi Guys,
I have a requirement that in the target folder before putting the file, I have to rename the exisitng file then put the file. The target folder is in another machine and I have to use FTP option to send file.
is it possible to use OS command after processing option in the receiver file adapter to do this? please let me know how to handle this.
Thanks
MukeshMukesh,
You cannot rename the file in the FTP folder. What you can do is write a OS script where it logs in into the FTP site and renames the file. Then use this OS script before message processing so that it renames the file before you write the actual file.
If you want to rename a file which is on the applicaiton server using NFS then you can directly rename it from the command prompt.
Regards,
---Satish -
Receiver File adapter : two choices "Directly" and "Use Temporarly file" ?
Hi All,
I am writing the file into a folder and I want to write the file completely into the folder.Once the file is placed , one tool will be keep on picking files every second from this folder.So I need to put the file after filling entire data.
In the File adapter, the put file option has two choices "Directly" and "Use Temporarly file".
"Directly" option will serve my purpose?
Which option I need to keep for Empty-Message Handling "Write Empty file" or "Ignore"?
Thanks
SeemaHi Mohamad,
>> You need to place in the some other folder and do the transfer completely and move the file to desired location using command line parameters as recommended in the previous answers.
I will be posting all the files as .txt files. Can we move the file by using command line parameters for FTP connection?
I heard that we can get do it only for NFS and we cannot do for FTP connection.?
Can you please suggest the command line how to use it.
Thanks
Seema -
Problem with fixedlenthgs in receiver file adapter
HI,
I am doing XML to flat file scenario and using mutli mapping concept without BPM.
in the receiver file adapter I am using FCC with fixedlengths,then it generated just 3 output files out of nearly 100 source files.the errored one are succcessful in the SXMB_MONI and failing in RWB-->Message moni with waiting status and MDT says that XI_J2EE_ADAPTER_FILE ,Error Code PROCESSING_ERROR .
i tried in SDN and then found something like enable the disablesecurity check box in variable substitution parameters ,then I got 4 files out.
these are my FCC params for all structures:
struc1.fieldFixedLengths
struc1.fixedLengthTooShortHandling
struc1.endSeparator
and I tried with fieldSeparator then it gives successfully all output files.
so,where is the problem?I didnt understand?
any suggestion.
thank you,
regards,
Babu SriBhavesh,
I felt the same way,but assumed that ,in that way fixedlenghths wont work.
in my target structure most of the fields have 0-1 occurences ,and even in the source structure too.so,I think it might be the reason.Then I have to make all my about 60fields 1-1 madatory and using mapWithDefaultValue function, as my sources are optional.
you think it will work just using the "mapWithDefaultValue" function without changing my occurences to 1-1 in the target structure(mandatory)?infact I can try but ,cos of pain for changing like 60 fields....:) and even dont know which fields are causing the problem,so that we can apply "mapWithDefaultValue" function only on those fields.
thank you,
Babu Sri -
0 byte txt file using receiver File Adapter
HI,
My scenario is Flat File to Fixed Length File.
Mapping : Based on the condition Reciever node need to generated , In some cases it wont generate any node ( No data )
Receiver Communication channel : I used FCC for Fixed length Format.
Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:Message1' found in document', probably configuration error in file adapter (XML parser error)'
I need the receiver file to generate with 0 bytes when there is empty data.
can any one help on this.
ThanksHi,
>>Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
What happens in this case is, when you send a blank file to PI it processes but once it went to Receiver Adapter, it looks out for some fields because of the FCC settings. So it throws an error/exception because some fields are expected and it is not coming. Because of that you getting below exception.
Secondly, Once you send data with few values or fields it will process in Receiver file adapter FCC and if there is some error it throws error. this is why you getting exception in moni, and other places.
Regards
Aashish Sinha -
Receiver File adapter content conversion using StrictXml2PlainBean
Hi All,
For receiver file adapter i am using the module StrictXml2PlainBean, and also i mentioned the module configuration like this
parameter name parameter value
recordTypes Header,TransactionHeader,TransactionDetail,TransactionTrailer,FileTrailer
FileTrailer.endSeparator |\n
FileTrailer.fieldSeparator |
Header.endSeparator |\n
Header.fieldSeparator |
TransactionDetail.endSeparator |\n
TransactionDetail.fieldSeparator |
TransactionHeader.endSeparator |\n
TransactionHeader.fieldSeparator |
TransactionTrailer.endSeparator |\n
TransactionTrailer.fieldSeparator |
But when i send the idoc, The receiver CC is throwing an error
Message processing failed. Cause: com.sap.aii.af.modules.conversion.xml2plain.ConversionException: Invalid structure name encountered during conversion: Transaction at XML element MT_DeliveryOrder,Transaction
My actual structure is
MT_DelvOrder
Header 0...1
Transaction 0....Unbounded
TransactionHeader 1..1
TransactionDetail 0...unbounded
TransactionTrailer 1...1
FileTrailer 0...1
The module is checking for the Transaction node,but i require the rest 3.
Same configuration i have done successfully with FCC without using the module....
So can any one suggest me where i am missing... why the module is pointint towards, the Transaction cant i ignore this node . and continue with the rest???
Regards,
Sridhar
Edited by: sridhar reddy kondam on Aug 10, 2009 12:35 AMHi Rajesh,
The same FCC configuration was working fine with FCC and when i am using this module configuration i am getting the prob...
In the file i need the Header,TransactionHeader,TransactionDetail,TransactionTail,Filetrailer
my sample output file is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_DeliveryOrder>
<Header>
</Header>0...1
<Transaction>0...Unbounded
<TransactionHeader> 1..1
</TransactionHeader>
<TransactionDetail> 0...Unbounded
</TransactionDetail>
<TransactionTrailer>1...1
</TransactionTrailer>
</Transaction>
<FileTrailer> 0...1
</FileTrailer>
Any suggestions will be great help...
I think i need to go with other options without using this module....
Regards,
Sridhar
Edited by: sridhar reddy kondam on Aug 10, 2009 6:03 AM -
Dynamic File Name for Receiver File Adapter
Hi All,
How can we use dynamic name for Receiver file adapter?
Can anyone help.
Thanks in Advance
ChemmanzHi Chemmanz,
The dynamic filename generation concept is as follows.
In your filename field. just give a variable with % symbols. (eg: %file% ).
Now, under the option Variable Name Substitution, you can give how the value has to be created.
It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
For the former, your give
message:interface_name ,etc
and for the payload part you give,
Payload: "your element root which u wanna acecss"
Just check this link out,
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
And read the contents under variable substitution and it will help you understand the concepts better.
If you have any clarifications, do get back,
Regards,
Bhavesh
Maybe you are looking for
-
I have recently spoken to apple care and they are ringing me back in the morning but I want to try and progress as far as I can before hes does. I have managed to partition my disk but before I go any further it says you must have a genuine copy of W
-
I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I
-
i lost my recovery partition for hp dv6 63300ee, with windows 7 home,, what can i do to back it?
-
PHP 5.2.4 with Oracle 10g.
OS: Windows Vista PHP: 5.2.4 Oracle: 10g (XE) Apache 2.2 Hey all, hoping for a bit of help if possible! I'm unsure if this is the right place for this question. But here goes anyway! I installed PHP 5.2.4, Apache 2.2 and Oracle XE 10g today. I've set
-
How do you fix error -100000?
I have bought 2 albums and 3 individual songs from the iTunes store recently and all of them have downloaded successfully. Well, all of them but two. They insist on not downloading, and I seem to see getting taht the files are corrupt and that the er