Dummy XML not getting generated from empty file by J2EE adapter module

Hi All,
i know when XI gets an empty input text file, it does not generate a send message for it in sender communication channel.
in my scenario, if i get a file with data, i have to generate an XML message for it using file content conversion - this i have done...........
but if i get an empty text file, then i have to generate a dummy XML send message for it for my BPM.......
So i made a J2EE adapter module to generate dummy xml for empty file.....<b>when i give a file with data in it, then my adapter module is called..... but when i give an empty file, then my adapter module is not called</b>.........
<b><i>Can anybody suggest why the module processor is not invoking my customer-adapter module when an empty file is given.............but the module processor is invoking my customer-adapter module when a file with data is given</i>.</b>
Thanks,
Rajeev Gupta

Hi Amit,
Below is the code of process method which i used:
<i>public ModuleData process(ModuleContext moduleContext,
  ModuleData inputModuleData)
    throws ModuleException
Object obj;
Message msg_audit;
AuditMessageKey amk;
try
File f = new File("/components/XITEMP/sample/PWC/check.txt");
PrintStream ps;
if (f.canWrite())
FileOutputStream fos =new FileOutputStream(f);
ps = new PrintStream(fos);  
ps.println("Testing");
ps.close();
fos.close(); 
else
  f = new File("/components/XITEMP/sample/PWC/check4.txt");
  if (f.exists() ==false)
  f.createNewFile();
obj = inputModuleData.getPrincipalData();
if (obj!=null)
msg_audit = (Message)obj;
amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
else
  String str = new String();
String str1 = new String();     
              str1="<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
             str1+="<ns:MT_PWC_RECORD xmlns:ns=\"urn://PWC_SR3_01/PWC/Customer\">";
         str1+="<RECORD_SET>";     
             str1+="<RECORD>";
         str1+="<RECORD_DATA>BLANK_FILE</RECORD_DATA>";
         str1+="</RECORD>";
         str1+="</RECORD_SET>";
         str1+="</ns:MT_PWC_RECORD>";     
str=str1; 
inputModuleData.setPrincipalData(str);
catch(Exception e)
try
File f = new File("/components/XITEMP/sample/PWC/check.txt");
PrintStream ps;
if (f.canWrite())
  FileOutputStream fos =new FileOutputStream(f);
  ps = new PrintStream(fos);  
  ps.println(e.toString());
  ps.close();
  fos.close(); 
catch(Exception ex)
return inputModuleData;
   }</i>
in the above methood, i  used file operations at start just to see whether the module is getting invoked or not...so when i give a data file, then the file operations are performed and messages are written in audit log.........but when i give an empty file, then the file operations are not performed - meaning the module is not getting invoked........
Thanks,
Rajeev Gupta

Similar Messages

  • Filtering the XMLs that get generated from IDOC

    Hi All,
    I have requirement to filter the XML files those get generated when a BP relationship is created. The required configuration has been done. The XMLs are getting generated, but I want to generate the XML is only if it is Contact Person Relationship.
    Can somebody tell me how I can achieve it?
    Regards,
    - Prasenjit

    I am using an extended version of CRMXIF_PARTNER_REL_SAVE IDOC and in TCODE we21, I created an XML File port. Can we filter the IDOCs from which the XML will be generated, so that we can select the IDOCs we want to generate the XML from?
    Regards,

  • Getting Hashcode of a file in an Adapter Module

    Hi all
    Does anybody know to dynamically get the hashcode of a file in an Adapter Module.

    Hi Michal
    contentToString()
              String serialization for logging purposes.
    getPrincipalData()
              Retrieves the current principle data, usually the message
    getSupplementalData(String name)
              Gets one supplement data value.
    getSupplementalDataNames()
              Returns the names of all currently existing supplement data.
    setPrincipalData(Object principalData)
              Sets the principle data that represents usually the message to be processed.
    setSupplementalData(String name, Object supplementalData)
              Sets a supplement data for the rest of the module chain
    this all methods I can see. Can u please elaborate a bit

  • Alerts not getting generated from Alert rules

    Hello
    I had a problem displaying Alert messages in Alert Inbox.I have created my category and I am raising the alert from BPM and thats working fine.But in some cases where I have define rules(via Alert Configuration in Runtime Workbench) for Alert Generation alerts are not getting raised.I am having the two background jobs running as per the documentation.
    I checked by creating a rule where sender was BPM and receiver is File and the alert should get generated when the Adapter fails(i gave wrond username for FTP server).
    Any idea what step might be missing?
    Thanks in advance.
    Regards
    Rajeev

    Hello Rajeev,
    have you checked in transaction ALRTDISP if the required alert has been created at all?
    If yes, then have a look at the receivers, if no then check the following things:
    - are your jobs running sucessfully?
    - does the alert get created when you execute SALRTPROC report manually?
    - are there old alerts of the same category not confirmed and flag surpress multiple alerts activated in the alert rule?
    Best regards
    Christine

  • Business service NOT getting configured from jca file in Windows 7

    I am faced with a problem in Windows 7.
    In one machine with Win XP as OS, when I create a business service from a JCA(.jca) file, the Endpoint URI gets configured automatically with jca://<jndi name>/... and having protocol as jca.
    But, when I do the same in Windows 7, the endpoint URI is not getting configured neither do I find a jca option in protocol so that I can configure it manually.
    The probable reason I sense, is that some files(may be jar or others) are not getting the acccess required by OEPE.
    Any suggestions, which jars or files are required for the configuration to be correct??? I mean for the JCA protocol to come up ??

    I could create a JCA business service on windows 7 64bit without any issues. Can you follow below points and let us know the result -
    1. Make sure that you are running eclipse as administrator. right click on "eclipse.exe" and select "Run as administrator"
    2. Make sure that file $OEPE_Installation_Dir\dropins\oracle.osb.ide.link has a valid OSB home entry like below -
    path=E:/ofmw11g/mw/Oracle_OSB13. Make sure that below directory exists -
    $OSB_home\eclipse\plugins\com.bea.alsb.transports.jca_1.1.0
    For e.g. - my setup have E:\ofmw11g\mw\Oracle_OSB1\eclipse\plugins\com.bea.alsb.transports.jca_1.1.0
    Regards,
    Anuj

  • Db tools open connection.vi does not get password from dsn file

    I am

    The database is a Microsoft SQL server database.  Again, my IT group does not want the password hard coded into the application.  Their preference would be for the password to be extracted from the dsn.  I have tried both a file dsn and a system dsn which were created in the data sources app in control panel --> administartive tools.  Neither dsn works (unless I wire the password to the databse tools open connection vi).  Both dsn's work fine from the windows data sources application.  I have not been able to figure out how to attach graphics to a post on the board here, so I 'm not sure how to attach the error message (or my block diagram).  The text from the error message is below.  Wiring in the password causes the error to go away.
    Error -2147217843 occurred at DB Tools Open Connec (String).vi->DB Tools Open Connec (Path).vi->FindShiftNumber.vi
    Possible reason(s):
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'eslprodsproc'. in DB Tools Open Connec (String).vi->DB Tools Open Connec (Path).vi->FindShiftNumber.vi

  • How2 create xml & ent  files from JAVA? (xml that gets data from ent file)

    Is there any API that can make it easy?
    * For parsing XML I use JDOM parser
    I want to create file like this:
    XML file: some.xml
    <?xml version="1.0"?>
    <!DOCTYPE xfat [
    <!ENTITY  d_request SYSTEM  "some.ent">
    ]>
    <!--
    /home/bNUMBER/Programs/XFAT/runxfat some.xml
    -->
    <xfat title = 'Fat Title (some) '>
    <database  filename = 'Some_Data/some.xml'/>
    <snc  filename  = "../snc/snc.xml"/>
    <configuration sp = '../sp/some_only.xml' name='Some_A-H'>
       &d_request;
    </configuration>
    </xfat>and ent file:
    <ddef title    = 'some d def title (some)'>
         <dcalc  snc    = '7_A9'
                meas   = 'm73'
                red    = 'GOOD' binval='MCMS' lug='YES'/>
    </ddef>

    has anyone idea what to search?

  • Display name not getting generated When creating user thorugh GTC

    We are using GTC flat file as a trusted source. We see that display name not getting generated. And same thing happening when creating a new GTC mapping.
    previously when we ran with few test user got created with display name through GTC flat file , Suddenly we see this issue display name not getting generated through flat file recon.
    Manually user creation has no issues.
    Please let me know if you have any idea about this issue.

    Don't use GTC... GTC is inflexible and buggy technology... Nothing guaranteed... Rather create your own custom trusted recon code...
    For more details
    26 Known Issues of Generic Technology Connectors
    http://docs.oracle.com/cd/E10391_01/doc.910/e10360/issues.htm

  • Reports file did not get generated during upgrade from 12.1.1  to  12.1.3

    Hi,
    Following is my setup:
    Two node Rac database on Linux 5(64-bit)
    All apps services are on single node - Linux 5(32-bit)
    Database version -- 10.2.0.5
    Apps version -- 12.1.1
    To upgrade apps from 12.1.1  to  12.1.3 i applied following patches.
    a.Merged patch 9239090, 9239095 and applled the merge driver, during the patch application i got the following error:
    Copying files to destination ...
    Done copying files to destination.
    The following Oracle Reports objects did not generate successfully:
    ja reports/US JAINMCEN.rdf
    An error occurred while generating Oracle Reports files.
    Continue as if it were successful [No] :
    == I did 'Yes' and patch applied successfully then as a post step i Merged Patch 9817770, 9966055 and apply the merge driver.
    Now i wanted to regenerate that particular rdf file, but its not getting generated even with adadmin. Not sure will the rdf file causes issue later so i wanted to fix this.
    Please advice...
    Thanks,
    Tanveer Mohammed

    Hi;
    I did 'Yes' and patch applied successfully then as a post step i Merged Patch 9817770, 9966055 and apply the merge driver.
    Now i wanted to regenerate that particular rdf file, but its not getting generated even with adadmin. Not sure will the rdf file causes issue later so i wanted to fix this.I belive you regenarete rdf and u dont have any issue than you can ignore this error. If you dont generate rdf than i suggest regenarete and if you have any issue update thread please
    Regard
    Helios

  • Nohup.log files are not getting generated correctly

    hai,
    im a weblogic administrator. Here is my problem in weblogic. My partner has complained that nohup.logs are not getting generated properly. Like for every 5 mins a new nohup .log file is getting generated. But almost 4 to 5 logs are of 0 size and after that the 6 log file is very hug ( around MB). And the status of the managed servers is in FAILED state. When i checked the nohup logs, i can see "E297: Write Error In Swap File" and also the below error. But when i checked the disk space it is only 30 % full. Please suggest me something that can help me in this. Why is this behavior in the nohup.logs? have anyone faced anythign like this? Please help me.
    But after the recycle everything is fine. But i want to know what went wrong and why it got recovered after the recycle.
    <Feb 11, 2010 7:43:59 AM CST> <Error> <HTTP> <BEA-101246> <Error occurred while flushing HTTP log file for the Web server: wl38_managed1
    java.io.IOException: Disk quota exceeded.
    java.io.IOException: Disk quota exceeded
    at java.io.FileOutputStream.writeBytes([BII)V(FileOutputStream.java:???)
    at java.io.FileOutputStream.write(FileOutputStream.java:260)
    at com.wily.introscope.agent.probe.io.ManagedFileOutputStream.write(ManagedFileOutputStream.java:423)
    at weblogic.utils.io.DoubleBufferedOutputStream.flushBuffer(DoubleBufferedOutputStream.java:58)
    at weblogic.utils.io.DoubleBufferedOutputStream.flush(DoubleBufferedOutputStream.java:157)
    at weblogic.servlet.logging.LogManagerHttp$FlushLogStreamTrigger.trigger(LogManagerHttp.java:522)
    at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:243)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:229)
    at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:223)
    at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:50)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

    according to error message, your partition size have not enough disk space from where you are running nohup command. check with df -kh.

  • RFC problem: could not get functionname from XML requst (sic)

    I'm developing an interface that attempts to call a receiver RFC on an SAP 4.6c system.  It's a very small simple interface, and it's all working until it tries to call the RFC.  The error is
    Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get functionname from XML requst: com.sap.aii.af.rfc.RfcAdapterException: failed to read funtionname from XML document: missing namespace declara
    I've created an RFC channel, which is green in the adapter monitoring.  The RFC imports without a problem, and appears in my interface mapping.  My mapping program converts to the RFC message type (as evidenced in sxmb_moni.  I have a receiver agreement referencing the interface mapping, which must be working as the mapping is called. 
    Could anyone point me to what else I could check?  I saw a post about the same error message, where the respondent found something in the logs which helped them  Could you expand on what you found, and in which log please?  Any pointers as to which logging options I could switch on and check would be gratefully received.
    Regards
    Alan Graham

    Thanks for the responses.
    I set up a communications channel of type RFC, which is
    showing green in the adapter monitor.  If I deliberately
    break it, eg by changing the password, the adapter shows
    as red in the monitor.  I assume therefore that the
    adaptor settings are correct.
    The XML going to the adapter looks correct AFAIK.  My problem is that I don't know enough about the requied XML to know if what I'm seeing in the logs is sufficient.  In SXMB_MONI, in the 'call adapter' section of a failed message, the outbound binding includes
    <SAP:ToInterfaceNamespace>urn:sap-com:document:sap:rfc:functions</SAP:ToInterfaceNamespace>/code]
    Also, the interface determination SOAP header, in the MAIN section includes
    [code]<SAP:Receiver>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>D04</SAP:Service>
      <SAP:Interface namespace="urn:sap-com:document:sap:rfc:functions">Z_MPU_3PSCE_FREIGHT_UPLOAD</SAP:Interface>
      </SAP:Receiver>
    These are the correct values for the RFC name and the namespace, AFAIK.
    I'm using an interface mapping (which uses and ABAP class as the mapping program) which references the interface of the RFC.  The logs tell me this works, ie, the class is called and the resulting XML appears in the payload of the response.
    Alan

  • Files not getting picked from the FTP site

    Dear All,
    We are having one File-XI-RFC scenario running in XI-PRD Server. Sometimes what happens is that files available in the FTP site are not getting picked by the File adapter. I have checked in the adapter monitoring and communication channel is active there. Also, there are no errors regarding this in SXMB_MONI. I have configured alerts also but for this case no alerts are getting trigerred. And also when I am reactivating that particular communication channel then that file is getting picked instantaneously.
    Can anybody please guide me on what might be the real cause for this as this error is happening randomly.
    regards,
    N.Jain.

    HI,
    Have you used per File transfer parameter in FTP Communication channel.
    It makes the FTP adapter inactive in ideal time.
    So add the poll interval may be for every 30 mins or something like it. It will forcefully activate the FTP port after every 30 mins. You may have the poll interval for every 1 min. Only the files to be picked up are getting logged in in XI monitoring.
    So there will be no garbage collection of unwanted messages in Monitoring.
    Thanks
    Swarup

  • How to generate a empty file in AL11 using ABAP and unix command

    Hi Experts,
    when load infopackage triggers it will search file from AL11 if file is available it will get loaded successfully.  When there is no file in AL11 error while opening file (orgin A) and the load will fail.  At this level i have to write a abap code using unix command to generate a empty file.
    Is there any way to achieve the above requirement.
    Thanks
    Vara

    Hi,
    If i get your requirement properly then you want to create a blank file if there is no file on the application server so that your infopackage does not fail, am i correct.
    If this is your requirement then this can be easily done if you use process chain to load the file via infopackage. Follow the following steps:
    1. Add a ABAP program before the infopackage and check if the file is present on the server or not. Use a simple ABAP statement OPEN DATASET <FNAME>. Check the SY-SUBRC after this statement if it is not 0 then it means that the file does not exist on the application server.
    2. Once you have established that the file is not present create a flat file using a code similar to the below one
    OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE
                          MESSAGE D_MSG_TEXT.
    IF SY-SUBRC NE 0.
      WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
      EXIT.
    ENDIF.
    * Transferring Data
    LOOP AT INT_table.
      TRANSFER INT_table-field1 TO FILENAME.
    ENDLOOP.
    * Closing the File
    CLOSE DATASET FILENAME.
    3. Add your infopackage step after this ABAP program in your process chain.
    I hope this helps.
    Best Regards,
    Kush Kashyap

  • Not getting Response from RFC

    Hi,
        I am doing RFC to File. I could generate the FILE successfully. But I am not getting Response from RFC. I am getting empty payload. I am doing with out BPM. I did succesfully File-RFC-File. but here RFC is the sender. I have some doubts  in defining Interface mapping and Message Mapping. Is this a Syscronous scenario by default ?
    If I want to get the resonse of RFC to a file. How many Receivers and Senders do i need to create?
    Regards,
    Varun
    Edited by: Varun on Sep 9, 2008 1:00 PM

    hi,
    Map Rfc.response to the File; hence rfc sender adapter and file receiver adapter..one sender n 1 receiver.Remember:
      1. In the report that makes the call to XI , make sure that you use call RFC in a background task.
      2. Make sure you use Commit Work at the end of the report.
    Follow:
    Send RFC to SAP XI – Asynchronous
    Also pls visit
    Re: RFC to FILE
    for the same scenario.
    Thanks,
    Durga
    Edited by: NagaDurga Nannapaneni on Sep 9, 2008 10:55 AM

  • Transportation lane KEY not getting generated in the table

    Transportation lane KEY not getting generated in the table
    Hi folks,
    The issue is like this :
    We have a weekly workorders upload program from legacy systems to SAP-APO. The legacy planners send a .CSV file containing material-wise workroders. A customised zee program picks these quantities & writes them in Prod.planned keyfigures in SNP planning book. This process is done for the manufacturing locations only.
    Lately workorders for two particular material M1 & M2 had failed to get upload. It gives the error 'NO VALID SOURCE OF SUPPLY COULD BE FOUND' in its Job log. We did some debugging & found that for successful materials the  TRPID is getting generated in the table /SAPAPO/V_TRPROD  whereas this TRPID is missing for M1 & M2. Why this is happening is our main concern. We tried deleting the PPM & creating this again, assuming that the PPMID is the precursor for generating this TRPID, but this yielded no results.
    ____ for successful upload______________
    se16 --> /SAPAPO/V_TRPROD
    Version = 000
    LOCTO = LOCID KEY for manufacturing location
    MATID = MATID KEY of successfully loaded workorder
    Enter
    This gives the following results
    TRPID = TRPID KEY
    LOCFR = LOCID KEY for manufacturing location
    LOCTO = LOCID KEY for manufacturing location
    MATID = MATID KEY for successfully loaded workorder
    ( This seems a self-lane, i.e both TO & FROM location are same)
    ____ for unsuccessful upload________
    se16 --> /SAPAPO/V_TRPROD
    Version = 000
    LOCTO = LOCID KEY for manufacturing location
    MATID = MATID KEY for unsuccessfully loaded workorder
    Enter
    This gives the following results
    Error = No Table entries found for specified KEYS
    We are perplexed why this TRPID is not getting generated for these two particular material M1 & M2?
    We have deleted their PPM & re-created them to cross-check if the PPMID KEY is the trigger for generating the TRPID key. This didn't work!
    Please let us know in case someone faced a similar issue.
    Many Thanks.
    Kumar
    Edited by: Blue Lotus on Jun 9, 2011 2:44 PM

    Yes Anand.
    We deleted the PPM & created it again, which didn't work.
    Later on we deleted the product itself from APO & re-CIFed it from R3 & then re-created the PPM.
    The PPMID which was missing earlier is now getting created! However no luck with the TRPID.
    Why this TRPID is not getting generated in our only concern
    Regards
    Kumar

Maybe you are looking for

  • MIGO in MM

    during GR in MIGO transaction i have following error "period 003/2008 is not open for account type S and G/L 400000" some one can help me to resolve the error thanks

  • The file "iTunes Library.itl" can not be read because it was created by a new version of iTunes.

    so my computer got unplugged and its battery died right as it was finishing an iTunes update. when i restarted it, i got the above message. i re-installed iTunes from the website and that didn't help. i went directly to the mp3 files and tried to ope

  • Language characters in Resource Bundles

    Hi all, We are implementing internationalization of Portal in English and Chinese and we are using resource bundles. We found that we can paste chinese characters in the resource bundle instead of unicode characters, they are visible properly in the

  • 1042 Configuration in SAP

    My company has never implemented 1042 withholding tax and now we have request to do that.  They also want me to turn the extended withholding tax on so we can post multiple tax codes to one invoice.  I have ran the conversion and I have multiple erro

  • Delivery status in mail (hello?)

    it seems that lately some of my sent mails are lost in cyberspace. i don't get a faillure notice from the mailsverver, and still some of my mails (even without attachment) never arrive at adresses that i very often use... can i get a delivery status