How to read runtime constants in ejb Module?

Hi all,
Anyone knows how to have special access to Runtime Constants at ejb Modules? I've searched and all I found is for Java and ABAP Mapping ...I hope it is possible! I want to read the interface name in order to choose which code my module should apply, as a case statement I mean.
Thanks in advance,
Ricardo.

Hi Ricardo !
Check these links:
http://help.sap.com/saphelp_nw70/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
Parameter MessageId
Regards,
Matias.

Similar Messages

  • How to read XML payload in Adapter module

    Hi all,
    I have to read content of xml payload inside custom adapter module:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_REQ xmlns:ns0="namespace">
    <record>
      <EmployeeName>a</EmployeeName>
      <EmployeeID>9999</EmployeeID>
      </record>
    <record>
      <EmployeeName>b</EmployeeName>
      <EmployeeID>9999</EmployeeID>
      </record>
    <record>
      <EmployeeName>c</EmployeeName>
      <EmployeeID>9999</EmployeeID>
      </record>
      </ns0:MT__REQ>
    obj = inputModuleData.getPrincipalData();
    msg = (Message) obj;
    XMLPayload xpld = msg.getDocument();
    String xmltxt = xpld.getText();
    InputStream in = new ByteArrayInputStream(xmltxt.getBytes("UTF-8"));
    & then using DOM parser i am trying to read the contents.
    But i am not able to read anything. And no exception is raised.
    How can i read contents of this xml file.
    Thanks,
    Mayank

    hi,
    I am still getting same Blank payload.
    My Code for Parsing is:
    doc = db.parse((InputStream) xpld.getInputStream());
    NodeList list_Set=doc.getElementsByTagName("record");
    NodeList list_Set1=doc.getElementsByTagName("EmployeeName");
    NodeList list_Set2=doc.getElementsByTagName("EmployeeID");
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "12");
    String input = "";
    for(int i = 0; i < list_Set.getLength(); i++){
    Node f=list_Set1.item(i);
    f=f.getFirstChild();
    String str_f=f.getNodeValue();
    Node f2=list_Set2.item(i);
    f2=f2.getFirstChild();
      String str_f2=f2.getNodeValue();
    input = input + str_f + "," + str_f2 +  "END" ;
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Value added from incoming payload");
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, input);
    And in RWB monitoring, i am able to see:
    2009-10-01 14:20:51 Information 12
    2009-10-01 14:20:51 Information UNDEFINED
    2009-10-01 14:20:51 Information 14
    So UNDEFINED is coming for input.
    Edited by: Mayank  Gupta on Oct 1, 2009 11:08 AM

  • How to use log4j in an EJB Module??

    I have included the log4j.jar in libraries;
    added log4j.xml in the sources folder;
    but I m getting an error:
    <Apr 22, 2014 11:07:50 AM PKT> <Warning> <EJB> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception is:
    java.lang.NoClassDefFoundError: org/apache/log4j/Logger.
    java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at test.MyMessageBean.onMessage(MyMessageBean.java:39)
        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:575)
        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:375)
        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
        Truncated. see log file for complete stacktrace
    Kindly guide  me how to resolve this???
    Thank you!

    "I have included the log4j.jar in libraries"  -> what does that actually mean? What steps did you take and where?
    Because one thing is for certain: the jar is not deployed to the proper location so it is on the application's classpath or else you wouldn't be running into this issue.

  • How to read data from a Modbus module

    I have a Modbus module from ICPDAS (ET-7019/PET-7019), which I want to read data directly from. Since I'm fairly new to Modbus, not really sure where to start from. I have read the Modbus introduction and understood some of the basics. I've also downloaded the Modbus library but don't really see any good example. The ICPDAS Modbus module is ethernet based and is currently connected to our network. The ICPDAS can log data but I'd like to read data directly using LabVIEW.
    We have LabVIEW 2009 development suite and RT module, cFP 2220 and 180x. I read some sections saying using cRIO as modbus master/slaves and assume we can use cFP as a similar method? I don't have DSC module.
    Would someone be nice to draw a diagram or explain where I can start in terms of connection and configuration? Read from ICPDAS is the only function I need.
    Many thanks,
    Dahai

    Here is a thread with a modbus ethernet query.
    http://forums.ni.com/t5/LabVIEW/Help-with-MODBUS-over-TCP/m-p/271528/highlight/true#M144486

  • How to create an EJB Module using Eclipse

    Hi,
    How do I create a single EJB module and make a deployable EJB jar? I already have a existing source directory that contains the java files and the deployment descriptor. I am using Eclipse Ganymede 3.4 and Weblogic 9.2.
    Thanks.
    Edited by: user10387019 on Dec 9, 2008 1:39 PM

    Start out by creating an empty EJB project using the EJB Project wizard. Make sure to specify your WebLogic 9.2 installation as target runtime on the first page of the wizard. If your EJB source code is plain spec-compliant EJB, then your project is ready. If you are using WLS EjbGen technology, then you will also need to enable that feature on the project. You can do that at project creation by clicking the Modify button next to the Configuration combo on the first page of the wizard and then selecting WebLogic EJB Gen Support facet.
    Once the project is created, you are ready to import your source. You have several choices here. You can either copy your source into the src directory created for you or you can delete that source directory and link to a source directory elsewhere on the file system. To do the latter, right click on the project and select properties. Go to Java Build Path and select the Source tab. Remove the existing source directory. Then click on Link Source button and point to your existing source directory.
    That should be all that's necessary. Hope that helps.
    - Konstantin

  • ** Not able to access Runtime Constants in ABAP XSL

    Hi friends,
    We have written one ABAP XSLT program. (XSLT program runs in ABAP Engine). This program is for the interface Mapping in XI. Source Interface occurrence is 1 and target interface occurrence is 0..unbounded. ie. We use Message Split to send source messages to multiple target messages. For this we have written one ABAP XSLT program. To find Value mappings we use 'SenderService' Runtime Constant to determine Sender Service (for Source Agency) at runtime. But the problem is,  inside template the constant $SenderService did not have the value.  I have given below the coding
    <xsl:param name = 'SenderService'/>
    <xsl:template match="/">
         <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
                 <ns0:Message1>          
                  <ns1:employeeDemographicsRequest xmlns:ns1="http://aprilbiztec.com">
    <!-- here we are $SenderService did not receive the value -->
    Friends, Could you kindly help me to solve this problem ? (ie how to access Runtime Constants in ABAP XSLT when use message Split)
    Thanks in advance.
    Kind Regards
    Jeagthees P.
    Note :
    1) In normal ABAP XSLT, we are able to access Runtime Constant.
    2) For the same scenario, if we use normal XSLT ie. JAVA XSLT, we are able to access Runtime Constant.

    Hi,
    As far as I know you cannot access Runtime constants if there is a message split.
    Regards,
    Kumar

  • How to reference an External Library (Server Side) in a DC-EJB Module ?

    Hi:
    I start working with hibernate in a DC component, so I create my DC project and EJB module inside. I Make an external library following this
    Thanks a lot for your time on this thread.
    Rocío.

    Hi Rocío!
      Umm, I don't usually use DC's... I don't know if this will work... you can make an EAR (New Proyect -> J2EE -> Enterpise Application Module), add your EJB Module to the EAR (right click on EJB Project and choose Add to EAR proyect), and you'll find a j2ee-engine file on it, and you can add the reference there.Then deploy the EAR.
      I normally do something similar to your issue, I make a EJB calling XI via Java Proxys, and the reference to the XI libs are allocated on the EAR, not on the EJB. This is only for runtime, for compilation you must reference the hibernate jar with an external jar file, as always.
      A dirty solution could be this one: open your generated EAR with de-compressor, and copy your hibernate jar on it (at root). This way you'll load hibernate classes at runtime (I know this is an horrible solution, this is only for testing).
      As I said before, I'm not used to DCs, so this could be wrong, and be a waste of time... I don't know further...
      Good luck
      Eneko.

  • How to add a library jar to a EJB module?

    Hi All,
    in J2EE the normal procedure to a library jar to a module, is to add the library in the Class-Path header of the manifest of the module, and then include the actual jar in the root structure of the ear file. Unfortunately it is not clear to me how S1S5 update 1 supports this. The only option Studio I found so far, is to add the jar as a 'file to include', but then the contents is added to the module jar and not to the ear file itself, resulting in duplication of classes across modules. Is there an option to add the library jar in the Class-Path of the module?
    Thanks in advance,
    Stijn

    I believe that better support for this was added in the Sun Java Studio 6 EA release. It was added to the Extra Files property on an EJB Module.

  • How to call RFC using EJB module.

    hi,
        I want to call the RFC using EJB module in java. how to do it.
        if someone having the code plz post it.
    regards,
    Shanthakumar.

    /***Start of JRA specific code***//
    // Retrive connection factory                
    InitialContext initialcontext = new InitialContext();
    connectionfactory = (ConnectionFactory) initialcontext.lookup("java:comp/env/ConnFactory");
    //Request a connection handle:
    connection = connectionfactory.getConnection();
    //Create a RecordFactory object to get a metadata description
    // of the RFC SALERT_CREATE
    RecordFactory recordFactory = connectionfactory.getRecordFactory();
    // Create Record objects containing all
    // necessary information about the RFM.
    MappedRecord input = recordFactory.createMappedRecord("SALERT_CREATE");
    //Fill in the import parameters and the import table structure data here
    input.put("IP_CAT", "ALRT_CAT"); // alert category
    // Refer to the SW_CONT structure of the table of RFC SALERT_CREATE
    ResultSet inputITContainer = (ResultSet) input.get("IT_CONTAINER");
    int tabIndex = 0;
    inputITContainer.moveToInsertRow();
    inputITContainer.updateString("ELEMENT", "CONT_1");
    inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
    inputITContainer.updateString("ELEMLENGTH", "250");
    inputITContainer.updateString("TYPE", "C");
    inputITContainer.updateString("VALUE","Container_1 value");
    inputITContainer.insertRow();
    inputITContainer.moveToInsertRow();
    inputITContainer.updateString("ELEMENT", "CONT_N");
    inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
    inputITContainer.updateString("ELEMLENGTH", "250");
    inputITContainer.updateString("TYPE", "C");
    inputITContainer.updateString("VALUE","Container_N value");
    inputITContainer.insertRow();
    interaction = connection.createInteraction();
    // execute the call with the input parameters.
    interaction.execute(null, input);
    }catch(Exception e){
         // Error handling code goes here
    }finally{
         try {
                    if (interaction != null)
                   interaction.close();
              if (connection != null)
                   connection.close();
         } catch (Exception ignored) {
              // Do nothing
    // Pass on module data to the next module in chain, unaltered
    return moduleData;

  • XSLT mapping, how can I include a Runtime Constants in target message

    Hi, I would like in my XSLT mapping, to have an attribute include the MessageID.
    From my understanding of the online help [http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm], I have the following code in my XSL:
                   <xsl:param name="MessageId" />
                   <xsl:attribute name="filename">Output_<xsl:value-of select="$MessageId"/>.xml</xsl:attribute>
    But for now the result is to have a filename attribute that only contains: "Output_.xml" as if the $MessageId is empty.
    Anyone experienced successfully using one of those runtime constants with XSLT mapping ?
    Cheers,
    greg

    Hi, found the answer of why it was not running: I'm in a transform step of a BPM:
    For more info check this thread:
    [/message/435521#435521 [original link is broken]|/message/435521#435521 [original link is broken]]

  • How to read Sender Interface name in adapter Module in PI 7.31

    Hello All,
    I am working on Adapter module .it accomplish to generate file with message id,message key ,sent time,received time,FromService(Business system names),toServiece(Business system name),sender interface name,receiver interface name .
    i got all details in my file by calling module data by method get principal data,but i am fail to get sender interface in that file .
    can you please guide me how to get sender interface name in adapter module.
    I am getting some information from this following blogs
    https://scn.sap.com/thread/1583665
    How to read Sender Interface name in Adapter module
    but i am facing same error what they faced.
    Please guide me to how to get sender interface name in adapter module.
    Thanks
    Ganesh

    Hi Ganesh
    Write a module in the sender adapter and use this piece of code
    Message mes = null;
    mes = (Message) inputModuleData.getPrincipalData();
    String SI = mes.getAction().getName();
    Also you can read the same by creating a UDF in message mapping
    Following is the code
    InputHeader inputHeader = container.getInputHeader();
    String SI = inputHeader.getInterface() ;

  • How to read current line number in function module sourrce code?

    Hi All,
    How to read current line number in function module sourrce code?
    regards,
    Anuj

    If you have new editor you would be able to see the line number. 
    Or in the Dump screen - there is a button called Debugger - click that you would be able to see the code where dump has occured..  you would be able to find the line number from there.
    To get the new editor with line number , you need to change the settingsin SE38.
    Regards
    Vivek

  • How to give two Input File from Adapter Framework to EJB Modules

    hi,
    i'm using one EJB Module in SAP XI, which converts EDI file
    format to XML file format. But now i'm facing a problem, that is,
    in SAP XI we can able to give one file as an Input at a time, but
    in my case it is <input_file_name>.edi, but my issue is i need
    to refer another file also, if it is possible.?
    then,
    What and how we can able to use this, any clue
    inputModuleData.getSupplementalData("<Name>");
    or else,
    we can able to achieve this through Configuration settings,
    Option: addAdditionalFile
    please send your suggestion as well.
    thanks,
    rajesh

    hi check the development manual for reference
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f76f9f90-0201-0010-bf84-d0409ea425f1
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • How to read two files (one is updating every second, the other is constant) simoltaneously

    Dear All,
    I will appreciate if somebody help me.
    I want to read two files, one is temperature wich is updating every second, and the other is hysteresis energy which has specific rows and is constant.
    I got a program in discussion forum which read a file as it is updating. I checked this program in my case and it works.
    Then I added reading hysteresis energy file to the existing file. But while i am running the program, the hysteresis energy file is read with all rows.
    But the aim is that everytime which temperature updates, I need to read just one row of the hysteresis energy file.
    so, in this way in every second i have a new temperature data and one row of the other file.
    I tried to used "for loop" inside the program, but it did not work, becuase reading temperature will be stopped untill for loop ends.
    I attached the program.
    Could somebody help me how to read just one row of hysteresis energy file everytime temperature updates?
    Solved!
    Go to Solution.
    Attachments:
    Readfiles.vi ‏23 KB

    I do not understand relationship between your two files.
    You have another VI or app that is writing data to both files and when new temperature data added you wish just to read the new data and then read one new line of the hysteresis file?????
    But is one is constant, why do you need to keep reading it?
    Anyway…
    The “Read From Spreadsheet File.vi” preformed an Open and a Close for each time it is called (if you will open the VI up and drill down and you will see). So that resets the file pointer back to the beginning and there for will read in the whole file from the first to the last each time if you do not set the start of read offset or number of rows.
    Now the Read from Binary File does not reset the file pointer and leaves the file pointer just past the last byte read so it will start with any new bytes automaicly only giving you the new data.
    I do not think you need to do the math with the Previous EOF=0 and the File size to get what I think you are trying to do.
    Plus use shift reg for the Data string instead of local var
    Set the mechinacl action of the stop botton to Latched
    So you do not need to init the two controls
    Also, I do not get the End of file encountered error (4) from the Read from Binary file if I attempt to read past. It just returns and empty string.
    Omar
    Attachments:
    Readfiles.vi ‏22 KB

  • How to use DeployerRuntimeMBean to "stop" an EJB module?

    In the WLS console, you can "stop" a specific EJB module in an application. How can you do the same thing with the DeployerRuntimeMBean? The "stop" method takes a "name" argument that the doc says is the "application", but there's nothing to specify a module to stop.
    In the "deploy" method, you can specify the appname, and the "source" would refer to the EJB module to deploy. There doesn't seem to be anything like that in the "stop" method.

    You need to set the target and module in the DeploymentData object(deploymentData.addTarget) passed as parameter to DeployerRuntimeMBean.stop method

Maybe you are looking for

  • Ipod not recognized in itunes. tried a billion things. Can you please help?

    Hey there, Ipod problems... a few weeks ago my ipod died and I managed to restore it over a few days. Seemed to be happy until last night when I plugged it into my computer and ... it didn't work. Windows recognises the ipod. I can see it under MY CO

  • Problem with vinyl recording

    I specifically purchased the Soundblaster x-fi HD for vinyl recording to my computer. The problem is as the signal runs through the unit into my computer, i am unable to designate the different special effects available with this unit. I can record t

  • Dynamic pages with WebCenter Sites CSElements

    We are using the benefits of WebCenter Sites 11g regarding the possibilities of create the templates and the final user be able to compose the the pages. By the other hand, we have the necessity to create dynamic pages with business logic and interac

  • Archive logs are being shipped, but are not applied

    Hi everyone, Some strange things are happening when I try to configure an Oracle Data Guard setup. Currently I am at the point where the configuration has been completed, and I just need to sync the standby database to the primary one. I can see in t

  • Not working site in India

    I am presently working in India and try to access the sire tatasky.com. Wether I use safari or firefox , the site does not work. Links are not working and i cannot login to : "MY TATASKY" the buttons are not working. On a windows computer with IE it