How to use JMS with tomcat and Axis

Hello
I'm new in ii, so i'm still a little bit lost. I have been implementing web services with tomcat and Axis. However, these services are synchronous and I would like that some services were asynchronous.
I've been reading about the topic and I've found that JMS is a good solution for it. I have already downloaded JMS in my computer but now I don't know what else to do. I've been trying to run the SimpleQueueSender.java example but I get the error:
JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
But I have attached all .jar from F:\Sun\MessageQueue\lib
In addition to this, for my first webservices I used the Java2WSDL, WSDL2Java and AdminClient (axis tool) to create my web services bindings, stubs and skeletons and to deploy the web service on the server. Do I have to use them now with JMS? or now the deployment must be performed in a different way?
Thank you in advanced,

The error means that you have to specify the type and location of your jndi store. You could create a jndi.properties file and put two properties in it:
java.naming.provider.url=file\\\:////var/jndi
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
for a file based jndi store. Then you have to make sure your jndi.properties file is in your CLASSPATH. Then you have to use something like imqadmin to create your jndi store and store in it your administrative objects like Queues and QueueConnectionFactories.

Similar Messages

  • Using Third Party APIs with Tomcat and Axis

    I'm experimenting with creating web services in Java. I'm using tomcat and axis for this. I have successfully created and deployed some basic web services and now I want to create one using a 3rd party API. I follow the same exact procedure and when I deploy the service I check my list of deployed services through the axis page, but all my services have disappearred. Commenting out all 3rd party related methods does successfully deploy the service. Is there anything special/extra I have to do to get 3rd Party classes to function correctly in a web service?
    Thanks in advance

    If you're using Tomcat, JARs in the /common/lib directory are available to all applications deployed on that instance of Tomcat.
    I prefer putting them in the WEB-INF/lib of my web app, even if that means duplication. That way my app doesn't depend on having the server set up a certain way. I deploy them as a WAR file with everything they need enclosed within,no more and no less. They're completely portable to any servlet/J2EE engine that way.
    %

  • Third Party API with Tomcat and Axis

    I'm experimenting with creating web services in Java. I'm using tomcat and axis for this. I have successfully created and deployed some basic web services and now I want to create one using a 3rd party API. I follow the same exact procedure and when I deploy the service I check my list of deployed services through the axis page, but all my services have disappearred. Commenting out all 3rd party related methods does successfully deploy the service. Is there anything special/extra I have to do to get 3rd Party classes to function correctly in a web service?
    Thanks in advance

    what kind of third party API are using ?

  • How to use setFireActionForSubmit with parameters and capture the parameter

    Hi,
    Can anyone explain how to use setFireActionForSubmit.
    I am extending the Controller of ShoppingCartPG. In the extended controller processRequest method I am adding a button to the table and setting up the setFireActionForSubmit, so when the button is pressed it raises the event associated with the setFireActionForSubmit.
    I need to pass the RequisitionLineId as a parameter which is present in the VO associated with the ShoppingCartPG.
    I have used the following code in processRequest
    =================================
    public void processRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    super.processRequest(paramOAPageContext, paramOAWebBean);
    OATableBean otbRN=(OATableBean)paramOAWebBean.findIndexedChildRecursive("ItemTableRN");
    OASubmitButtonBean oasb= (OASubmitButtonBean)paramOAPageContext.getWebBeanFactory().createWebBean(paramOAPageContext,"BUTTON_SUBMIT");
    oasb.setID("addnInfo");
    oasb.setUINodeName("addnInfo");
    oasb.setText("Additional Info");
    String pageName = paramOAPageContext.getRootRegionCode();
    Hashtable params = new Hashtable (1);
    params.put ("param1", pageName);
    Hashtable paramsWithBinds = new Hashtable(1);
    paramsWithBinds.put ("param2", new OADataBoundValueFireActionURL(oasb, "${oa.encrypt.current.RequisitionLineId}"));
    oasb.setFireActionForSubmit("addnInfoEvent",params,paramsWithBinds,false,false);
    otbRN.addIndexedChild(oasb);
    =================================
    And in processFormRequest method I am capturing the event "addnInfoEvent" and trying to capture the RequisitionLineId which I have passed it as a parameter.
    This is the code I have used in processFormRequest.
    =================================
    public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    super.processFormRequest(paramOAPageContext, paramOAWebBean);
    OAApplicationModule localOAApplicationModule = paramOAPageContext.getApplicationModule(paramOAWebBean);
    String strEvent= paramOAPageContext.getParameter(EVENT_PARAM) ;
    if ("addnInfoEvent".equals(strEvent))
    Number localNumber = 0;
    try {
    localNumber = new Integer(ClientUtil.getDecryptedParameter(paramOAPageContext, "param2"));
    catch (Exception e) {e.printStackTrace();}
    String outmsg="Line ID : " + localNumber + ":" + strEvent;
    throw new OAException(outmsg,OAException.INFORMATION);
    =================================
    But I am not able to capture the RequisitionLineId which I have sent as a parameter.
    Can anyone let me know what I am doing wrong.

    Hi,
    This is the requested HTML Code
    ===============================
    <button id="N3:addnInfo:0" class="x7g" style="background-image:url(/OA_HTML/cabo/images/swan/btn-bg1.gif)" onclick="return _chain('submitForm(\'DefaultFormName\',1,{\'param1\':\'${oa.encrypt.current.RequisitionLineId}\',\'serverValidate\':\'1\',\'param2\':\'${oa.encrypt.current.RequisitionLineId}\',event:\'addnInfoEvent\',source:\'N3:addnInfo:0\'});return false;',*'submitForm*(\'DefaultFormName\',1,{\'_FORM_SUBMIT_BUTTON\':\'N34\'});return false',this,event,true)" type="submit">Additional Info</button>
    ===============================
    Hi I am not able to paste the HTML Code..some parts of HTML gets removed automatically when I paste it in the forum.
    Regards,
    Rohit

  • How to use Airplay with AE and ATV with no internet connection?

    I am currently at a resort that only has the AT&T Wi-fi.  Unelss someone knows how to hook an AppleTV into an AT&T network and get past their acceptance of terms screen I need to figure out how to get this to to work.
    I have an airport Express set up as it's own network.  I had the Apple TV join that netowork as well as my iPad.  When I start to play a movie the Airplay icon comes up and I tell it to use the AppleTV.  On the TV a notification comes up in the corner that has the movie name but then that's it.  It never plays. The AE was unhappy about not having an internet connection but I told it to ignore not having one and it turned green.
    As far as I can tell I should in theory be able to have the AE be it's own network without internet and use Airplay between my iPad and the ATV.  It's just a no go and I can't tell why.
    Thoughts?  Settings I may not be aware of? I can't figure it out.

    AirPlay is only compatible with AirPort base stations.
    The dongle is not compatible with AirPlay.

  • Using JavaMail with Tomcat and JNDI

    I have a web application and I want to make use of JNDI Mail Sessions for sending email in my Web Appln.
    I am using Tomcat4.0.1
    In my server.xml file I declared a resource as follows:
    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
         <parameter>
         <name>mail.smtp.host</name>
         <value>mail.abc.com</value>
         </parameter>
    </ResourceParams>
    Now Inside my jsp/servlet code i can use something like this:=
    // Acquire our JavaMail session object
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    Session session = (Session) envCtx.lookup("mail/Session");
    // Prepare our mail message
    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    InternetAddress dests[] = new InternetAddress[]
    { new InternetAddress(to) };
    message.setRecipients(Message.RecipientType.TO, dests);
    message.setSubject(subject);
    message.setContent(content, "text/plain");
    // Send our mail message
    Transport.send(message);
    But my smtp mail provider uses Authentication.
    So I am looking of some way wherein I can provide the user and password information in the server.xml file itself along with smtp provider.
    My Query is How to do this as i dont see any references for using JavaMail sessions using Authentication
    Any Help highly appreciated
    Thanks
    Raj

    Isnt there anyone who can answer this question or its not a question worthwile
    Awaiting reply
    ...

  • Problem when using Logger with Tomcat and eclipse

    Hi, Iam using Tomcat 5.5.7 and my IDE is eclipse.Iam using java.util.logging.Logger class for logging.Iam putting the properties file in Appname/WEB-INF directory.The properties file is not identified.The error Iam getting is Error initialising log file java.lang.NullPointerException and java.io.FileNot FoundException
    The content of my logging.properties file is
    java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=SEVERE java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    java.util.logging.FileHandler.level=ALL java.util.logging.FileHandler.pattern=%h/javalogs%u.log java.util.logging.FileHandler.append=true java.util.logging.FileHandler.count=1
    My servlet is
    import java.io.*;
    import java.util.logging.*;
    import java.util.logging.Logger;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldServlet extends HttpServlet
          public void init(ServletConfig config) throws ServletException
               try
                         String file=getServletConfig().getInitParameter("java.util.logging.config.file");
                        InputStream is = getServletContext().getResourceAsStream(file);
                        LogManager.getLogManager().reset();
                          LogManager.getLogManager().readConfiguration(is);
               catch(Exception e)
                    System.out.println("Error initialising log file"+e);
          public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException 
                   final Logger fLogger =
                 Logger.getLogger(HelloWorldServlet.class.getName());
                 PrintWriter  out; 
                 String title = "Simple Servlet Output";
                // set content type and other response header fields first                                   
                // then write the data of the response
                 response.setContentType("text/html");
                 fLogger.finest("this is finest");
                 fLogger.finer("this is finer");
                 fLogger.fine("this is fine");
                 fLogger.config("this is config");
                 fLogger.info("this is info");
                 fLogger.warning("this is a warning");
                 fLogger.severe("this is severe");
                 out = response.getWriter();
                out.println("<P>This is output from SimpleServlet!!!!!!!!.");  
    }My web.xml file is
    <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <init-param>
         <param-name>java.util.logging.config.file</param-name>
         <param-value>/WEB-INF/classes/logging1.properties</param-value>
        </init-param>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>HelloWorldServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/hello</url-pattern>
      </servlet-mapping>
    </web-app>Can anybody help me out.

    Hi, Iam using Tomcat 5.5.7 and my IDE is eclipse.Iam using java.util.logging.Logger class for logging.Iam putting the properties file in Appname/WEB-INF directory.The properties file is not identified.The error Iam getting is Error initialising log file java.lang.NullPointerException and java.io.FileNot FoundException
    The content of my logging.properties file is
    java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=SEVERE java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    java.util.logging.FileHandler.level=ALL java.util.logging.FileHandler.pattern=%h/javalogs%u.log java.util.logging.FileHandler.append=true java.util.logging.FileHandler.count=1
    My servlet is
    import java.io.*;
    import java.util.logging.*;
    import java.util.logging.Logger;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldServlet extends HttpServlet
          public void init(ServletConfig config) throws ServletException
               try
                         String file=getServletConfig().getInitParameter("java.util.logging.config.file");
                        InputStream is = getServletContext().getResourceAsStream(file);
                        LogManager.getLogManager().reset();
                          LogManager.getLogManager().readConfiguration(is);
               catch(Exception e)
                    System.out.println("Error initialising log file"+e);
          public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException 
                   final Logger fLogger =
                 Logger.getLogger(HelloWorldServlet.class.getName());
                 PrintWriter  out; 
                 String title = "Simple Servlet Output";
                // set content type and other response header fields first                                   
                // then write the data of the response
                 response.setContentType("text/html");
                 fLogger.finest("this is finest");
                 fLogger.finer("this is finer");
                 fLogger.fine("this is fine");
                 fLogger.config("this is config");
                 fLogger.info("this is info");
                 fLogger.warning("this is a warning");
                 fLogger.severe("this is severe");
                 out = response.getWriter();
                out.println("<P>This is output from SimpleServlet!!!!!!!!.");  
    }My web.xml file is
    <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <init-param>
         <param-name>java.util.logging.config.file</param-name>
         <param-value>/WEB-INF/classes/logging1.properties</param-value>
        </init-param>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>HelloWorldServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/hello</url-pattern>
      </servlet-mapping>
    </web-app>Can anybody help me out.

  • How to use JMS in a J2EE environment

    Hello all,
    I would like to find out how to use JMS in a J2EE environment. I use Borland Enterprise Server. Do I need to buy a message software to use JMS? How to use JMS with Message Driven bean?
    Thanks a lot.
    Best regards
    Susan

    If you don't want to buy you could try OpenJMS, a free JMS product (http://openjms.sourceforge.net/)
    As for learning how to use JMS w/ MDBs, I would suggest grabbing a book on JMS. I found the OReilly book on JMS to be pretty helpful for me.

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • How to use labview with gpib to connect with Agilent PNA E8362B ?i am newbie ..just started to work on labview about a fortnite bck and a novice in interfacing skill ..so plzzzzz explain me in a litle detail

    how to use labview with gpib to connect with Agilent PNA E8362B ?i am newbie ..just started to work on labview about a fortnite bck and +i am a novice in interfacing(networking... jst know tidbits) skill ..so plzzzzz explain me in a litle detail

    Sir
    We were able to solve that problem...but now could you advice as to which DC power supply we should use (preferably avalable in India) so that it can be controlled by Labview (through a gpib/rs232/any other port) to give a square wave of desired frequency/other parameters.
    Regards
    Shivam

  • How to Create web service using JMS with PUB/SUB pattern.

    Hi All,
    I need to expose web service using JMS with PUB/SUB pattern.
    if you have any source for this.
    I tried to use @WLJmsTransport annotation but unable to get it done.
    I have configured all JMS server, topic, and connection factory.
    Thanks.

    Hi, I am having web sample web service program which is simple one.
    But I need to Modify this to JMS enable.
    Can any one help me?
    Thanks.

  • Do i have to use JMS with EJBS?

    Hi
    I want to use JMS as a messaging system (a queue) between my system and someone elses. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JMS i always hear it in relation to EJBs. Can i only use JMS with EJBS?
    If i can use JMS is there anything important i need to know about.
    Thanks in advance!
    San H.

    As far as I understand you are use JNDI and JMS is not bound with EJB's. These are java API's which are independent. Like JDBC you can use with Servlets, Applets, standalone applications, EJB, JMS etc etc.......
    In the same way you can use JNDI and JMS with diferent API. And the important feature of Java is that all java API interact with each other when these are independent. I would appricate comments of everyone......................Thanks

  • Adv. of using apache with tomcat??

    can anyone pl tell me the advantages of using Apache with Tomcat in comarison to other web servers?
    Thanks

    The biggest advantages are that they are open source, so you don't have to pay a huge licence fee, and they are very stable. I don't know how they compare for speed - I know Apache is lightning when it comes to serving flat pages, there are no benchmarks yet for the new Tomcat because it was only released last monday. You can run them on linux or another unix variant, so they are more likely to be secure (windows servers are horrendously open to attack) and stable.

  • Setting up cache synchronization using JMS on Tomcat

    I'm trying to enable cache synchronization using JMS on Tomcat 5.0; Does anyone have any tips on how to do this?

    Configure the TIBCO service to provide a Topic and a TopicConnectionFactory for TopLink to use.
    You will need to register for a pre-login event configured on the session that will configure the JMSClusteringService for the TIBCO service.
    ie.
    JMSClusteringService clusteringService = new JMSClusteringService(event.getSession());
    event.getSession().setClusteringService(clusteringService);
    Hashtable env = new Hashtable();
    env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY , "TIBCOFactoryClassName");
    env.put(javax.naming.Context.PROVIDER_URL, "url");
    env.put(javax.naming.Context.SECURITY_PRINCIPAL, "userName"));
    env.put(javax.naming.Context.SECURITY_CREDENTIALS,"password");
    clusteringService.setInitialContextProperties(env);
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use Terminal with KeySpan USB serial adaptor cable?

    I own a KeySpan model USA-19HS to use with our MacBookPro when working on clients networking equipment that require serial communication. I have used ZTerm with excellent luck, but it costs, and is yet another application that I dont really want. I would like to know if any one out there has exacing instructions on how to use Terminal with this adaptor. If I could write a file that had, say, the couple most common settings (9600-8-n-1, 57600-8-n-1, et cetera) that I could simply click on, to open a new Terminal window with those settings, then simply close that, and open a new window (apple+n) in order to get back to a default settings terminal window. All feedback is most appreciated.
    Thanks so much, Jason Sjobeck

    Hi, Jason. Welcome to the Discussions.
    You wrote: "All feedback is most appreciated."OK.
    1. Have you considered discussing this with Keyspan Support?
    2. Have you read the section "OSX has Terminal.app - why do I need ZTerm?" on the ZTerm Home Page? That seems to explain why one needs an app like ZTerm.
    3. A quick search of Keyspan's FAQ for your product and terminal doesn't yield much more than how to find the serial ports using Terminal.
    Likewise, this Google search also yields little, and variants of that search of such weren't particularly help either.
    It appears your inquiry seems to be a somewhat esoteric topic.
    4. Apparently, ZTerm X is a bit long in the tooth and there's no Universal Binary for it. It sounds, however, like you've tried it running on your MBP under Rosetta, yes?
    5. In researching alternatives to ZTerm for you, I note the followng:• The comment from "Reverb" on this page suggests C-Kermit or Kermit as a free alternative.
    • This tip on Mac OS X Hints cites Minicom as another option.6. You may want to try your question on the Unix Discussion.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

Maybe you are looking for

  • Setting default layer visibility in Acrobat 9 Standard

    I just installed Acrobat 9 Standard after getting a Win7 x64 computer.  My old computer had Acrobat 7.5 Pro.  One of the features I need is the ability to change the default visibility of layers created by a PDF export from another program.  When I v

  • Cannot Uninstall RoboHelp 7

    Just in case anybody else could not uninstall RH7. I already have RH6 and had installed the Trial RH7; I now want to uninstall the RH7 Trial. Go into Add or Remove Programs and work my way through to Remove RoboHelp 7, and click the "Remove" button.

  • Poor commitment to support / bug fixes?

    I've just brought fireworks 8, but have found a bug when you re-size using CM as the gage. Reduce a page from 31cm to 21cm (A4), and it actually chooses 8.9cm. So I went to the adobe site as this product is less than 2 weeks old for me, and I have NO

  • Free reporting?

    I've got a small report tha tused to existing on a server that hosted both MS SQL DB and the Reporting Services.  The end user wants the report on a separate server for a variety of reasons.  If I turn off SRS on the DB server, can I just install ONL

  • Available JAVA API in Exchange Infrastructure

    hi together, at the moment i develop a java mapping. in eclipse it is running because all libraries a available. but if i import the java files to XI and test them some errors appear caused by not available libraries. so, there some questions: 1. whi