Adapter module configuration

The message that reaches the file receiver channel is
<EDI_DC40>
              structure1
</EDI_DC40>
<EK1NA1M>
              structure 2
</EK1NA1M>
             So i wanna write a module configuration which will rename the first tag as <ek1na1m>. Plz help

Hi Sumaya,
you are creating the adapter module using the document i told or not...
if you are using that document, then see in the process method you will write all your code......you will take the message as a string........then you can manipulate your string as you want - means you can rename your node..........then you can set this string as your XMLpayload.....
Thanks,
Rajeev Gupta

Similar Messages

  • No SuchAgorithmException in Adapter Module configured EAR file

    Dear All,
    I have created an adapter module using 3DES encryption/decryption algorithm for File/FTP adapter configuration and have deployed it at J2EE server of respective XI system.
    The alogorithm and adapter module are working fine in DEV & QA environments but in Mirror system(which is similar to Prod), I have been encountering Error:-
    <i><b>java.security.NosuchAlgorithmException: Algorithm DESede not available</b></i>
    Can you please suggest what could be issue here? Any inputs will be highly appreciated.
    Thanks and Best Regards
    Prashant Rajani

    Hi
    see the below links
    http://help.sap.com/saphelp_nw04/helpdata/en/0d/d517412797f523e10000000a155106/frameset.htm
    CJS-20030  Checking if the secure store exists fails,
    SHA-1 MessageDigest not available during WebAS Java install
    /thread/12191 [original link is broken]
    /thread/11521 [original link is broken]
    verify url secKey
    Regards
    Chilla

  • 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

  • PI SFTP RECEIVER ADAPTER MODULE CONFIGURATION

    Hi,
    I am new in SFTP adapter. I want to transfer file from proxy to SFTP. I want to output file is in csv format. But now it is in  xml format.
    Please help me!!!
    My module configuration is in attachment..

    Hi
    I have got the problem. You have to modify your target structure in the below format
    <row>
    <column-name1>ABC</column-name1>
    <column-name2>12345</column-name2>
    <column-name3>Text1</column-name3>
    </row>
    Create any parent node and inside that create the sub-eliment STATUS and USERID
    something like
    MT_Succefactor
       <record>
       <STATUS>
       <USERID>
        </record
    Then you will get the desired output. Use the below content conversion paramters

  • Help on adapter module configuration

    Hi Folks,
    I want to pick a file and placed in the archive location.  I want to develope a adapter module for this. Can any one please let me know how would I develope an adapter module for this.
    Your help is highly appreciated.
    Thanks,
    Enivas

    Hi,
    It depends which SFTP adapter you are using as some vendors support archiving such as AEDAPTIVe SFTP Adapter (http://www.aedaptive.com/index.php/solutions/sftp-for-sap-netweaver) but I guess you are using Seeburger SFTP adapter ?
    However, if your adapter does not support archiving and you want to write an adapter module, you can refer the following link:
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81

  • Adapter module Transform.Class error

    Hello,
    I have a sender jdbc adapter which is calling the xslt transform class with no errors but its obvious that the xsl is not being invoked as my xml is not transformed, but I don't see any error in the audit log.  When I purposely use a non existent file path/file name in XSLTConversion.XSLTFileName I expect to get an error in the message monitor audit log but I do not.  Neither default.trace or xi.*.log provide any errors regarding the xslt transformation in the adapter module.  The audit log actually indicates: "Transform: successfully transformed"  Below is my adapter module configuration.  Can anyone point me to a log file that might contain adapter module errors or notice any problem with this module config?
    localejbs/AF_Modules/MessageTransformBean, Local, XSLT
    CallSapAdapter, Local, call_AF_MS
    XSLT, Transform.class, com.sap.aii.messaging.adapter.XSLTConversion
    XSLT, XSLTConversion.XSLTFileName, /usr/sap/XIS/DVEBMGS00/j2ee/cluster/server0/tmgxsls/GL_split.xsl
    Thanks in advance,
    Dave

    Hi
    Check for correct spelling:
    localejbs/AF_modules/MessageTransformBean
    Check the parameters for trailing spaces:
    'com.sap.aii.messaging.adapter.XSLTConversion_'
    Check the path:
    Windows: C:\...
    Unix: /usr/...
    and
    Check the adit log of the message monitoring in the RWB for entries according to the module....
    Trc or trace files on visual administrator is the closest answer from my part.
    please refer,
    /people/michal.krawczyk2/blog/2005/09/07/xi-why-dont-start-searching-for-all-errors-from-one-place
    regards,
    vasanth

  • Dynamic configuration required in sender file - Adapter Module

    Hi Everybody,
    I am developing an Adapter Module in the file adapter (sender) using Adapter Specific Message Attributes.
    I am using Dynamic configuration inside the Module Process method in the adapter module.
    We are getting an error saying Dynamic Configuration cannot be resolved.
    Can anybody tell me the package to be used.
    Thanks,
    Zabiulla

    You can access the dynamic configuration in adapter module like this:
    Message msg = (Message) inputModuleData.getPrincipalData();
    String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
    You do not need any addition library besides the adapter module API.
    Hope that helps
    Stefan

  • Dynamic configuration in adapter module

    Hi friends
    I need some information on how to carry out dynamic configuration in adapter module.
    To be precise I want to assign file name dynamically to message header in adapter module, not in runtime mapping.
    Regards
    Akhil

    HI Akhil,
    file adapter dynamic file name
    Problem in dynamic file name in File reciever adapater
    Dynamic  File Name for Receiver File Adapter
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Thax
    Chirag

  • Reading Dynamic Configuration information in side adapter module.

    Hi All,
    We are writing an adapter module for one of our receiver adapter.
    On the Sender side we have a file adapter whose adapter specific properties are checked. So the message has the file name in the Dynamic configuration.
    Now we need to read this file name from dynamic configuration inside our adapter module for receiver adapter.
    If any one can tell us how to do this we would be really thankful.
    Thanks
    Abinash

    Bhavesh,
    When we use the follwoing code inside mapping
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    the conf object gets populated
    but inside our adapter module we ares using
    Map param;
    DynamicConfiguration conf = (DynamicConfiguration) 
                   param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey key = DynamicConfigurationKey.create
                   ("http://sap.com/xi/XI/System/File","FileName");
                   String ourSourceFileName = conf.get(key);
    Now the question is from where the <b>object of par</b>am will initialize.
    I think we need to get container object from some where, but don't know how to get it as inside mapping the container object is passed as method argument.
    Thanks
    Abinash

  • Parameter name in module configuration of adapter module in comm channel

    Hi Experts,
    I have developed an adapter module to read a excel file , have used the module in the sender file adapter.
    What entrie should i put in parameter name and parameter value  in module configuration of adapter module in comm channel.
    Im too confused,,pls help

    Hi Ivan,
    The code is basically to read the all colums add em under xml tags and read from second row on wards the data
    please find below the module data code
    public ModuleData process(ModuleContext mc, ModuleData imd)throws ModuleException
                             Object obj = null;
                             Message msg = null;
                             MessageKey amk = null ;
                        amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
                        Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"Module called");
                        try {
                                  obj = imd.getPrincipalData();
                                  msg = (Message) obj;
                                  XMLPayload xp = msg.getDocument();
                                  if (xp != null)
                                        byte by[] = convert(xp.getContent());
                                             xp.setContent(by);
                                       imd.setPrincipalData(msg);
                              catch (Exception e)
                    return imd;
                   public byte[] convert(byte src[]) throws Exception
                        String xmldata = "";
                   try
                             ByteArrayInputStream byteArr = new ByteArrayInputStream(src);
                             Workbook w = Workbook.getWorkbook(byteArr);
                             xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"+ "<ns0:""MT_ExcelFiles"" ""xmlns:ns0=\"""urn:xyz:abc"+"\"> \n";
                               int a = w.getSheet(0).getRows();
                               int b = w.getSheet(0).getColumns();
                        for(int j=1;j<a;j++)
                                   for(int i=0;i<b;i++)
                                                  xmldata = xmldata + "<"w.getSheet(0).getCell(i,0).getContents().toString()">"w.getSheet(0).getCell(i,j).getContents().toString()"</"w.getSheet(0).getCell(i,0).getContents().toString()">";
                        xmldata = xmldata"</ns0:""MT_ExcelFiles"+">";
                        w.close();
              catch (Exception e)
           return xmldata.getBytes();

  • File Receiver adapter module Dynamic Configuration

    Hi All
    I have a adapter module in a receiver file adapter. In the code I try to access the file name through dynamic configuration,The file name gets set in the mapping.
    String strFileName = msg.getMessageProperty(new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File"));
    When my module get executed I get error: nested exception is: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageProperty(com.sap.engine.interfaces.messaging.api.MessagePropertyKey) of an object loaded from local variable 'msg'
    Is it possible to get file name in receiver adapter? if so why does this error occur?

    Yes it is possible...chk this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    i guess u have added this import statement in ur code:
    import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
    Code will be soemthing like this (FOR PI7.1)
    MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
    String filename = msg.getMessageProperty(mpk);
    Thanks
    Amit

  • Dynamic Configuration or Adapter module ?

    Hi Experts
    I need advice in the following scenarios where the interface is from a legacy file in the Source to an IDOC posting on the Target
    a) The logic for the mapping is that if the File name is A then pass 123 and if the file name is B pass 456
    for eg if it is IT_ABYYYYMMDD.350 then i have to pass 123 adn if it is  IT_ABYYYYMMDD.350 then i have to pass 456
    How is it possible to use the file name PI picks from the folder and use it in the mapping
    It has to be done in the File Adapter ? do i have to write an Adapter module for it ??
    how do i pass the file name in the mapping in IR ???
    b) i need to derive data from the file name
    for eg if the filename is IT_ABYYYYMMDD.345 and i have to derive the AB part from it and use it in the message mapping
    since it is to be maped to a target field int he idoc .. how can I do that ?
    Does it require a lot of coding ?
    I have read about Dynamic Configuration but where and how to use it ??
    can any one please help me with the steps to use or the code  for deriving the value AB from the File name IT_ABYYYYMMDD.345 ??
    thanks
    Rohan

    >
    RohanS wrote:
    > Yes I am on track .. just two small questions ..in michal's blog
    > the UDF code says
    >
    > DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    >
    > so does the first argument in the braces = the file path ? as in the server path and location ?
    >
    > and secondly
    > does this UDF require no input parameters cos in my mapping there is no source for this ... just that i need to derive this name and pass it to the target  field so will this udf take any input argument when i am creating it in message mapping n PI 7.1?
    >
    > or do I  just  create a UDF without a variable input and write this code and return as per your code and map it to the target ?
    >
    > thanks
    > Rohan
    first one is not path i.e file adapter property of SAP PI use as it is and need to pass some input to UDF just some variable which does nothing in the mapping and map the output to  your target variable
    HTH
    Rajesh

  • Mail adapter and MessageTransformBean module configuration issue

    Hi All,
    I am trying to use module configuration in Receiver Mail adapter. Below is my configuration. (We are using SAP PI 7.11)
    Parameter/General tab:
    Message Protocol : XIPAYLOAD
    Use Mail package option is selected.
    Content Encoding = none
    Module tab:
    Processing Sequnce:
    AF_Modules/MessageTransformBean  : XSLT
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean : mail
    Module Configuration:
    XSLT    Transform.Class                        com.sap.aii.af.sdk.xi.adapter.XSLTConversion
    XSLT    Conversion.XSLTFileName     /tmp/GL_POST_RESPONSE_EMAIL.xsl
    XSL works outside of PI . However, when i test with a message, I am seeing following errors in Runtime workbench:
    Please let me know what could be wrong in the above configuration
    23.03.2011 15:24:39 Information MP: processing local module localejbs/AF_Modules/MessageTransformBean
    23.03.2011 15:24:39 Information Transform: using Transform.Class: com.sap.aii.af.sdk.xi.adapter.XSLTConversion
    23.03.2011 15:24:39 Error Transform: Transformer Conversion1.0.0610 Error initializing XSLT Mode:; caused by javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    23.03.2011 15:24:39 Information Transform: transforming the payload ...
    23.03.2011 15:24:39 Error Transform: failed to execute the transformation: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message; nested exception caused by: java.lang.NullPointerException: while trying to invoke the method javax.xml.transform.Templates.newTransformer() of an object loaded from local variable templates
    23.03.2011 15:24:39 Error MP: exception caught with cause com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message; nested exception caused by: java.lang.NullPointerException: while trying to invoke the method javax.xml.transform.Templates.newTransformer() of an object loaded from local variable 'templates'
    23.03.2011 15:24:39 Error Adapter Framework caught exception: Error converting Message
    23.03.2011 15:24:39 Error Delivering the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message; nested exception caused by: java.lang.NullPointerException: while trying to invoke the method javax.xml.transform.Templates.newTransformer() of an object loaded from local variable 'templates'.

    Hi All,
    Issue has been resolved. There was some minor issue in the XSL. The XSL Stylus studio was not reporting this as an error. However PI's XSL engine was reporting that error. This error message was not showing up in runtime workbench. However, when i looked at the default trace, there were few more errors. After fixing the XSL, I am able to received the email
    Thanks
    -Pradeep

  • Accessing dynamically configured filename inside adapter module code.

    Hi,
    I am having a requirement where i have to access the filename configured using Dynamic configuration inside my receiver file adapter MODULE code.  I am having PI7.1.
    For accessing the DC filename i have inserted this piece of code inside my adapter module code:
    MessagePropertyKey MPK =new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
    String filename = msg.getMessageProperty(MPK);
    But when i am tesing this module i am getting: "Message processing failed. exception encrypting session key".
    This module is basically written for encryption.I am referring this blog:
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Do i  need to do something else for accessing DC filename inside my module??Please help??
    Thanks
    Amit

    Hi,
    My code is something like this:
    public ModuleData process(ModuleContext mc,
                   ModuleData inputModuleData)
                   throws ModuleException {
            Object obj = null;
             Message msg = null;
             MessageKey amk = null;
             String inpKeyLocation = (String) mc.getContextData("inpKeyLocation");
                try {
                  obj = inputModuleData.getPrincipalData();
                     msg = (Message) obj;
                  amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
                    XMLPayload xpld = msg.getDocument();
                  MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
                  String filename = msg.getMessageProperty(mpk);
                  InputStream inps = (InputStream) xpld.getInputStream();
                                        and so on ......
    My encryption method somewhere down the line will use "filename" as one of its input.
    Please help??
    Thanks
    Amit
    Edited by: AmitSri on May 25, 2010 1:43 PM

  • Debugging JMS adapter with Module Configuration

    Hi.
    I have a problem debugging my JMS adapter with module configuration.
    All I get from the Message Monitor is a status "System Error", and no error category or error message.
    I know there's an error in my Module configuration design, since it works fine without.
    My configuration looks like this:
    PROCESSING SEQUENCE:
    1     localejbs/AF_Modules/MessageTransformBean     Local Enterprise Bean     XML2Plain
    2     localejbs/SAP XI JMS Adapter/ConvertMessageToBinary     Local Enterprise Bean     convert_XI2Bin
    3     localejbs/SAP XI JMS Adapter/SendBinarytoXIJMSService     Local Enterprise Bean     exit
    MODULE CONFIGURATION:
    XML2Plain     Transform.Class     com.sap.aii.messaging.adapter.Conversion
    XML2Plain     Transform.ContentType     text/plain;charset=utf-8
    XML2Plain     xml.conversionType     StructXML2Plain
    XML2Plain     xml.addHeaderLine     0
    XML2Plain     xml.recordsetStructure     STARTRECORD,DATARECORD,SERVICEYDELSERRECORD,SLUTRECORD
    XML2Plain     xml.STARTRECORD.fieldFixedLengths     2,8,6,7,10,7,3,3
    XML2Plain     xml.DATARECORD.fieldFixedLengths     2,8,6,4,35,17,7,7,7,5,5,5,18,18,18,18,18,18,18,18,18,9
    XML2Plain     xml.SERVICEYDELSERRECORD.fieldFixedLengths     2,8,6,4,3,20,18,18,18
    XML2Plain     xml.SLUTRECORD.fieldFixedLengths     2,8,6,7,10,7
    XML2Plain     xml.STARTRECORD.fixedLengthTooShortHandling     Cut
    XML2Plain     xml.DATARECORD.fixedLengthTooShortHandling     Cut
    XML2Plain     xml.SERVICEYDELSERRECORD.fixedLengthTooShortHandling     Cut
    XML2Plain     xml.SLUTRECORD.fixedLengthTooShortHandling     Cut
    The structure of the message looks like this:
    <STARTRECORD> (occurence = 1)
    <DATARECORD> (occurence = 1..unbounded)
    --- <SERVICEYDELSERRECORD> (occurence = 0..unbounded)
    <SLUTRECORD> (occurence = 1)
    I've crosschecked every field, and it length and all looks like it should!
    The worst part is the one not getting the reason why it fails. Any way I can get this information?
    I've tried to look in the Adapter Framework log, but I have no clue where to look for anything usefull.
    Help
    Regards Peter

    Hello,
    Below is the module configuration in my JMS sender channel:
    Check Message          Local Enterprise Bean          key
    ConvertJMSMessageToBinary      Local Enterprise Bean      convert_JMS2Bin
    ConvertBinaryToXMBMessage     Local Enterprise Bean      convert_Bin2XI
    CallSapAdapter                Local Enterprise Bean          call_AF_MS
    CheckMessage is a custom module which does some check on the incoming message.
    Now what I want to know is at which position should I include the DynamicConfiguration Bean? Should it be included at position 1 or at position 2 or someother position?
    ~Thanks.

Maybe you are looking for

  • How do I add text typed in a Java GUI to my database?

    Using NetBeans, I've created a GUI, which has a 5 text boxes and an add/sumbit button. I've also created a database, which is on my Runtime Panel in Netbeans, and has a table with 5 columns. Once my GUI is running, I want the Add button to insert the

  • Wine and Intel HD 3000 with lib32-intel-dri

    I have a HP ProBook 4530s with Intel HD 3000 graphics. Wine doesn't find the graphics card. Usually lib32-intel-dri has solved this, however this time it didn't. fixme:d3d:wined3d_guess_card No card selector available for GL vendor 0x4 and card vendo

  • Java installation hangs when applying patches

    Hi all, I recently removed my java application from my computer then tried to reinstall from the add on plug in in firefox. The program would hang at applying patches. After serveral cleanings of the failed attempt, and many hard reboots later (becau

  • JTableHeader + columns

    Hello to all!!!!! I speak spanish I am working with a jTable in which the idea is to take information from a DB and to show it by this component. But it is that the columns of the table can be changed of position and be changed the size of them. So t

  • How do I upload multiple images to d-base through a single page?

    I can upload a single image with a form to my MySql database with no problem.  It sends the file name to the database then stores the image in an image file. But now I want to upload multiple images in the same way from the same PHP page.  Each multi