3 Replies Latest reply on Mar 31, 2008 11:20 AM by Peter Johnson

    How to create a Web Service in JBoss

    Mike John Newbie

      Hi,

      I am new to JBoss and mostly work with BEA and Oracle AS. I just downloaded jboss-4.2.2.GA. Now how do I deploy a Web Service are there any special kinds to create an ear for a Web Service. As I just have a simple HelloWorld program that I need to expose it as a Web Service and deploy it on JBoss but don't know what commands do I need to create a Web Service ear out of it and how to deploy it on the server.

      Can someone please provide a simple example step by step to build and deploy a Web Service in JBoss.

      As in oracle I can use the following to build an ear for a Web Service

      <target name="assemble-webservice" depends="setup">
       <echo message="-----> Assembling the service ear file." />
       <copy todir="${out.dir}/war/WEB-INF/lib">
       <fileset dir="${out.lib}">
       <include name="*.jar"/>
       </fileset>
       </copy>
       <oracle:topDownAssemble appName="${app.name}"
       wsdl="${wsdl.file}" className="${implementaion.class}"
       input="${bld.webservice.dir}" output="${out.dir}"
       ear="${lib.dir}/${app.name}_service.ear">
       <!--fileset refid="resources" /-->
       </oracle:topDownAssemble>
       </target>


      and in BEA can use the following:

      <servicegen
       destEar="${build}"
       warName="helloWorldService.war">
       <service
       javaClassComponents="com.xx.ab.webservice.helloWorldWebservice"
       targetNamespace="http://xmlns.xx.com/ab/helloWorldService"
       serviceName="HelloWorldService"
       serviceURI="/helloWorldService"
       style="document"
       protocol="http"
       expandMethods="True">
       <handlerChain name="ExpressChain" handlers="com.xx.ab.handler.SOAPHandler"/>
       </service>
       <classpath>
       <pathelement path="${classes}"/>
       <pathelement path="${lib}/dynamic/*.jar"/>
       </classpath>
       </servicegen>


      Now how do I do it in JBoss. What commands to use to create an ear for a Web Service. Any small tutorial will really help alot. Any help is really appreciated.

      Thanks