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

Similar Messages

  • Dynamic configuration bean in JMS Adapter

    Hello Experts,
    My scenario is JMS(Active MQ) to File.Its just Passthrough scenario and no mapping involved.
    Filename will be coming in one of the JMS Property (say businessId) and I need to set this filename to file adapter.
    I have refered the stefan's blog and used the Dynamic configuration bean module in sender JMS adapter.
    getFilename key.1 write http://sap.com/xi/System/JMS DCJMSMessageProperty4
    getFilename value.1 module.filename
    setFilename key.1 read http://sap.com/xi/System/File FileName
    setFilename value.1 module.filename
    But required filename is not populated in the target File.Any other configuration is missing here?

    Hi Karthiga
    Did you set the ASMA properties in both your sender JMS channel and receiver File channel?
    For the JMS adapter, as shown below, you will need to enter the DCJMSMessageProperty4 into the table
    Configuring the Sender JMS Adapter - Configuring the JMS Adapter in the Integration Directory/PCK - SAP Library
    If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (Maximum of 10).
    In the table, enter the names of the JMS message properties whose values are to be included in the message header of the PI message.
    The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.
    For the File adapter, you need to check the ASMA FileName attribute.
    Once you have this configured, in your message, you should be able to see that the value is in the DynamicConfiguration section of the SOAP header.
    Rgds
    Eng Swee

  • Dynamic configuration information

    I can call getConfigDescriptionRegistry.getConfigDescriptions or one of the other methods to get the configuration descriptions for an thing-type. If I wanted to modify these at runtime, and provide my own configuration provider, can I do this? I'm not sure what happens deeper in the system - I assume that only 1 provider can respond to any uri? Or maybe not - if so, how is this managed?
    I have two needs -:
    1) To be able to add some configuration options into a parameters [options] array. These are only derived at runtime and are system/network dependant, so can't go in the XML.
    2) To be able to add additional parameters to the configuration. Again, these are derived at runtime depending on how a device is configured (for example).
    I can easily create my own provider and completely avoid using the XML provider, but I'd kind of like to be able to lever off the existing infrastructure and just add to/modify the static configuration rather than have to reimplement everything...
    I guess I could (probably!?!) use getConfigDescriptionRegistry.getConfigDescriptions to get the static data, and then create my own provider that appends my data and modified the data that needs to be changed? I would guess it needs a different uri, although I suspect that this might then break something else when the system tries to link thing-types to the configuration provider? This seems a little messy though so maybe there's a better way?
    Are there any pointers on how this might be achieved? I'm thinking it might be easier to do it all in my own config provider which is what I'm currently doing (mostly for test and concepts), but I want to work out the best way for a the final implementation...
    Cheers
    Chris

    Kai Kreuzer wrote on Wed, 22 July 2015 10:44
    Which leaves us with Chris' problem that he would like to offer options specific to a certain device at a specific moment. The use case with the WLAN SSIDs is actually also such a case, so I guess sooner or later we need to address this.
    Where do we go with this one? It's my next target to hit
    So, if we don't want to link this to things (and I totally agree with the rationale), then we need an alternative. Currently, we have configDescriptions to describe the configuration options, but the 'other side' of the interface (the actual setting of the config) is done differently for different classes (I think that's true). For example, in the thingHandler, we have the handleConfigurationUpdate method - maybe in the channelHandler there's a similar method (I've not checked) - I don't know what other classes use the configDescriptions (rules I think?) but I guess every implementation is different?
    Why aren't there standard interfaces for handling the various configuration related functions. We could have had (eg) ...
    // Handle the updates of any configuration
    interface ConfigConsumer() {
    void handleConfigurationUpdate(Map<String, Object>);
    // Handle dynamic configuration updates
    interface ConfigDescriptionUpdate() {
    List<ParameterOption> getOptions(String parameterId, Locale locale);
    A thingHandler, or ruleHandler, or whatever wants to implement configuration implements these interfaces. Then, all configuration, both description, dynamic changes, and handling of changes, could all go through a central provider (and even REST interface!).
    As far as implementation (and looking specifically at things here - other implementations would be similar): For registration, when the thingHandler is created, a check could be made to see if it implements this/these interfaces, then to register this handler with the configDescriptionProvider (along with it's UID). When the config descriptions are updated, the configDescriptionRegistry can request the updates from the handler if there's one registered.
    One thing I'm unsure of here is the use of the UID. For things/channels etc, it seems a good idea to include the thingUID as it makes it a simple lookup in the configProvider (and if you didn't use the thingUID, I'm not sure how you'd link it). However, will all implementations of configDescriptions have a UID - eg I think I read rules will use the same config services - will they have a UID?
    I realise I've probably confused matters by suggesting a common interface for handling of config changes as well as just covering the issue at hand, but I thought I'd mention it since it does in some ways seem a shame to have a common config description provider, but no common way of handling configuration updates/changes etc... Anyway, I hope that didn't confuse matters (too much!) - we could ignore the handleConfigurationUpdate side, and just look at the ConfigDescriptionUpdate, which is the current issue at hand...
    What do you think? I've not thought this through in massive detail, but if you think this is workable, I'd be happy to look at the ConfigDescriptionUpdate impementation further...
    Chris

  • Is Dynamic Configuration possible with IDOC adapter.

    Hi,
    I have SOAP to IDOC scenario. I have many SAP receivers and are determined at runtime in a Java map.
    Can i use Dynamic Configuration for IDOC adapter?
    Thanks
    Shakthi

    Hi Sivasakthi,
    Why do you need Dynamic Configuration in receiver IDOC?
    Regards,
    Sanjeev.

  • Using Dynamic Configuration api for SOAP adapter

    I want to use Dynamic Configuration api to send a SOAP request to a webservice.
    tha value in my adapter is
    my Target URL  is
    http://xidr3.bcs.de:50000/XISOAPAdapter/MessageServlet? channel=:Routing2_Service:SS_SOAP_Sender_Working_June12&nosoap=true
    which is the corresponding field i have to set in Dynamic Configuration?
    I have written the following code is this right?
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    String temp = "http:/"+"/sap.com/xi/XI/System/SOAP";
    DynamicConfigurationKey key = DynamicConfigurationKey.create(temp, "TServerLocation");
    String varURL =
    "http:/"+"/xidr3.bcs.de:50000/XISOAPAdapter/MessageServlet?channel=:Routing2_Service:SS_SOAP_Sender_Working_June12&nosoap=true";
    conf.put(key,varURL);
    return "";

    Hi,
    Yes, your code looks fine. Can you let me know what is the error you are getting. Have you checked the Flag in your communication channel.
    Use Adapter-Specific Message Attributes
    Variable Transport Binding 
    Once you test your scenario you can see the Dynamic URL in your message Header by going to tcode sxmb_moni. See if you are able to find something called DynamicConfiguration in your message haeader. If yes what is the value set there.
    PS: From the target URL you posted It looks like your webservice is hosted on the XI box itself. Is it the same XI box or different box? Just curious to know.
    Reward point if answer is helpful
    Thanks
    Amit

  • How can transfer the read file name via own developed adapter module

    Hello experts,
    I want to know how I can handle the following issue:
    I developed a J2EE adapter module for the file adapter "sender" with the aim to read the file name of incoming files. Thereto I implement the following code like this:
    public ModuleData process(ModuleContext mc, ModuleData md) throws
    ModuleException
    Hashtable mp = (Hashtable)
    md.getSupplementalData("module.parameters");
    String fileName = null;
    if (mp != null)
    fileName = (String) mp.get("FileName");
    Now I get the filename which includes a order nr.  I need this order number to call a RFC Adapter via mapping. So my question is how can transfer this order nr to the RFC adapter?
    Kind regards,
    Fatih

    Hi,
    >> to read the file name of incoming files
    Use file adapter with Adapter specific identifiers selected.
    >>Thereto I implement the following code like this:
    use udf in message mapping and avoid module
    >>Now I get the filename which includes a order nr. I need this order number to call a RFC Adapter via mapping. So my question is how can transfer this order nr to the RFC adapter?
    use RFC Look up function in message mapping...
    Is module so necessary in this case???
    Regards
    Suraj

  • Problem with Dynamic Configuration in SOAP-AXIS adapter..!!!

    Hi ,
    Idoc> XI>SOAP-AXIS
    I am doing a scenario where I need to pass the URL dynamically in SOAP-AXIS adapter by taking the SNDPRN of Idoc.
    If SNDPRN = 100 , message has to go to  http://10.190.25.16:8210/file/receiver
       SNDPRN = 200 , message has to go to  http://20.180.26.16:8210/file/receiver
    It is working correctly when I tried for single receiver. When I' tried to use DynamicConfiguration, it is coming in SOAP document but it is not working and not passing to correct channel.  According to this note 1039369, I mentioned the following modules.
    AF_Adapters/axis/AFAdapterBean  --->                 afreq
    AF_Adapters/axis/HandlerBean      --->                  xireq 
    AF_Adapters/axis/HandlerBean      --->                  dc
    AF_Adapters/axis/HandlerBean       --->                 remover        
    AF_Adapters/axis/HandlerBean       --->                 trp
    AF_Adapters/axis/HandlerBean        --->                xires       
    AF_Adapters/axis/AFAdapterBean    --->               afres
    xireq ->  handler.type-> java:com.sap.aii.axis.xi.XI30OutboundHandler
    dc    ->  handler.type-> javasap.aii.axis.xi.XI30DynamicConfigurationHandler
    dc   --->   key.1 --->      write http://sap.com/xi/XI/System/SOAP TServerLocation
    dc    --->          location.1  --->         context
    dc     --->         value.1      --->        transport.url
    remover    --->  handler.type    --->   java:com.sap.aii.axis.soap.HeaderRemovalHandler
    remover     ---> namespace    --->      http://sap.com/xi/XI/Message/30
    trp         --->     handler.type   --->    java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    trp           --->  module.pivot  --->     true
    xires     --->    handler.type   --->    java:com.sap.aii.axis.xi.XI30OutboundHandler
    and I am getting the below error in SOAP-AXIS channel
    Error Axis:    error in invocation: java.lang.IllegalArgumentException: object type invalid: class com.sap.aii.adapter.xi.ms.XIMessage
    Error MP:     Exception caught with cause java.lang.IllegalArgumentException: object type invalid: class com.sap.aii.adapter.xi.ms.XIMessage
    Error           Exception caught by adapter framework: object type invalid: class com.sap.aii.adapter.xi.ms.XIMessage
    Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: object type invalid: class com.sap.aii.adapter.xi.ms.XIMessage: java.lang.IllegalArgumentException: object type invalid: class com.sap.aii.adapter.xi.ms.XIMessage
    Kindly let me know if anyone has any idea what might be wrong?
    Thanks
    Deepthi

    I have a similar problem. I also like to add some header fields to my message und that's way I'm trying to use the AXIS adapter. (Axis adapter FAQ question 30) Unfortunately I'm getting exactly the same error message:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.IllegalArgumentException: object type invalid: class com.sap.aii.adapter.xi.ms.XIMessage
    Deepthi, you wrote that you have missed one jar file. Can you remember which file it was?

  • Dynamic Configuration of JMS/FTP Adapter

    Hi,
    I have a requirement where
    1. A single JMS adapter is used to connecting different MQ client. I want to send the details about the configuration at the run time.
    2. With respect to FTP adpater we are having a different Server from where the file is pulled.
    Is it possible to do a dynamic (Rum Time) configuration of parameter of JMS Adapter, FTP adapter?
    Thanks
    Gautam
    Edited by: sharmagt on Jun 11, 2010 7:10 AM

    Hi,
    >>>1. A single JMS adapter is used to connecting different MQ client. I want to send the details about the configuration at the run time.
    you can only set those: Adapter-Specific Message Attributes
    from
    http://help.sap.com/saphelp_nw70/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
    >>>2. With respect to FTP adpater we are having a different Server from where the file is pulled.
    this is not possible in standard
    Regards,
    Michal Krawczyk

  • 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 Configuration - Set Directory Path for File Receiver Adapter

    Hi Experts,
    I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf document I want to store in a dynamic directory (depending on the filename). so I have to read the filename out of the dynamic configuration and generate (depending on the filename) a directory for this file. Is that possible without a message mapping? I cannot make a message mapping because the file has the pdf format and should not get changed.
    best regards
    Christopher Kühn

    Hi Gaurav,
    I use the ASMA (respectively the filename) for the sender adapter. After the pdf was imported into XI this filename is in the ASMA.
    But what then??? How can I get this filename with the help of the variable substitution? and if I have this filename I have to change this filename a bit to generate the name / path of the directory.
    Please explain it to me detailled
    Thanks and regards
    christopher

  • Is there any way to read to dynamic configuration using abap mappings?

    Hi,
      Is there any way to read dynamic configuration suppouse filename using abap mappings, I mean using abap code?
    Appreciate for your response.
    Regards,
    Daniel.LA

    Daniel,
    Yes it's possible. Please refer Henrique Pinto's reply in this thread -Re: Abap mapping and variable substitution in File adapter
    raj.

  • Generic adapter module to read any xl file

    Hi Experts,
    I have a requirement where i was suposed to read xl file using sender file adapter module.
    Now i see ther are three more xls files of a completely different format, is ther any generic mdue to read so..can i be developed..
    or do i have to develope three different modules for this requirement..
    pls help me out

    Hi Ravindra
         public ModuleData process(
                   ModuleContext mc,
                   ModuleData imd)
                   throws ModuleException {
                   Object obj = null;
                   Message msg = null;
                   String msgType = null;
                   String nameSpace = null;
                   try {
                          obj = imd.getPrincipalData();
                          msg = (Message) obj;
                          msgType = (String) mc.getContextData("msgType");
                          nameSpace = (String) mc.getContextData("nameSpace");
                                                if (msg.getMessageDirection()== MessageDirection.INBOUND)
                             amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
                          else
                             amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.OUTBOUND);
                                                XMLPayload xp = msg.getDocument();
                          Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now got the xml payload object.");
                          if (xp != null)
                                  Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now calling the Convert Method to convert Excel to XML.");
                                  byte by[] = convert(xp.getContent(),msgType,nameSpace);
                                  Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Conversion Done Successfully.");
                                  xp.setContent(by);
                          imd.setPrincipalData(msg);
                          Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Principle data is set successfully.");
                   } catch (Exception e)
                        Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Module Exception Caught .");
                        ModuleException me = new ModuleException(e);
                        throw me;
                   return imd;

  • Get Message details in custom adapter module

    Hello,
    Could you please let me know how can we retrieve following parameters in custom adapter module?
    Message size
    Message Mapping name
    Operation Mapping name
    Sender and Receiver Interface names
    Thanks!
    Regards,
    Shweta

    Hi Shweta
    Not all the information is available directly from the adapter module.
    Message size
    Retrieve the input stream of the payload, convert the stream to bytes and count the bytes length.
    Message msg = (Message) inputModuleData.getPrincipalData();
    XMLPayload payload = msg.getDocument();
    InputStream inStr = payload.getInputStream();
    // Convert inStream to bytes
    int size = bytes.length;
    Sender and Receiver interface names
    You can only get Sender interface in sender module, and receiver interface in receiver module. You can get the from the getAction() method.
    Message msg = (Message) inputModuleData.getPrincipalData();
    String interfaceName = msg.getAction().getName();
    Operation Mapping name
    This is not directly available from the Adapter Framework. One workaround is to access this via the Integration Directory API. With the Interface Determination Service API, you can read the Interface Determination object to get the associated mapping. To do this you have to make a SOAP call to the API.
    Message Mapping name
    I'm not sure how this can be retrieved as this is only available in ESR.
    If the module is on the receiver side, another option is to extract the information during mapping and store it into Dynamic Configuration, then in the receiver module, to extract it from Dynamic Configuration.
    Rgds
    Eng Swee

  • Dynamic Configuration Bean

    Hi Experts,
    I am doing a pass through scenario (i.e. ICo) without any ESR objects and I want to add time stamp to the file name at receiver side.
    Could you please help me in doing this via Dynamic Configuration Bean?
    What I also want to do is to replace file name with interface name through dynamic configuration bean using File adapter in receiver side.
    But instead of getting the interface name in place of file name I am getting "message.interface" as file name. I have also used
    variable substitution in receiver channel along with ASMA attributes.
    Please suggest where I am wrong.
    Thanks,
    Aamir

    Hi Aamir,
    We are using only one Module :"AF_Modules/DynamicConfigurationBean" with the type "Local Enterprise Bean" and the system proposes a Module key.
    In the above screen shot Module key "1" works as "getFileName" and Module key "2" works as "setFileName" .
         Coming to Module configuration for Module key "1" we are providing the Parameter name as "key.1" and Parameter value as :"read http://sap.com/xi/XI/System/File FileName" this value reads the FileName and and repalces the FileName with Interface name based on the Parameter value as "message.interface" (attribute used to fetch the corresponding Interface Name) for Parameter name "value.1".
    Module key "2" we are providing the Parameter name as "key.2" and Parameter value as :"write http://sap.com/xi/XI/System/Messaging interface" this value writes the FileName by calling the module.
    I have worked with this Dynamic Configuration Bean in both File and SAP SFTP Adapter in SAP PI 7.3 in case of SFTP Adapter we need to follow the following steps.
    Thanks
    Durga

  • Get poll interval parameter from adapter module

    Hi,
    I'd like to make special treatment in my adapter module based on the "poll interval" information filled in Processing Parameters part of the adapter configuration.
    Can an adapter module access this information?
    regards
    Yann

    Hi Yann,
    >>>>Can an adapter module access this information?
    of course it can you just have to use
    a correct parameter's name
    check this post to get the java code
    Re: Access the URL Parameter from a Adaptermodule
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for

  • SKF transactional values based on company code

    Can anybody let me know the logic how we can seggregate transactional value passed to statistical key figure based on company code or is there anytable where we can direclty find SKF transactions involved based on company code ? Need to upload SKF tr

  • How can I have small videos play full screen?

    I have a design with embedded videos (pulling from my photo album). In the design they fit inside other elements, often at a reduced size. When I tap them in a presentation, I'd like them to go full screed instead of playing at their "native" embed s

  • 1080p pour export quality for 25p material from Canon HF100 PAL

    Hi I have now tested iMovie 11 with a Canon HF100 PAL version. Shooting in progressive. The AIC import has good quality. New 1080p export gives same pour quality as before when using QuickTime 7 for h.264 export. AIC export provides good quality. So

  • Doubt in Stored Procedures

    My Prg is Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:TempDb"; // Get a connection to the database Connection conn = DriverManager.getConnection(url) ; Statement stmt = conn.createStatement(); String createTable = "CREATE T

  • Uploading iphoto book

    G4   Mac OS X (10.3.9)   I tried today to upload my first ibook. It contained 48 pages of photos most of them 3-5 MB. As it loaded it said it was loading a 7.8 MB total. I canceled the order because it means there is not enough resoluction. What am I