Adapter Module is not Invoking

Hi
I have done one adapter module and i have given that in Sender Communication Channel. I have written audit log as well. But its not invoking.I am not getting any thing on Audit Log. My Scenario is working normally. Actually i have to get Host name at destination side but i am not getting
I ave created on jar file. I have extrancted that jar file and i found the following files
<javafile>.class
<javafile>.java
ejb-j2ee-engine.xml
ejb-jar.xml
but i have extract other in built adapter module jar file their i found manifest.mf apart from above mention files.
I have create the jar files using nwds version 7.0
My Adapter module is not working. I have done everything fine.Can anyone tell me the solution
Best Regards
Ravi Shankar B
Message was edited by:
        RaviShankar B

Hi,
Ur module name shud b like this
localejbs/<yourEJBClassName>
If you specify an incorrect or non-existing module name, it is simply ignored.
Check the following:
1. Your stateless session bean should implement SessionBean and Module.
2. The bean should have the following method
    public ModuleData process()
Try to create a file in XI Server directory from your adapter module code and this way check whether your module is called or not.
<i>[Reward if helpful]</i>
Regards,
Prateek

Similar Messages

  • File Receiver Adapter Batch File Not Invoking:

    Dear All,
    I am trying to invoke a Batch file in the Receiver File Adapter after Message processing.
    The Batch file is not at all getting invoked at all. i dunno whats the reason. Please help.
    Below is the Format in which i gave the batch file:
    F://Test//prakash//Endseperator.bat %F
    then i tried:
    F:\Test\prakash\Endseperator.bat %F
    then i tried
    F:
    Test
    prakash
    Endseperator.bat %F      each folder seperated by '
    ' whixh cannot be seen here.
    below is the batch file content of Endseperator.bat :
    F:
    cd "Test\prakash"
    java Endseperator "%F" "%F"
    Its working perfect when i manual execute the batch file. But i am not able to invoke via Receiver file Adapter.
    Please Advice.
    Regards,
    Senthilprakash.
    Edited by: senthilprakash selvaraj on Dec 18, 2008 11:47 AM
    Edited by: senthilprakash selvaraj on Dec 18, 2008 11:48 AM
    Edited by: senthilprakash selvaraj on Dec 18, 2008 11:49 AM

    Hi Senthilprakash,
    I guess you must know that the batch file must exist on the XI server, not on your local machine.
    if yes, try with one / like:
    F:/Test/prakash/Endseperator.bat %F
    Make sure the user <sid>adm (in case of Unix) or SAPService<SID> (in case of windows) has the execution right of your program.
    Jayson

  • J2EE adapter module not getting invoked by module processor

    Hi All,
    i have deployed my .ear file in SDM Repository successfully.
    but my J2EE adapter module is not getting invoked by module processor......this i can say because i have written code to audit log my message in the java class...but when i gave input an empty file, the audit log of that file in Message Audit Log showed only 3 Steps of file converted to XML format, no data found so not generating message, deletion of my empty file.
    Can anybody suggest how to enable my J2EE adapter module as i have created this module so that if i give empty file, then in the adapter i am creating a dummy XML for my message.
    Thanks and Regards,
    Rajeev Gupta

    Hi Stefan,
    1. JNDI name in visual admin is CustomerMeter
    2. the files in .ear file are:
    libraries,
    ejb project file,
    META-INF folder
    in ejb project file the following files are there:
    ejb-j2ee-engine.xml
    ejb-jar.xml
    CustomerMeter.class
    Please tell what to do now.
    Hi Amol,
    in audit log only 3 messages are coming: File converted to XML format, no data in document  so not sending message, deleting of empty file.
    i have given audit log statements in java class but my audit-log statements are not coming in the audit log
    this means my adapter module is not getting invoked.
    Please tell what to do to correct this error.
    Thanks and Regards,
    Rajeev Gupta

  • Adapter Module not working in Sender Communication Channel working in recie

    Hi
    I have written one adapter module. IF i give that Adapter Module in Sender Communication channel its not working. If i give that in Reciever Communication Channel its working. If i mention in both the channels then its working in sender communication channel also.But in only sender communication channel its not working in only reciever communication channel its working Can any one tell me why its happening
    Thanks & Regards
    Ravi Shankar B
    Message was edited by:
            RaviShankar B
    Message was edited by:
            RaviShankar B
    Message was edited by:
            RaviShankar B

    hi
    if its problem with my code why its working if i give the adapter module in both the communication channels?If i give in only sender communication channel the module is not invoking. its not showing any auditlogs.Can any one please help me
    OUTBOUND is for sender
    INBOUND is for reciever right.?
    the following code i have written
    public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              String SIGNATURE =
                   "process(ModuleContext moduleContext, ModuleData inputModuleData)";
              Object obj = null;
              Message msg = null;
              String filename = null;
              AuditMessageKey amk = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message) obj;
                   System.out.println("&&&&&&&&&&&&&&&&&" + msg);
                   if (msg.getMessageDirection().equals(MessageDirection.OUTBOUND)){
                        amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.OUTBOUND);
                        Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,">>>>>>>>>>>>>>> etHostName: Module called"+ i++);
                   }else{
                        File filename1 = new File("
    10.7.1.43
    XI
    source","text.txt");
                        filename1.createNewFile();
                        amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
                        Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,">>>>>>>>>>>>>>> etHostName: Module called"+ i++);
                   System.out.println("**************" + amk + "***********");
              } catch (Exception e) {
                   Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,">>>>>>>>>>>>>>> GetHostName: Error Module called");
                   e.printStackTrace(System.err);
                   ModuleException me = new ModuleException(e);
                   throw me;
              // Read the channel ID, channel and the module configuration
              try {
                   Hashtable mp = (Hashtable)inputModuleData.getSupplementalData("module.parameters");
                   if(mp != null){
                        filename = (String)mp.get("FileName");
                        Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"Host >>>  Element Name is set to {0}"+filename );
                   }else{               
                        Audit.addAuditLogEntry(amk,AuditLogStatus.WARNING,"HostElementName parameter is not set. Default used: HostName.");
                        filename = "FileName";
              } catch (Exception e) {
                   e.printStackTrace(System.err);
                   Audit.addAuditLogEntry(amk,AuditLogStatus.ERROR,"Cannot read the module context and configuration data");
                   ModuleException me = new ModuleException(e);
                   throw me;
              try {
                   XMLPayload xmlpayload = msg.getDocument();
                   DocumentBuilderFactory factory;
                   factory = DocumentBuilderFactory.newInstance();
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   Document document =
                        builder.parse((InputStream) xmlpayload.getInputStream());
                   Element rootNode = document.getDocumentElement();
                   if (rootNode != null) {
                        Element childElement = document.createElement("filename");
                        childElement.appendChild(document.createTextNode(filename));
                        rootNode.appendChild(childElement);
                   // Transforming the DOM object to Stream object.
                   TransformerFactory tfactory = TransformerFactory.newInstance();
                   Transformer transformer = tfactory.newTransformer();
                   Source src = new DOMSource(document);
                   ByteArrayOutputStream myBytes = new ByteArrayOutputStream();
                   Result dest = new StreamResult(myBytes);
                   transformer.transform(src, dest);
                   byte[] docContent = myBytes.toByteArray();
                   if (docContent != null) {
                        xmlpayload.setContent(docContent);
                        inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   e.printStackTrace(System.err);
                   Audit.addAuditLogEntry(amk,AuditLogStatus.ERROR,"Cannot read the module context and configuration data");
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;
    Best Regards
    Ravi Shankar B
    Message was edited by:
            RaviShankar B
    Message was edited by:
            RaviShankar B

  • 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

  • Empty file to process in customer J2EE adapter module

    Hi All,
    if i give an empty text file to a sender communication channel, then no message is generated by XI.
    i want to generate a dummy XML if empty file is given.
    so is it possible to make a customer-specific J2EE adapter module - then deploy it - then if in sender comm channel this adapter module is written before SAPAdapter module, then should XI generate a dummy XML for this empty file.
    i am asking this because i developed a J2EE adapter module, then deployed it, then tried to invoke it  from sender comm channel but this J2EE adapter module is not getting invoked - this i can tell because i have written the following lines only in Java class process method:
    <i>Message msg_audit = (Message)inputModuleData.getPrincipalData();
    AuditMessageKey amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"FileCheck: Module called");
                                                 return inputModuleData;</i>
    but still in the audit log only 3 messages of entire file content converted to XML format, empty doc so no sending of message and deleting of empty file are coming.
    <b>Can anybody suggest whether is it possible to process an empty text file to generate a dummy XML in sender communication channel in XI.</b>
    Thanks,
    Rajeev Gupta

    Hi All,
    When i write this code:
    try
                                                                obj = inputModuleData.getPrincipalData();                                                  
                                                                msg_audit = (Message)obj;
                                                                amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
                                                                Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
                                       <i>File f = new File("/components/XITEMP/sample/PWC/check.txt");                                                            
                                                                          if (f.canWrite())
                                                                                         PrintStream ps;
                                                                                         FileOutputStream fos =new FileOutputStream(f);
                                                                                         File f1 = new File("/components/XITEMP/sample/PWC/check1.txt");
                                                                                         ps = new PrintStream(fos);
                                                                                         if (f1.exists()==false)
                                                                                              f1.createNewFile();                                                                    
                                                                                         ps.println("Testing");
                                                                                         ps.close();
                                                                                         fos.close();                                                            
                                                                               else
                                                                                    File f2 = new File("/components/XITEMP/sample/PWC/check2.txt");          
                                                                                    if (f2.exists()==false)
                                                                                              f2.createNewFile();                                                                    
                                                                               }               </i>                                        
    it works fine......it creates the file check1.txt
    but when i place the italiced code in this format:
         try
                                                                obj = inputModuleData.getPrincipalData();                                                  
                                                                msg_audit = (Message)obj;
                                                                amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
                                                                Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
                                                           catch (Exception e)
                                                                     try
                                                                          File f = new File("/components/XITEMP/sample/PWC/check.txt");                                                            
                                                                          if (f.canWrite())
                                                                                         PrintStream ps;
                                                                                         FileOutputStream fos =new FileOutputStream(f);
                                                                                         File f1 = new File("/components/XITEMP/sample/PWC/check1.txt");
                                                                                         ps = new PrintStream(fos);
                                                                                         if (f1.exists()==false)
                                                                                              f1.createNewFile();                                                                    
                                                                                         ps.println("Testing");
                                                                                         ps.close();
                                                                                         fos.close();                                                            
                                                                               else
                                                                                    File f2 = new File("/components/XITEMP/sample/PWC/check2.txt");          
                                                                                    if (f2.exists()==false)
                                                                                              f2.createNewFile();                                                                    
                                                                     catch(Exception ex)
    it doesnot create the file check1.txt......
    Can anybody suggest why in the exception block this italiced code is not working........means it is working in try block of try{}catch{} block.......but it is not working in catch block of try{}catch{try{}catch{}}
    Thanks,
    Rajeev Gupta

  • Adapter Module Receiver File Adapter

    Hi All,
    I am getting file name in the Mapping in my target structure in a field FILENAME and i want to use this field to create a file at the target with the name as the value in FILENAME.
    I have to develop this by using Adapter Module.
    Note : This can be done by Variable Substitution and Dynamic Configuration UDF.But i want to implement the same by using adapter module.
    Can somebody help me out in getting the FILENAME from mapping inside the module process method of module.
    Thanks,
    Zabi

    Try this..
    private Map param;
    DynamicConfiguration conf = (DynamicConfiguration) param.get(
    StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String Filename = conf.get(KEY_FILENAME);[/code]
    Thanks
    Sebin

  • Adapter Module for Sender File Adapter to access a Flat file

    Hi,
    We have a scenario where the source is a flat file.I want to develop an Adapter Module to make a small change to every line in the Flat file.
    Now how do we read a flat file in the Adapter Module?Coz the flat file will be converted to XML file by the Standard Adapter Module of the File adapter.
    Please help me out with this.
    Thank you,
    Anu.

    Hi Anu,
    If you are not using Content Conversion option Standard Adapter Module does not convert the Flat file to XML .
    You can directly access the payload as it is in flat file in the Adapter Module and make changes.
    Use the Standard classes ModuleData & moduleContext to fetch the Payload.
    chk this :
    Customized Sender Adapter Module
    XI: Read data from PDF file in Sender Adapter
    regards
    Ganga

  • How to Test Adapter Module in NWDS

    Hi Friends,
    I have written an adapter module. Before deploying on adapter engine, I want to do test in NWDS. Any idea how to do this. Please provide sample java code, if possible.
    Thanks,
    Sandeep Maurya

    Hi,
    Since runtime and module processor framework is not available on your local machine that's why adapter module test not possible using NWDS on local machine.
    Another possibility is to install PCK on some local machine for testing purpose.
    You must deploy (either on PCK or AE) it and test.
    Regards,
    Gourav

  • SFTP adapter Module

    Hi All
    I need to find a way to handle sftp, I looked at developing a custom adapter but think doing it in a adapter module would be much easier. The question I have is, is it possible to add a adapter module to the existing file adapter to handle the sftp. I have had some experience on developing adapter module but not sure if this can be done. If anyone has some experience with this or tryed it before any help will be appreciated.

    Hi,
    Have you looked in to below blog,
    /people/daniel.graversen/blog/2008/12/11/sftp-with-pi-the-openssh-way
    try this way...
    Regards,
    Raj

  • MODULE NOT INVOKED

    Dear ALL
    we have developed a ejb adapter module for converting edi 997 format to xml .we are using file adapter as callsapadapter.
    Getting stuck up as module is not being invoked.
    What might be the problem..? and how to overcome this..??
    Helpful answers will be given reward points
    Regards
    Deepak

    Hi Abhishek,
    We are also using one adapter module to convert EDI using Conversion Agent, we have deployed all the Modules and these are in XI System.
    When we are giving the settings as given by you :
    Using the Module
    • If you want to use the module in an adapter, open the Integration Directory and
    create a new communication channel.
    • Enter the adapter-specific parameters and choose the Module tab page.
    A default entry contains the required adapter module.
    • Apply your module before the specific-adapter module:
    o Enter localebjs/<JNDI-Name> as module name.
    o Choose the type Locale Enterprise Bean.
    o Choose any module key. Using your module key, you can assign
    parameters to your module in the Module Configuration table.
    The system is not picking up the file from FTP Server, but when we are not using this module then default adapter is going at FTP server and picking up file, but we want to use this conversion module for converting the data.
    We have checked all JNDI name also in Visual Admin, all the paths are correct.
    But it is not picking up file from FTP Server, is there any other setting which we are not doing, please help,
    Regards,
    Study SAP

  • Sender Adapter Module Not Working

    Hi,
    I have changed an existing Sender Adapter Module code and deployed using SDM.
    It was working fine but after some days it is not working as designed. Say for an example, the number of pipes(|) in each record is one less than usual number of pipes. It does not say any error in module but in my java mapping raising GENERIC Exception.
    I had the same problem in Dev and now I am facing the same in QA.
    When I checked the standalone code it is working fine. Any reason for this anomalous behavior?
    Regards,
    Manikandan R

    Hi,
    Could you give us more details about : your coding, input sample when error is raised ?
    That'd help a lot
    Chris

  • Adapter module not including jar file

    Hi all
    Im trying to develop a adapter module but when I add the jar library I get warning saying:
    com.sap.aii.af.cpa.svc.api.jar will not be exported or published. Runtime ClassNotFoundExceptions may result
    Is there a way to fix this problem?

    > Im trying to develop a adapter module but when I add the jar library I get warning saying:
    > com.sap.aii.af.cpa.svc.api.jar will not be exported or published. Runtime ClassNotFoundExceptions may result
    > Is there a way to fix this problem?
    You can ignore it.

  • How do i know whether my adapter module is working or not?

    Hi
    I have written one Adapter Module and i have given that module in Communcation Channel.
    1.How do i know whether my module is working or not.
    2.How do i atleast my adpater module is calling or not?
    Please help me its very urgent
    Best Regards
    Ravi Shankar B

    Hi Ravi Shankar,
    Since u had written the module, u must have deployed the module on the adapter engine. Now follow this procedure:
    1. Set the breakpoint on the "process" method of ur java code.
    2. Put ur code into Debugging mode.
    3. Place the file again and try running ur scenario
    If the executuin stops at the method "process", then this means that ur module is getting called and there is some error in ur code.
    If the execution is not stopped there, then that means ur module is not visible to XI adapter engine. So either it is not properly deployed or there is some problem while developing it.
    Regards,
    Prateek

  • Adapter module not working

    Hi to all,
    I have written a custom adapter module that I use in a sender channel. I have deployed the EJB with NWDS. However, the module seems to be ignored from the adapter. Why? Can anyone suggest me?
    Thanks!

    Have you put the module at first place in the module chain?
    Are you working with SOAP adapter? The sender SOAP adapter does not support customer modules.
    Add some lines to your code to write anything to the audit log to make sure, that the module is called correctly.
    Regards
    Stefan

Maybe you are looking for

  • K8N Neo4 Platinum random lock-ups and BSOD

    I built a new PC about 3 months ago and from day 1 it has always locked up / frozen at random intervals. Sometimes it also BSOD's with a Machine Check Exception. Seems to lock up / freeze more often when have multifple windows open eg. Multiple IE ru

  • How to measure un-queued requests

    Hi. We have a web logic application that has to serve a lot of throughput. To prevent timeouts on the client side, I configured it so that the work manager that takes in the requests is limited to a certain amount. The max-threads is configured compa

  • Missing images in webhelp(primary layout) RH8

    I can see my images in the project file but when I generate to webhelp (primary layout) none of the images are displayed.  Can anyone help?

  • What happened to the mailto function in Safari 6?

    Here's my code: <A HREF="mailto:[email protected]">[email protected]</a> When you click on the link, rather than the user being directed to a new session in their email app with the email address in the "to" field, this just opens up a new page in Sa

  • Dramatically raised power consumption after OS upgrade

    Hello, I have model 8820, and after I upgraded OS version to 4.5 using this sw: 8820M_PBr4.5.0_rel75_PL2.7.0.66_A4.5.0.52_Orange_Slovakia.exe power consumption of my BB raised dramatically (it is 1 day between charging instead of 6 days with previous