Dynamic conifguration for adapter module

com.sap.aii.mapping.api.DynamicConfigurationKey
Class used to create a key object for an adapter-specific attribute. The key object comprises the adapter namespace and the property name.
●     com.sap.aii.mapping.api.DynamicConfiguration
Class used to read, change, or delete the value of an adapter-specific attribute. In a method, you use objects of type DynamicConfigurationKey to access the attributes

For Module Processors, check Adapter-Specific Message Attributes of the following link:
http://help.sap.com/saphelp_nw2004s/helpdata/en/17/50d440e14f8431e10000000a1550b0/frameset.htm
The methods to set/get Attributes in Adapter Module are:
Message.setMessageProperty()
Message.getMessageProperty()
The following info can be obtained in javadoc:
getMessageProperty
public java.lang.String getMessageProperty(java.lang.String namespace,
                                           java.lang.String name)
    Returns the value of an additional message property, in case that such an value exists.
    Parameters:
        namespace - The namespace of the property to get.
        name - The name of the property to get.
    Returns:
        The value for the given namespace/name combination, or null, when no such value exists.
setMessageProperty
public void setMessageProperty(java.lang.String namespace,
                               java.lang.String name,
                               java.lang.String value)
                        throws InvalidParamException
    Sets an additional message field, if supported by the Message profile implementation. Such additional fields will not be visible as an own table column in the MS message monitoring, since it is to be stored as part of the message header. This mechanism allows different protocol implementations to support more message fiels, as per default available in the MS Message interface. Such fields can be accessed through this API method, without casting to the specific Message implementation.
    Parameters:
        namespace - The namespace of the property to set.
        name - The name of the property to set.
        value - The value of the property to set. When null is given as the value param, an already set value will be deleted.
    Throws:
        InvalidParamException - If either the length of one of the parameters is too long, or in case of an unknown/not allowed namespace/name combination (but only if the Message implementation has the necessary knowledge about the valid namespace/name pairs).
Also, for an example, check the following blog:
/people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
Regards,
Henrique.

Similar Messages

  • 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

  • Dynamic destinations for adaptive web service in webdynpro for java

    Hi,
    Please advice me on how to create dynamic destination for adaptive web service model in webdynpro for java.
    Regards,
    Patana

    Hi,
    If this is the case, then use the HTTP destination for this.
    What you need to do is:
    1. Create one HTTP destination in visual administrator at services-> Destinations. Provide HTTP url of the your web service and the security options.
    2. Specify this HTTP destination in the code before executing web service model.
    Write following code for that:
    wdContext.current<node name>Element().modelobject()._setHTTPDestination(<Specify HTTP destination name>);
    Then execute your web service model.
    Now, whenever you want to change the server on which your web service is running, make change in the HTTP Destination in visual administrator.
    Refer this link,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
    Regards,
    Sunaina Reddy T

  • 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

  • Reg::Error in XMLDecryption algorithm for adapter module in SAP PI

    Hi Experts,
    I have developed a custom java code for encryption and decryption for XML to be included in adapter module in SAP PI using SAP netweaver.My decryption code is working fine for stand alone java application.But when I create EJB project and deploy it I get no error..But in communication monitoring of SAP PI i get the below error
    Error: org.apache.xml.security.encryption.XMLEncryptionException: No Key Encryption Key loaded and cannot determine using key resolvers
    I included xmlsec1.3.0.jar file as external library..
    I would be grateful if you could suggest any solution for the above issue.
    Thanks
    Priya

    Hi Priya,
                     I am working on the same senario if Uhave idea plz help me on it.
    Regards,
    Prasad.

  • NWDS 7.1 for adapter module of PI 7.1

    hi experts,
    i have been trying to develop an adapter module for PI 7.1 using this how to guide
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa&overridelayout=true
    I have downloaded the NWDS, but in the EJB project wizard..on page 11 in the guide above
    Target Runtime : SAP librarues
    Configuration : SAP EJB J2EE 1.4 project
    I m not getting the above, it just sez default J2EE runtim elibraries...
    also after completion of wizard im unable to get enterprise bean in the file context menu
    am i missing soomething..?pls help me out

    Hi Guys,
    I was goin thru this pdf to convert adapter module for 7.0 t 7.1
    I have added all the jars..how evre in the wizard as mentioned on page 8 of http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d0667f56-96c7-2b10-0e9a-c40fbd523f4d&overridelayout=true
    Add server libraries.. choose server runtime  choose SAP libraries..
    what r thee SAP libraries..do i have import soem mor ejars?
    can anyone pls let me know

  • How to get parameter for Adapter Module ?

    Hi XI Expert,
    I have write some simple adapter module in my sender file adapter. in order to make it more flexible i need to read some parameter that already set in communication channel module parameters.
    please advise how to get those parameter value from my ejb module.
    Thank You and Best Regards
    Fernand

    hi,
    follow this example SAP contribution for parameter in Adapter Module
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    Regards
    Ramesh P

  • JAR File for Channel-Class for Adapter-Modules

    Hello,
    does anybody know which JAR and Package i need for the Channel-Class.
    It's not:
    com.sap.aii.mapping.lookup.Channel
    I need this one with the method "getValueAsString" in order to write an Adapter-Module.
    Gunnar

    Hi,
    Check out this link for the documentation of com.sap.aii.mapping.lookup.
    You will get all the functions of this. and import com.sap.aii.mapping.lookup and use the function of this package.
    Link : http://help.sap.com/javadocs/NW04S/SPS09/pi/com/sap/aii/mapping/lookup/class-use/Channel.html
    hope this will help you.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • I need Java API documentation for Adapter Modules

    Hi
    Please provide me Java API documentation for Adatper Modules
    Regards
    Sowmya

    Use this
    https://help.sap.com/javadocs/pi/SP3/xpi/index.html
    http://help.sap.com/saphelp_nw04/helpdata/en/87/3ef4403ae3db12e10000000a155106/frameset.htm
    which is part of
    http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/frameset.htm
    Regards,
    Prateek

  • 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

  • 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

  • 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

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • Basics of Adapter Module

    Hi experts,
    What is adapter Module all about ,If you can give me some Basics about this will be Helpfull.
    with a simple example how to use it .
    Thanks & Regards
    Shakif

    Hi,
    While dealing with adapter modules,
    1. First, create an EJB Module.
    2. You create a Stateless session bean.
    3. You use the following attributes for the bean,
    Remote Interface: com.sap.aii.af.mp.module.ModuleRemote
    Home Interface: com.sap.aii.af.mp.module.ModuleHome
    Local Interface: com.sap.aii.af.mp.module.ModuleLocal
    LocalHome Interface: com.sap.aii.af.mp.module.ModuleLocalHome
    4. Your class must implement,
    Module.process(ModuleContext, ModuleData).
    5. You buiild an EAR archive and an Application Archive and then deploy this on your J2EE engine.
    For async sender/receiver adapters, you use modules before the adapter module.
    for sync sender/receiver adapters, you can wither use modules before the adapter module (they will affect the request message) or after the adapter module (affecting the response message).
    Refer
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    SAP NetWeaver Exchange Infrastructure - Adapter Module Development - Webinar Powerpoint
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3
    SAP Network Blog: XI: Dynamic configuration in adapter modules - one step further
    /people/michal.krawczyk2/blog/2006/10/09/xi-dynamic-configuration-in-adapter-modules--one-step-further
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fd/16e140a786702ae10000000a155106/content.htm
    /people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/a12241c20af16fe10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e4/6019419efeef6fe10000000a1550b0/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/327dc490-0201-0010-d49e-e10f3e6cd3d8
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/34a1e590-0201-0010-2c82-9b6229cf4a41
    thanks
    swarup

  • Crating adapter modules in XI

    Hi
    I went through a blog on this and seen that we need some jar files inorder to develop this. these are files they have mentioned in the blog
    aii_af_lib.sda,
    aii_af_svc.sda and
    aii_af_cpa_svc.sda.
    Where are these files placed in the XI server. can naybody please tell me the exact location.
    thanks

    Hi Sudhakar,
    These files to be deployed in Netweaver developer studio .
    Plz do refer the following blog it explains clearly...
    Adapter Module Development & Module Configuration
    Also refer...
    ADAPTER MODULES
    how to create modules on j2ee engine
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    Alerts from adapter modules - the JRA way!!
    Alerts from adapter modules - the JRA way!!
    Alerts from adapter modules - the JRA way!!
    Alerts from adapter modules - the JRA way!!
    RFC calls from Adapter modules...the Web Service Way!
    RFC calls from Adapter modules...the Web Service Way!
    TechEd 2007: EPI351 - Developing User Enhancement Modules in the Adapter Engine
    TechEd 2007:  EPI351 - Developing User Enhancement Modules in the Adapter Engine
    TechEd 2006: EPI350 - Developing and Testing Adapter Modules in SAP NetWeaver Exchange Infrastructure
    TechEd 2006: EPI350 - Developing and Testing Adapter Modules in SAP NetWeaver Exchange Infrastructure
    Migrate from Java embedding in Oracle BPEL to Adapter modules in SAP XI
    Migrate from Java embedding in Oracle BPEL to Adapter modules in SAP XI
    XI Mapping Module for AFW
    The specified item was not found.
    XI: Dynamic configuration in adapter modules - one step further
    The specified item was not found.
    Adapter Module Development & Module Configuration
    Adapter Module Development & Module Configuration
    Dynamic configuration in adapter modules
    Dynamic configuration in adapter modules
    Rename Attachment Adapter Module
    Rename Attachment Adapter Module
    Regards,
    Vinod.

Maybe you are looking for