How to read mq message through jms

Hi
can anyone tell me how we can read an mq message through jms transport or by using jms adapter.
Thanks in advance.

A JMS program will be written typically to lookup administered objects ( namely connection factory and destination) from a jndi tree and use these to connect to the jms provider and read/write message to the destination. So administrators of the JMS provider usually create these objects and bind it to a jndi , which then can be used by the jms applications by doing a lookup from the jndi tree.
Websphere MQ is a messaging provider which provides a native MQ API in many languages including Java for applications to talk to it. This is a IBM proprietary API and is not same as JMS. Later when JMS became more interoperable and the standard for java based messaging applications, IBM introduces the MQ JMS API which is a wrapper around the native MQ API, so that now java clients can talk to MQ using the JMS API. Since jms applications need to lookup the administered objects, IBM came up with the utility called JMSAdmin which allows MQJMS administers to create and bind JMS administered objects. The utility is flexible that it allows the objects to be binded to different type of JNDI trees - file based, ldap based etc. But the most widely used and robust one is the file based.
So as part of configuration the first thing is to create the queue and queue manager objects by the MQ Administrator.
A MQ JMS administrator will then create the JMS wrapper objects using the JMSAdmin utility and bind it to the file based jndi tree ( a file called .bindings)
Now we need the application running in weblogic server ( the JMS Adapter ) to lookup these objects from the file based jndi tree. So for this we create a foreign jms server. A foreign jms server allows to create local jndi links (in weblogic's server jndi tree) for objects in a remote jndi provider (the .bindings file).
Finally the application will look up the local jndi name from the local jndi which will automatically resolve to the remote provider and use it.
The steps in the IBM developer work link folliows this sequence.
Hope this helps.

Similar Messages

  • I want to use ODI to read XML messages from JMS queue and then process it..

    I want to use oracle ODI (Oracle Data Integrator) to read XML messages from JMS queue and then process it.. i also want to process and validate the data in it....
    Could anyone please tell me the steps to achieve the same. I tried some ways which i got on OTN, but not able to implement it exactly...
    As i m very new to ODI, it will be great if you provide detailed steps..
    Thanks in advance for your help....

    Hi,
    Were you able to do it? We are facing this same issue now and, despite the fact the docs say otherwise, it does not seem to be a trivial task.
    TIA,
    Tedi

  • Read Object Message using JMS Adapter

    Hi,
    My JMS queue receives an object message.I want to read that object message using JMS adapter.Currently the JMS Adapter payload type is given options to read only 'TextMessage','BytesMessage','MapMessage'.How to read ObjectMesage using this adapter?Please help me on this?

    Hi,
    As far as i know, JMS Object Messages is not supported by XI JMS adapter.
    you need to have the JMS provider to transform the message to bytes messages.
    (Refer to SAP note 856346)

  • How to delete the messages from JMS Queue

    Hi,Can anybody help how to delete the messages from the JMS Queue.Thanks in advance.

    You can dequeue the message using a JMS client or delete it using Weblogic Admin Console -
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/jms_modules/queues/ManageQueues.html
    Regards,
    Anuj

  • How to Read Archived Messages in XI

    HI
    I am facing problem in reading archived XI messages.
    i am trying to read messages archived in November. Can please anyone explain me how to read this.
    Thanks in Advance
    Regards
    Swapnil

    Hi Swapnil,
    >>I am facing problem in reading archived XI messages.
    please let me know the Exact problem what u r facing?
    i felt that, u are unable to findout the output file in the month of novmber which was archived.
    while configuring the adapter we have Archive mode.
    once u select the archive mode,
    asking for the archive directory and followed by ADD time stamp.
    it mean's the output file as well as archived file generated with the following name.
    i.e filename+Timestamp(yyyymmdd-hh:mm:ss-msec).
      eg: XI_ouput20080118-190544-843
    award the points if it really help to you.
    Reagrds
    Mahesh.

  • How to Read a Message with Content Type multipart/alternative

    Hi ,
    I need to write a POP3 Client to read email message ..but some times the messages comes with content type multipart/alternative
    how to parse it and read only one of the content :
    for example :
    This is a multi-part message in MIME format.
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: 7bit
    Assignment to workgroup Name 1 : L2 SD Service Delivery Apps Spt
    Open CI Search Code : HPSD
    Description : tesat
    General Information :
    Is the workgroup owner Aware of the addition to Workgroup : Yes
    Workgroup to be added :
    L2 SD Service Delivery Apps Spt
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <br><P>Assignment to workgroup Name 1 : L2 SD Service Delivery Apps =
    Spt</P>
    <P>Open CI Search Code : HPSD</P>
    <P>Description : tesat</P>
    <P>General Information :</P>
    <P>Is the workgroup owner Aware of the addition to Workgroup : Yes</P>
    <P>Workgroup to be added :</P>
    <P>L2 SD Service Delivery Apps Spt</P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    ------=_NextPart_000_12C25_01C6B64F.09226B00--
    The Same message is in text as well as HTML so not sure how to read it .
    currently my program is as follows
    for (int i = 0; i < found.length; i++) {
    Message m = found;
    // Get some headers
    Date date = m.getSentDate();
    Address [] from = m.getFrom();
    String subj = m.getSubject();
    String mimeType = m.getContentType();
    System.out.println(date + "\t" + from[0] + "\t" +
    subj + "\t" + mimeType);
    Object o = m.getContent();
    if (o instanceof String) {
    System.out.println("**This is a String Message**");
    System.out.println((String)o);
    } else if (o instanceof Multipart) {
    System.out.print("**This is a Multipart Message. ");
    Multipart mp = (Multipart)o;
    int count3 = mp.getCount();
    System.out.println("It has " + count3 +
    " BodyParts in it**");
    for (int j = 0; j < count3; j++) {
    // Part are numbered starting at 0
    BodyPart b = mp.getBodyPart(j);
    String mimeType2 = b.getContentType();
    System.out.println( "BodyPart " + (j + 1) +
    " is of MimeType " + mimeType);
    Object o2 = b.getContent();
    if (o2 instanceof String) {
    System.out.println("**This is a String BodyPart**");
    System.out.println((String)o2);
    } else if (o2 instanceof Multipart) {
    System.out.print(
    "**This BodyPart is a nested Multipart. ");
    Multipart mp2 = (Multipart)o2;
    int count2 = mp2.getCount();
    System.out.println("It has " + count2 +
    "further BodyParts in it**");
    } else if (o2 instanceof InputStream) {
    System.out.println(
    "**This is an InputStream BodyPart**");
    } //End of for
    } else if (o instanceof InputStream) {
    System.out.println("***********************************This is an InputStream message**");
    InputStream is = (InputStream)o;
    /* if(m.getContentType().equalsIgnoreCase("multipart/alternative")) {
    MimeMultipart mp = new MimeMultipart();
    // Assumes character content (not binary images)
    } else {*/
    BufferedReader reader
    =new BufferedReader(new InputStreamReader(is));
    String thisLine=reader.readLine();
    while (thisLine!=null) {
    System.out.println(thisLine);
    thisLine=reader.readLine();
    So when the Content TYpe is multipart/alternative it goes into InputStream message .
    any help and ideas to handel such situations ?
    Thanks
    San
    Message was edited by:
    sanrosh_95

    Try reposting that with tags (replace the {'s with ['s).
    Long story short, I think the FAQ and examples would go a long way towards explaining this, but you basically can check the content type, or check if the content contains parts, and parse each part separately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to read the message body in a mail

    how can we read the message body of a mail. i am using pop3 server for reading the mails. my program is
    public class GetMessageExample {
    public static void main (String args[]) throws Exception {
    String host = args[0];
    String username = args[1];
    String password = args[2];
    Properties props = new Properties();
    Session session = Session.getInstance(props, null);
    Store store = session.getStore("pop3");
    store.connect(host, username, password);
    Folder folder = store.getFolder("INBOX");
    folder.open(Folder.READ_ONLY);
    BufferedReader reader = new BufferedReader (
    new InputStreamReader(System.in));
    Message message[] = folder.getMessages();
    for (int i=0, n=message.length; i<n; i++) {
    System.out.println(i + ": " + message.getFrom()[0]
    + "\t" + message[i].getSubject());
    System.out.println(
    "Do you want to read message? [YES to read/QUIT to end]");
    String line = reader.readLine();
    if ("YES".equals(line)) {
    message[i].writeTo(System.out);
    } else if ("QUIT".equals(line)) {
    break;
    folder.close(false);
    store.close();
    i am getting the following exception
    Exception in thread "main" java.lang.NoSuchFieldError: contentStream
    at com.sun.mail.pop3.POP3Message.getContentStream(POP3Message.java:115)
    at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSou
    rce.java:61)
    at com.sun.mail.handlers.text_plain.getContent(text_plain.java:65)
    at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.
    java:755)
    at javax.activation.DataHandler.getContent(DataHandler.java:511)
    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1072)

    The Part interface that the Message class implements describes 3 ways for getting the content of a message. To use an Input Stream, you can call the getInputStream() method on the message itself, rather than System.in.
    Hope this helps!

  • How to process multiple messages through one url over https

    Hi,
    My scenario is HTTP to IDOC, and the vendor will send different messages through one url to SAP system.
    is there any way to achieve this?
    Thanks
    Jessica

    can the Vendor at least pass URL parameters ? Normally, when you have several messages interfaces, the HTTP sender system should distinguish them with the URL parameters (party, namespace, interface). By that, XI then knows how to handle those messages, and can start its receiver determination pipeline. See SAP Help for HTTP sender channel:
    Queries entering the plain HTTP adapter must have the following syntax:
    http://<hostname:port>/<path>?<query-string>
    The query string contains the following data:
    ●      Sender namespace ?namespace=<namespace>
    ●      Sender interface &interface=<interface>
    These details define the sender interface.
    ●      Sender service &service=<service>
    Specifies the sender service.
    ●      Sender party (optional) &party=<party>
    CSY

  • How to see the messages through JAVA cosole?

    Hi,
    I used to work on client/server environment. I ddin't work on Jdeveloper debug console.
    Regarding one of the .fmb file 9i version,I want to display messages through java console/Jdeveloper.
    Should I open both the forms 9i application and jdeveloper debug console side by side? How do I open .fmb file in jdeveloper debug console in order to see the messages?
    Thanks
    Woolmer

    Hi,
    you can't. System.out.println messages of a PJC in Forms are displayed in teh Java Plugin console
    The only option for you to debug e.g. a PJC is explained in the following document
    http://www.oracle.com/technology/products/forms/htdocs/howto_debug_pjc.html
    Frank

  • How to read XML message present in Table using PL/SQL?

    Hi,
    How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
    Thanks!

    Late reply, but hopefully better late than never.
    You can possibly do it all via a single SQL statement, such as {message:id=4232077}
    XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html

  • User applications messages through JMS

    Hi all,
    this is my first post.
    I'm trying to figure out how to remove a message application based on java/db2 with jms.
    Say we have our web application each user of this application has a panel where he can see if he has messages or activities to do.
    Messages or request to do a certain activity are sent by other users of this application via this messaging tools.
    The user which is also used as to make the message envelope(sender,receiver,message) is taken from a sort of custom made/ldap and the user is retrievied with a service.
    So Im wondering if jms is suitable for this job or if he has too much overhead for this kind of operation.Since I'm new to jms I'm wonderind how to define message destination, if i use ptp model how i can send message directly to user1 insted of user 3 or user4?
    thanks a lot in advance,
    any help would be appreciated :-D

    EDN and JMS

  • How to read write excel through BPEL

    hi,
    how to read write excel file from BPEL process; is there any adapter available for excel specially.

    Hi,
    there is no adapter provided from Oracle.
    I think you have to write a .NET webservice, which accomplished this for you....

  • How to read CSS message data

    Hi,
    I have a requirement here. When working as a Dev angel for multiple customers its really difficult to manage the message inflow and status with accuracy. Hence i am planning to develop an application which can retrive(only reading) the data from CSS and interpret the same to quickly arrive at decisons for the message. As a first set i need to read the message data from CSS. Are there any APIs available for the same. I guess SAP developer dashboard has some what similar functionality but with very limited scope. May be if somebody can comment on the technology/machanism behind pulling the data into dashboard?
    Any comments here?
    Regards,
    Paul

    http://gizmodo.com/5070368/caps-lock-trainer-key-painfully-punishes-poor-netiquette
    Also, there is no native way to display a PDF in flash. You will need to use a utility that converts it. SWFTools has one that works pretty well.

  • How to read the messages in the JMS Queue using JMX

    Hi,
              I want to read messages in the JMS queue using JMX. I was able to read using QueueBrowser but want to modify priority of the messages using JMX.
              I tried to use JMSDestinationRuntimeMBean but it does not allow us to read messages unless we pass the message Id. Is there any way that I can get all the messages in the queue.
              I am using Weblogic 8.1 SP4
              Can someone please help me in this regard.
              Thanks,
              Kiran.
              Edited by KGudipati at 10/22/2007 1:22 AM

    Hi,
    As far as i know, JMS Object Messages is not supported by XI JMS adapter.
    you need to have the JMS provider to transform the message to bytes messages.
    (Refer to SAP note 856346)

  • How to create soap message through java using JAXM

    Hi,
    I'M REALLY NEW TO THIS JAVA WEB SERVICES. I need to send a soap messages from core java with using url and it goes to my servlet and able to retrieve the soap message and do the processing. I really don't the work flow too. I'm using JAXM for receiving and transfering message. Could anyone tell me how its going to work for core java. Actually i need to accept any incoming soap messages and according to the request i got , i do need to do the further processing and again send back response to the core java. I'm not sure what i'm telling is wright or wrong. I literally confused with whole java web services . Could anyone help me out please or suggest some other suggestions through which i can proceed further.
    in advance thanks a lot.......

    File f = new File("c:\MyFolder");
    f.mkdir();

Maybe you are looking for

  • Camera roll not seen in album after updating ios8

    Camera roll not seen in album after updating ios8

  • SQL tag not working

    This is killing me why this doesn't work. This is populating a SELECT. I have the exact same setup in another application. The only major difference is this use mysql, the one that works uses SQL Server 2000. Table name and columns are different too,

  • Issue burning Solaris 10 installation CD�s

    Dear all, I downloaded Solaris 10 1/06 installation-CD�s 1-5 from sun hp. I extracted all 5 CD�s with winzip I�m not able to burn any of these CD�s because the image-file cannot be identified by the burners I used (Nero, Ulead) in Windows XP. Any hel

  • Few appointments are missing from the Outlook calendar.

    If you look in the purple calendar, you see two more extra appointments on the 23rd and 24th while the green one, in the other hand, doesn't seem to recognize/sync these two. It's a shared calendar with the Exchange server and I don't think it's on t

  • I just submitted a repair/service request for my iPhone 5.

    It says that I should take to the UPS to ship back.  Do I need to wait for an email back from APPLE to see where to send it?