Apache Axis and Eclipse WTP

I've just started to use java recently and now trying to develop SOAP web services. I've installed Eclipse and Eclipse Web Tools Platform (Eclipse WTP) as my IDE, and Apache Tomcat as my web container.
In order to develop java web services, I think I need Apache Axis which is basically a SOAP engine that parses java objects into SOAP messages. And included in Eclipse WTP are java web services tools built upon Apache Axis. Therefore I can start developing web services without installing Apache Axis for my Apache Tomcat.
The question here is when I need to deploy my web services in a real-world Apache Tomcat server (which also includes Apache Axis), what should I do?

Hi,
All that you want to do is trying to call a web service and get the response from it, you can use the WSDLs from any weather or lets say google. From XI you can call it and you would get response in SOAP format.
If you want to create a web service, create a SOAP to RFC scenario in XI where RFC returns you some thing that you wanted in sync fashion. Now use the WSDL genrated from this scenario and import in XI for another scenario.. where it could be a HTTP to SOAP. Now you would get the response of RFC in SOAP format it self..
VJ

Similar Messages

  • Flash Builder 4 and Eclipse WTP Plug-in

    I need someone to help put me in the right direction as to how configure Eclipse WTP Plug-in in Flash Builder 4. I have the plug-in downloaded on my desktop with 2 main folders (features and plug-ins) in it. At this point I am stuck as to where to go from here to get WTP into, and/or work with Flash Builder 4. I running the standalone version of FB4. Someone please help me.
    Bliss

    Praveen
    Please accept my sincere gratitude for your advice. Because for the time, after countless attempts to install this plug-in that I am noticing that even for a beginner something is beginning to make sense in the installation process. Now, I am NOT confirming completion because I am no sure of it. I am just saying I like what I see so far. That said, please advise as to what next  on what about to narrate to you. That is:
    I followed the recommended method (Help --> Install New Software). I did several plug-ins filtering along the way on installation prompts. After which the installation completed. FB4 restarted and for the first time there is emerged among the menus in the menu bar "WTP Tests". But as try to test-create a new Flex project I realized that the "combined Java and Flex projects" does not show up under the J2EE Application Server Type. Meanwhile, when I hover over the "WTP Tests" I see an "open" option. When clicked, I get a dialog captioned "Test Collector" listing many test suites to be ran/tested.
    Question:
          1.     What must i do to make the "combined Java and Flex projects" show up under the J2EE Application Server Type?
          2.     Do I need to run the tests on these Test Suites?
    Please advise. Once again, I appreciate your advice a great deal. Thanx in advance.
    Bliss_0

  • Facelets example numberguess with Tomcat 6 and Eclipse WTP

    Hello
    I�m new with facelets (1.1.3) so I wanted to start the example that was in the download directory "numberguess".
    I imported the *.war-file in Eclipse. I have both, Tomcat 5.5 and Tomcat 6 but the error message is the same:
    INFO: validateJarFile(C:\Programme\Apache Software Foundation\Tomcat 5.5\wtpwebapps\numberguess\WEB-INF\lib\servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    22.02.2008 16:49:43 org.apache.catalina.core.StandardContext listenerStart
    SCHWERWIEGEND: Error configuring application listener of class com.sun.faces.config.ConfigureListener
    java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    22.02.2008 16:49:43 org.apache.catalina.core.StandardContext listenerStart
    SCHWERWIEGEND: Error configuring application listener of class com.sun.faces.application.WebappLifecycleListener
    java.lang.ClassNotFoundException: com.sun.faces.application.WebappLifecycleListener
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    22.02.2008 16:49:43 org.apache.catalina.core.StandardContext listenerStart
    SCHWERWIEGEND: Skipped installing application listeners due to previous error(s)
    22.02.2008 16:49:43 org.apache.catalina.core.StandardContext start
    SCHWERWIEGEND: Error listenerStart
    22.02.2008 16:49:43 org.apache.catalina.core.StandardContext start
    SCHWERWIEGEND: Context [/numberguess] startup failed due to previous errors
    22.02.2008 16:49:44 org.apache.coyote.http11.Http11BaseProtocol startCan anyone help me? That would be great!
    Thanks,
    N.

    Now I�m sure that my tomcat is running in a right way.
    I tried it now without eclipse.
    I only put the numberguess.war, the starterkit.war and the hangman.war from the demo-folder from facelets (now: 1.1.14) into the tomcats webapp folder.
    I get following error if I try to start numberguess with http://localhost:8080/numberguess/index.html (-->http://localhost:8080/numberguess/guess.jsf)
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
         javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256)
         javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)The same with hangman (http://localhost:8080/hangman)
    What is wrong here?
    Tomcat version is 6.0.16. The only thing I changed in the tomcat installation is that I added the jstl.1.2.jar to the lib-folder.
    Has anyone an idea?
    Thank you very much.

  • Apache Tomcat and eclipse for EP

    Hi,
    I have got anew book on SAP Enterprise protal by SAP Press.
    There is also a CD which contains Portal development kit, eclipse 2.1, apache tomcat 3.3.1 and portal development kit plug-in for eclipse.
    I don't have any SAP Access as if now.
    Is it possible to learn SAP EP programming based on the softwares I have got on these CD and the book.
    Tushar

    Tushur,  yes you can use that software to learn how to code JSPDynPage applications for the portal.   This is how I started learning portal technology.  I have since moved on to webdynpro.   You might consider, as Srinivas suggested,  download the Sneak Preview of WAS 6.40 java.  This will give you a complete development envirnment,  the NWDS,  the portal,  and the WAS to run it on.  Next thing you now, you'll be writing webdynpro apps like the best of em.
    Regards,
    Rich Heilman

  • Jinitiator 1.3 (calling webservice on https with apache axis and jre 1.3)

    I would like to run a PJC component which integrate Axis for communication with webservices located on remote server over https protocol..
    I have made a backend classes with wsdl2java (axis or with SOAPUI)..
    If i run a program with JDK > 1.3 all works fine... but if I run the program with JRE 1.3 (Jinitiator 1.3 PJC) I get the error:
    --> javax.xml.rpc.ServiceException: java.net.MalformedURLException: unknown protocol: https
    javax.xml.rpc.ServiceException: java.net.MalformedURLException: unknown protocol: https
         at arhivskiSistem.InDocArchiveWebServiceLocator.getInDocArchiveWebServiceSoap(InDocArchiveWebServiceLocator.java:100)
         at in2.mikrocop.Test.dokumenti(Test.java:93)
         at in2.mikrocop.Test.testiranje(Test.java:73)
         at in2.mikrocop.Test.main(Test.java:87)my source code is like this:
            System.setProperty("java.net.debug", "all");
            System.setProperty("javax.net.ssl.keyStore", direktorij + keyStore);
            System.setProperty("javax.net.ssl.keyStorePassword", this.getPassword());
            System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
            System.setProperty("javax.net.ssl.trustStore", direktorij + trustStore);
            System.setProperty("javax.net.ssl.trustStorePassword",  this.getPassword());
            System.setProperty("javax.net.ssl.trustStoreType", "jks");
            InDocArchiveWebServiceLocator ws_locator = new InDocArchiveWebServiceLocator();
            InDocArchiveWebServiceSoap_PortType pt = ws_locator.getInDocArchiveWebServiceSoap();Do you have any Idea how to solve this?

    First, I will start by saying that JInitiator was not intended to run on Win7, especially 64bit. So, it may be time to think about moving to the Java Plugin. Preferably one which is certified with your Forms version.
    To your issue, I suspect you need to change the "Region and Language" settings on the client machine. This can be found on the Control Panel. If that doesn't help, take a look at this:
    http://stackoverflow.com/questions/4850557/convert-string-from-codepage-1252-to-1250

  • OEPE 12.1.2.1 with Eclipse (Kepler) M2E and M2E-WTP and Seam 2 problem

    I've a JEE project with Maven 3.0.5  and JBoss Seam 2.3. I've some problems in Weblogic 12.1.2 application deployments with Eclipse.
    If I deploy the application as virtual application (split_src and .beabuild.txt), the .beabuild.txt includes the directories:
    C\:/FundeWeb/2.0/workspace/fundeweb2/web/target/m2e-wtp/web-resources = web_fundeweb2  (m2e-wtp project generated resources)
    C\:/FundeWeb/2.0/workspace/fundeweb2/web/src/main/webapp = web_fundeweb2 (project web resources)
    That's produces the next error (Multiple WEB-INF/ejb-jar.xml found):
    <01-ago-2013 14H07' CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1375358874432" for task "1". Error is: "weblogic.application.ModuleException: Multiple WEB-INF/ejb-jar.xml found. [weblogic.servlet.internal.WarSource@19d4f67, weblogic.servlet.internal.WarSource@c7fd40]"
    weblogic.application.ModuleException: Multiple WEB-INF/ejb-jar.xml found. [weblogic.servlet.internal.WarSource@19d4f67, weblogic.servlet.internal.WarSource@c7fd40]
      at weblogic.ejb.container.deployer.EjbModuleExtensionFactory.create(EjbModuleExtensionFactory.java:26)
      at weblogic.application.internal.ExtensibleModuleWrapper.createModuleExtensions(ExtensibleModuleWrapper.java:264)
      at weblogic.application.internal.ExtensibleModuleWrapper.initDrivenObjectArray(ExtensibleModuleWrapper.java:232)
      at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:107)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
      Truncated. see log file for complete stacktrace
    If I deploy the aplication in Weblogic Console with the split_src, with only the web/target/m2e-wtp/web-resources, the applications deploy succesfully.
    If I deploy de application as exploded archive, the jboss-seam.jar file isn't included in the WEB-INF/lib folder. The others jboss-seam-xxxx.jar files are included.
    In the virtual application deployments, I think that the OEPE integration with M2E and M2E-WTP, there are include only the m2e-wtp folders.

    Hi Subash,
    I tried the same installer on a 32bit machine and was able to run without any issues.
    I did however come across a few users jdeveloper users who had similar issues with the jdev installer and the following workaround seems to have solved the issue for them. coudl you try the same and let us know if that helped ?
    1. Extract "oepe-12.1.2.1-kepler-installer-win32.exe" file into C:\oepe-12.1.2.1-kepler-installer-win32
    2. In cmd go to C:\oepe-12.1.2.1-kepler-installer-win32
    3. Execute follow command:
       C:\PROGRA~1\Java\jdk1.6.0_31\bin\java.exe ( path to your JDK)  -jar install/modules/ora-launcher.jar DISKCNT=1 JRE_COMPONENT=oracle.jdk,oracle.jre
    thanks
    Raj

  • Applet and JavaWebService on Apache-Axis (SOAP)

    Hello!
    I have build a java-applet - it works fine.
    Then I have installed tomcat with axis and I developed a very easy JavaWebService.
    For better understanding: I saved the class:
    public class test
      public double testMethode( String job, double x )
        if( "Quadrat".equalsIgnoreCase( job ) )
          return x * x;
        if( "Sqrt".equalsIgnoreCase( job ) )
          return Math.sqrt( x );
        return 0.;
    }in my apache-tomcat-(with axis)-directory as ../apache-tomcat/webapps/axis/test.jws. I do all the things I describe here on my "localhost".
    Then I appended the following code to my applet:
    Object webservicereturn=null;
    try{
            String  wsEndpoint = "http://localhost:8080/axis/test.jws";
            String  wsMethod   = "testMethode";
    ****  Service service    = new Service(); *********************************************
            Call    call       = (Call)service.createCall();
            call.setTargetEndpointAddress( new URL( wsEndpoint ) );
            call.setOperationName( wsMethod );
            call.addParameter( "job", Constants.XSD_STRING, ParameterMode.IN );
            call.addParameter( "x",   Constants.XSD_DOUBLE, ParameterMode.IN );
            call.setReturnType( Constants.XSD_DOUBLE );
            webservicereturn = call.invoke( new Object[] { "Sqrt", new Double( "12.7" ) } );
        catch(Exception ex) {}
    JOptionPane.showMessageDialog(webservicereturn.toString() ... );When I start the applet as a java-application the JOptionPane contains the expected value.
    THE PROBLEM:
    When I start the applet as an applet in my firefox there is no JOptionPane but a beautiful security-exception:
    Java Plug-in 1.6.0
    Verwendung der JRE-Version 1.6.0 Java HotSpot(TM) Client VM
    java.lang.ExceptionInInitializerError
            at org.apache.commons.discovery.jdk.JDKHooks.<clinit>(JDKHooks.java:75)
            at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:412)
            at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
            at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
            at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
            at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
            at org.apache.axis.client.Service.getAxisClient(Service.java:104)
            at org.apache.axis.client.Service.<init>(Service.java:113)
    *****at LNdW_Applet.init(LNdW_Applet.java:35) *************************************
            at sun.applet.AppletPanel.run(AppletPanel.java:417)
            at java.lang.Thread.run(Thread.java:619)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader)
            at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
            at java.security.AccessController.checkPermission(AccessController.java:546)
            at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
            at java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:594)
            at java.lang.ClassLoader.<init>(ClassLoader.java:225)
            at org.apache.commons.discovery.jdk.PsuedoSystemClassLoader.<init>(PsuedoSystemClassLoader.java:73)
            at org.apache.commons.discovery.jdk.JDK12Hooks.findSystemClassLoader(JDK12Hooks.java:215)
            at org.apache.commons.discovery.jdk.JDK12Hooks.<clinit>(JDK12Hooks.java:73)
            ... 13 more(The **** are corresponding in this code-block with the **** in the previous code-block.)
    I thought that my applet can connect to the same server where it comes from (in this case my localhost).
    I am wondering about why the exception is just caused by the instruction "new Service();".
    What must I type in my code that also the applet can use the local web-service "test" ???? What is wrong?
    Thanks for answering ...
    Markus

    Hello,
    it seams to me that it is not possible to solve my problem.
    Thats why I mark this threads als solved ...
    Markus

  • Jax-ws and apache axis

    This is a newbie question. Can you tell me the difference between jax-ws and apache axis. Is it possible to build web services just using jax-ws and not apache axis. What would be advantages and disadvantages.
    Thanks.

    Yeah you can just use jax ws:http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/
    I find it more intuitive. Some would tell you that axis is more bloated :http://blogs.msdn.com/b/dotnetinterop/archive/2008/07/30/changing-of-the-guard-axis-out-jaxws-in.aspx
    I would rather decide between jax ws and REST :https://blogs.oracle.com/enterprisetechtips/entry/implementing_restful_web_services_in

  • Apache axis, JAX-RPC, JAXR, JAXM, JAX-WS, JAXB, and Metro

    Are all of the following the different APIs for creating web service applicaton?
    Apache axis,
    JAX-RPC,
    JAXR,
    JAXM,
    JAX-WS,
    JAXB, and
    Metro
    --If so, which one(s) are most widely used?
    --If not, what are the differences among them?
    Thanks
    Scott

    I think your are looking for a full web services framework.
    Apache axis --> Is a WS framework. implements jax-rpc. Provides some features on its own
    JAX-RPC --> Is a WS framework specification. Your application servers/axis implement this.
    JAXR --> not an web-service api, rather a web-service registry access api
    JAXM --> Is an api for xml messaging. Your framework provider may use this.
    JAX-WS --> Is jax-rpc 2.0. Your application server provider will give implementation for this. Otherwise you can use xfire/metro as the implementation. Chose this over jax-rpc.
    JAXB, --> Is used for xml-java binding. Jax-ws uses this. But not specific to jax-ws..
    Metro --> Reference implementation for jax-ws.
    All in all jax-rpc, jax-ws and axis2 are three options. go for jax-ws if you do not have any other constraints.As for selcting implementation of jax-ws, if you are working on an app-server (and not on a simple servlet container or without a server), server vendor will provide that. Otherwise look for xfire or metro.

  • Java, RSS Feed writer and Apache Axis

    Hi all,
    I wasn't sure in which subforum this question belongs, so I decided on this one :)
    I downloaded a RSS feed writer from http://www.rgagnon.com/javadetails/java-0608.html
    The example provided works perfectly when I have a 'dynamic web project', however, I then continue to create a new class in a different package of the same project. When I turn this class into a web service (using Apache Axis), then the test case RSS writer from the other package stops working. The exception thrown is this:
    javax.xml.stream.XMLStreamException: Can not write DOCTYPE declaration (DTD) when not in prolog any more (state 2; start element(s) written)
         at com.ctc.wstx.sw.BaseStreamWriter.verifyWriteDTD(BaseStreamWriter.java:1410)
         at com.ctc.wstx.sw.BaseStreamWriter.writeDTD(BaseStreamWriter.java:561)
         at com.ctc.wstx.evt.WstxEventWriter.add(WstxEventWriter.java:182)
         at mypackage.RSSWriter.write(RSSWriter.java:34)
         at mypackage.TestRSSWriter.main(TestRSSWriter.java:44)
    Update: Someone recommended I try using Rome instead to generate RSS feeds. I'll give it a bash now.

    It appears that someone (you?) has signed a class in the package org.apache.axis.utils.Messages
    with a signature that does not match other clasees in the package.
    If you didn't do it, check with Apache (or whoever you got the package from.)

  • Eclipse WTP + JWSDP + Tomcat

    Hi,
    I am trying to setup eclipse WTP with Java WSDP (1.6) and Tomcat for JWSDP
    (http://java.sun.com/webservices/containers/tomcat_for_JWSDP_1_5.html)
    Any idea whether it is possible to have such development environment or
    would I have to use Netbeans?
    Wouldn't I require a server runtime for (J)WSDP instead of Tomcat's deault
    Axis runtime? Is there such a runtime available?
    Thanks!

    I guess you could say that using Tomcat+WSDP in WTP would "work", but
    not with the same level of integration that you get using the WTP
    supplied Axis. I'm not familiar with JSDP, but I don't think WTP would
    get in the way. However, I can't say if it will provide as much
    "developmental help" as you are looking for.
    Larry
    Neeraj Mahajan wrote:
    > Hi Larry,
    >
    > By "development environment" I mean an intelligent IDE i.e. something
    > like eclipse+WTP that would help me develop/build/deploy/debug Web
    > Services. As you mentioned Tomcat doesnt include Axis runtime, and that
    > is the reasin why, I think, it can be used with Java WSDP too. But AFAIK
    > WTP includes Axis runtime to be used with Tomcat. So the question is,
    > can I use WTP to develop WebServices for Tomcat+WSDP. If yes, then what
    > plugins do I need to use for this.
    >
    > Cheers,
    > Neeraj
    > PS: The reason for using WSDP is beyond my control :(
    >
    > Larry Isaacs wrote:
    >
    >> I'm not sure exactly what you are asking for in the way of a
    >> "development environment". Tomcat doesn't include a default Axis
    >> runtime. I assume the Java WSDP would somehow provide that. WTP has
    >> its own support for developing web services that doesn't involve the
    >> Java WSDP. Have you investigated this support and decided to use Java
    >> WSDP instead?
    >
    >> Cheers,
    >> Larry
    >
    >> Neeraj Mahajan wrote:
    >>> Hi,
    >>>
    >>> I am trying to setup eclipse WTP with Java WSDP (1.6) and Tomcat for
    >>> JWSDP
    >>> ( http://java.sun.com/webservices/containers/tomcat_for_JWSDP_ 1_5.html)
    >>> Any idea whether it is possible to have such development environment
    >>> or would I have to use Netbeans?
    >>> Wouldn't I require a server runtime for (J)WSDP instead of Tomcat's
    >>> deault Axis runtime? Is there such a runtime available?
    >>>
    >>> Thanks,
    >>> Neeraj
    >>>
    >>>
    >

  • Developing SOAP based Webservice using Axis 2 Eclipse plugin

    Hi,
    I want to develop a SOAP based Webservice which connects to the PostgreSQL DB , by fetching the data for the employeeId entered and display the results in the browser. I'm using using JDK 1.6, Tomcat 6.0, Axis 2.0 , with Axis 2 Eclipse Plugin. Please send me a sample code of how to build it, i am able find some examples on the internet, but none of them are related to connecting to the DB and fetching the data. It will be great if you guys can provide the sample application which does have the same functionality as mine. Please do respond as this is urgent. Thanks in advance..
    Thanks,
    Rithu

    Thanks Adhir Mehtaji, This is what i have come up with, developing a webservices based on SAAJ and deploying that in Tomcat server, here is the Webservice and the other related files:-
    public class EmployeeService {
         * This method returns the Employee Name
         * @param empId String
         public void getEmployeeName(SOAPEnvelope req, SOAPEnvelope resp) throws javax.xml.soap.SOAPException {
              System.out.println("Inside the getEmployeeName in Employee Service");
              IEmployeeDAO employeeDAO= null;
              employeeDAO = new EmployeeDAOImpl();
              SOAPBody body = resp.getBody();
              String empId = null;
              NodeList empIdNodeList = req.getBody().getElementsByTagName("empId");
              for( int i=0; i < empIdNodeList.getLength(); i++ ) {
                   Element empIdElementElement = (Element) empIdNodeList.item(i);
                   Node empIdNode = empIdElementElement.getChildNodes().item(0);
                   empId = empIdNode.getNodeValue();
                   System.out.println("the empId in the employee service is:::"+empId);
              addNode(body,"empName",employeeDAO.getEmployeeName(empId));
              //addNode(body,"segmentName1",custSegmentDAO.getSegmentName(ZipCode));
         private static void addNode(SOAPBody body,String nodeName,String nodeValue) throws SOAPException{
              body.addChildElement(nodeName).addTextNode(nodeValue);
         This Service is exposed as a Webservice which connects to the DAO and get the response for the EmpId.
         This is the client file:-
         public class GetEmployeeNameClient {
              public static void main(String[] args) throws Exception {
                   // Invoking the Webservice endpoint which is hosted (deployed) in Tomcat by passing the SOAP Message request
                   // Get the SOAP Message response , which contains the employee name for the empId 100
                   // Parse the SOAP Message response to get the employee name (response from the WS)
                   String[] nodeNames = { "empId" };
                   String[] nodeValues = { "100" };
                   SOAPMessage message = GetEmployeeNameClient.getMessageFactory(
                             "getEmployeeName", nodeNames, nodeValues);
                   SOAPConnection conn = SOAPConnectionFactory.newInstance()
                             .createConnection();
                   SOAPMessage response = conn.call(message,
                             "http://localhost:8080/axis/services/EmployeeService");
                   // If the response is not null then everything is fine with the WS.
                   System.out.println("the response is what???"+response);
                   System.out.println("\n Soap response:\n");
                   System.out.println("\nXML response\n");
                   // Create transformer
                   TransformerFactory tff = TransformerFactory.newInstance();
                   Transformer tf = tff.newTransformer();
                   // Get reply content
                   Source sc = response.getSOAPPart().getContent();
                   // Set output transformation
                   StreamResult result = new StreamResult(System.out);
                   tf.transform(sc, result);
                   System.out.println();
                   // For these to work we need to connect to the DB - jdbc:oracle:thin:@ora-b2cd:6473:b2cd to get the segment name
                   SOAPBody soapBody = response.getSOAPBody();
                   System.out.println("the soapBody is what???"+soapBody);
                   NodeList empNameNodeList = soapBody.getElementsByTagName("empName");
                   System.out.println("the empNameNodeList.getLength is::"+empNameNodeList.getLength());
                   for (int i = 0; i < empNameNodeList.getLength(); i++) {
                        System.out.println("inside the loop");
                        Element empNameElement = (Element) empNameNodeList.item(i);
                        System.out.println("the empNameElement is what???"+empNameElement);
                        Node empNameNode = empNameElement.getChildNodes().item(0);
                        System.out.println("the empNameNode is what???"+empNameNode);
                        System.out.println("Employee Name For empId is ...... "
                                  + empNameNode.getNodeValue());
              // Construct the SOAP Message request by passing the empId 100(should come from UI)
              private static SOAPMessage getMessageFactory(String methodName,
                        String[] nodeNames, String[] nodeValues) throws SOAPException {
                   SOAPMessage message = null;
                   try {
                        System.out.println("Inside the getMessageFactory");
                        MessageFactory messageFactory = MessageFactory.newInstance();
                        message = messageFactory.createMessage();
                        SOAPPart soapPart = message.getSOAPPart();
                        SOAPEnvelope envelope = soapPart.getEnvelope();
                        SOAPBody body = envelope.getBody();
                        SOAPElement bodyElement = body.addChildElement(envelope
                                  .createName(methodName));
                        for (int index = 0; index < nodeNames.length; index++) {
                             bodyElement.addChildElement(nodeNames[index]).addTextNode(
                                       nodeValues[index]);
                        message.saveChanges();
                        // View input
                        System.out.println("\n Soap request:\n");
                        message.writeTo(System.out);
                        System.out.println();
                   } catch (Exception e) {
                        e.printStackTrace();
                   return message;
         This client will send a SOAPMessage with EmpId (100) as a request and get the response from the Webservice as SOAPMessage , which
         contains the empname for the respective empid which is passed.
    I tested this service in the browser, it is up and running through the URL : http://localhost:8080/axis/services
    But when i try to access the webservice to get the response from my client program, i am getting the following SOAP Fault string:-
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body><soapenv:Fault>
    <faultcode>
    soapenv:Server.userException
    </faultcode>
    <faultstring>
    org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler
    </faultstring>
    <detail>
    <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">
    user-15bbc0db6e
    </ns1:hostname>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    My client path contains :-
    axis.jar;
    jaxrpc.jar;
    saaj.jar;
    commons-logging.jar;
    commons-discovery.jar;
    wsdlj4.jar;
    axis-ant.jar;
    log4j-1.2.4.jar
    xerces.jar
    activation.jar
    mail.jar
    Similary the in the d:/tomcat/webapps/axis/WEB-INF/lib,contains the same as that in client path.
    I am using Tomcat 6.0 , JDK 1.6, I have googled and found that the expection is due to "Xerces.jar" not in Tomcat/webapps/axis/WEB-INF/lib.
    I have copied xerces.jar in the said path, still the error persists. Please do provide a solution to this. Where i have gone wrong.
    I have one more query, If i have to rest a "list" as a response from the server (webservice), how i can add the list into the SOAPMessage? Whether i need to parse it and add the values one by one in the SOAPMessage? like
    <empname> xxxx</empname> <empage>25</empage>
    <empname> yyyy</empname> <empage>26</empage>
    Please answer these queries.
    Thanks,
    Rithu

  • Biginner question Axis and tomcat

    Hi,
    I get this error when I'm running me web service with tomcat 5.5 and axis 1.4:
    Exception: AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.net.ConnectException: Connection refused: connect
    faultActor:
    faultNode:
    faultDetail:
            {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused: connect
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(Unknown Source)
            at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
            at java.net.PlainSocketImpl.connect(Unknown Source)
            at java.net.SocksSocketImpl.connect(Unknown Source)
            at java.net.Socket.connect(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
            at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
            at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
            at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
            at org.apache.axis.client.Call.invoke(Call.java:2748)
            at org.apache.axis.client.Call.invoke(Call.java:1784)
            at org.apache.axis.client.AdminClient.process(AdminClient.java:439)
            at org.apache.axis.client.AdminClient.process(AdminClient.java:404)
            at org.apache.axis.client.AdminClient.process(AdminClient.java:410)
            at org.apache.axis.client.AdminClient.process(AdminClient.java:320)
            at org.apache.axis.client.AdminClient.main(AdminClient.java:463)
            {http://xml.apache.org/axis/}hostname:yaelI created with eclipse web project with
    I set in: D:\Tomcat\webapps\axis
    D:\Tomcat\webapps\axis\WEB-INF\classes\Hello\HelloWorld.class
    D:\Tomcat\webapps\axis\deploy.wsdd
    D:\Tomcat\webapps\axis\undeploy.wsdd
    Thanks in advance
    Yael.

    Yael, you have found there a great tutorial and I do not see you I could give you a more detailed approach than the one found in this "Axis Hello World Example".
    The only step I think is useless is the first one in the Eclipse walk through, for the rest, just follow the steps and you will end up with a running web service and a running client.
    I notice you have not followed the tutorial already: your project is named "axis" and not "axis-ws-service" or "axis-ws-client".
    Maybe start over and follow the steps this time?

  • Problem calling BPEL process using apache axis client

    We have a BPEL process which we are trying to call from apache axis client. The problem is when we execute "call.invoke(new Object[] { xmlStr }) ", it adds an "argo" element to the message, and the xpath is unable to evaluate the message.
    We are able to call the process fron .Net and VB 6 using soap toolkit without any problem, so it seems odd we are not able to do so from apache axis.
    Here is how it should be received by the BPEL process:
    <inputVariable>
         <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
              <Request xmlns="http://e1.oracle.com/IAM">
                   <MessageHeader>
                        <Operation>update</Operation>
                   </MessageHeader>
                   <MessageDetail xmlns="">
                        <szSecondaryUoM_UOM2/>
                   </MessageDetail>
              </Request>
         </part>
    </inputVariable>
    But this is the way it is received having been sent from apache axis (notice the arg0 element) :
    <inputVariable>
         <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
              <arg0 xsi:type="xsd:string" xmlns="http://xmlns.oracle.com/InventoryAdjustment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                   <Request xmlns="http://e1.oracle.com/IAM">
                        <MessageHeader>
                             <Operation>update</Operation>
                        </MessageHeader>
                        <MessageDetail xmlns="">
                             <szSecondaryUoM_UOM2/>
                        </MessageDetail>
                   </Request>
              </arg0>
         </part>
    </inputVariable>
    Any insight as to how to approach this would be appreciated. The WSDL and java code follow.
    WSDL:
    <?xml version="1.0" encoding="UTF8" ?>
    <definitions name="InventoryAdjustment" targetNamespace="http://xmlns.oracle.com/InventoryAdjustment" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/InventoryAdjustment" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://schemas.oracle.com/bpel/extension" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment">
    <types>
    <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/InventoryAdjustment" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://schemas.oracle.com/bpel/extension">
    <element name="InventoryAdjustmentProcessRequest">
    <complexType>
    <sequence>
    <element name="input" type="string" />
    </sequence>
    </complexType>
    </element>
    <element name="InventoryAdjustmentProcessResponse">
    <complexType>
    <sequence>
    <element name="result" type="string" />
    </sequence>
    </complexType>
    </element>
    </schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment" xmlns:ns2="http://schemas.oracle.com/bpel/extension">
    <xsd:import namespace="http://e1.oracle.com/IAM" schemaLocation="http://tigger:7777/orabpel/xmllib/InventoryAdjustmentRequest.xsd" />
    </xsd:schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment" xmlns:ns2="http://schemas.oracle.com/bpel/extension">
    <xsd:import namespace="http://e1.oracle.com/IAM" schemaLocation="http://tigger:7777/orabpel/xmllib/InventoryAdjustmentResponse.xsd" />
    </xsd:schema>
    </types>
    <message name="InventoryAdjustmentRequestMessage">
    <part name="payload" element="ns1:Request" />
    </message>
    <message name="InventoryAdjustmentResponseMessage">
    <part name="payload" element="ns1:Response" />
    </message>
    <portType name="InventoryAdjustment">
    <operation name="process">
    <input message="tns:InventoryAdjustmentRequestMessage" />
    <output message="tns:InventoryAdjustmentResponseMessage" />
    </operation>
    </portType>
    <binding name="InventoryAdjustmentBinding" type="tns:InventoryAdjustment">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="process">
    <soap:operation style="document" soapAction="process" />
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    <service name="InventoryAdjustment">
    <port name="InventoryAdjustmentPort" binding="tns:InventoryAdjustmentBinding">
    <soap:address location="http://tigger:7777/orabpel/default/InventoryAdjustment/1.0" />
    </port>
    </service>
    <plnk:partnerLinkType name="InventoryAdjustment">
    <plnk:role name="InventoryAdjustmentProvider">
    <plnk:portType name="tns:InventoryAdjustment" />
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    java code:
    import javax.xml.namespace.QName;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.ServiceException;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.encoding.XMLType;
    import javax.xml.rpc.soap.SOAPFaultException;
    import org.apache.axis.client.Call;
    public class PostMessageClient {
         private static QName SERVICE_NAME;
         private static QName PORT_TYPE;
         private static QName OPERATION_NAME;
         private static String SOAP_ACTION;
         private static String STYLE;
         private static String THIS_NAMESPACE = "http://xmlns.oracle.com/InventoryAdjustment";
         static {
              SERVICE_NAME = new QName(THIS_NAMESPACE, "InventoryAdjustment");
              PORT_TYPE = new QName(THIS_NAMESPACE, "InventoryAdjustmentPort");
              OPERATION_NAME = new QName(THIS_NAMESPACE, "process");
              SOAP_ACTION = "process";
              STYLE = "message";
         public static void main(String[] args) {
                   try {
                        ServiceFactory serviceFactory = ServiceFactory.newInstance();
                        Service service = serviceFactory.createService(SERVICE_NAME);
                        Call call = (Call) service.createCall(PORT_TYPE);
                        call
                                  .setTargetEndpointAddress("http://tigger:7777/orabpel/default/InventoryAdjustment/1.0");
                        call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
                        call.setProperty(Call.SOAPACTION_URI_PROPERTY, SOAP_ACTION);
                        call.setProperty(Call.OPERATION_STYLE_PROPERTY, STYLE);
                        call.setOperationName(OPERATION_NAME);
                        String xmlStr = "<Request xmlns=\"http://e1.oracle.com/IAM\"><MessageHeader><Operation>update</Operation></MessageHeader><MessageDetail xmlns=\"\"><szSecondaryUoM_UOM2/></MessageDetail></Request>";
                        System.out.println("PostMessageClient - calling");
                        String ret = (String) call.invoke(new Object[] { xmlStr });
                        System.out.println("ret = " + ret);
                   } catch (SOAPFaultException e) {
                        System.err.println("Generated fault: ");
                        System.out.println(" Fault Code = " + e.getFaultCode());
                        System.out.println(" Fault String = " + e.getFaultString());
                   } catch (JAXRPCException e) {
                        System.err.println("JAXRPC Exception: " + e.getMessage());
                   } catch (ServiceException e) {
                        System.err.println("Service Exception: " + e.getMessage());
                   } catch (Exception e) {
                        System.err.println("Service Exception: " + e.getMessage());
    }

    Just a tip: Use a tool as SoapUI to findout the correct SOAP request and related attributes for the SOAP request.
    Marc
    http://orasoa.blogspot.com

  • Not able to access web service with axis and tomcat

    Dear all
    i am trying to access web service using axis in tomcat.
    i downloaded axis-bin-1_4.zip, unzipped it and installed it properly in tomcat.
    i had tested axis, its working fine.
    i had created a simple java class(a sample class from book) and deployed it in axis. i also created a client(a java consol class) for accessing that web service. but its giving error. i have no idea why this is comming.
    plz point me in right direction.
    thanks in advance
    The error is:
    Exception in thread "main" AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (404)/axis/ArithmeticProcessor.jws
    faultActor:
    faultNode:
    faultDetail:
            {}:return code:  404
    <html><head><title>Apache Tomcat/6.0.14 - Error report</tit
    le><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;ba
    ckground-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;
    color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Ari
    al,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-f
    amily:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-famil
    y:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:
    Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color :
    black;}A.name {color : black;}HR {color : #525D76;}--></style> </hea
    d><body><h1>HTTP Status 404 - /axis/ArithmeticProcessor.jws</h
    1><HR size="1" noshade="noshade"><p><b>
    type</b> Status report</p><p><b>message</b> <u&
    gt;/axis/ArithmeticProcessor.jws</u></p><p><b>descriptio
    n</b> <u>The requested resource (/axis/ArithmeticProcessor.jws) is n
    ot available.</u></p><HR size="1" noshade="noshade
    "><h3>Apache Tomcat/6.0.14</h3></body></html>
            {http://xml.apache.org/axis/}HttpErrorCode:404
    (404)/axis/ArithmeticProcessor.jws
            at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
    ava:744)
            at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
    y.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
            at org.apache.axis.client.Call.invoke(Call.java:2767)
            at org.apache.axis.client.Call.invoke(Call.java:2443)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at ArithmeticClient.main(ArithmeticClient.java:50)

    Hi ,
    Please go through this link and check in this way only you created the webservice correctly or not. If not follow and do it definitely will get you the webservice access by iphone or any application.
    www.scribd.com/doc/19255987/Web-Services-in-Abap

Maybe you are looking for

  • HT201209 i've redeemed my apple gift card but i don't know how to use it to purchase songs from the itunes store

    when i download a song it takes me to the page where i can redeem a gift card (which i did and have $100 credit) but i cannot figure out how to activate the balance for my purchase. please help??

  • Real time transaction response - unable to locate the root element

    Hi There Has anyone integrated webMethods with Data Services 3.2 for real time transactions? We are trying to create a real time dataflow, initiated by webMethods.  We are sending the request to the Access Server which runs our real time dataflow and

  • Using iWeb with MobileMe family pack

    I just upgraded to the family pack for mobile me. I had been using it for my homepage, but now I'd like to make a homepage for my son, and my wife wants to make a homepage as well. How is this handled in iWeb? I don't see a way to tell it where to pu

  • Audigy2 NX USB not recognized after Standby-M

    Hi, if somebody uses a Laptop there is only the possibility to use an USB, Firewire or PCMCIA Soundcard. I am using the Audigy2 NX USB with my portable PC (Windows XP SP2 installed). When I close the lid of my Laptop and it goes into <EM>Standby-Mode

  • Cannot download firefox

    I am a longtime user of firefox. 2 days ago when opening the browser, immediately msg told me program was not working asking me to close the program, which I did. finally uninstalled firefox, in order to reinstall.....now IE tells me it downloaded, I