1 Reply Latest reply: Nov 1, 2012 3:24 PM by 967242 RSS

    Need help on deploying jax rpc webservice

    967242
      Hi All,

      I have tried very much to deploy jax rpc webservice on weblogic.
      I am beginner and followed oracle tutorials but I am not able to do it.



      /*
      * To change this template, choose Tools | Templates
      * and open the template in the editor.
      */
      package org.anil.ws;

      /**
      *
      * @author ufindanil
      */
      public interface BookQuote {
      public String getBookPrice(String isbn)
      throws java.rmi.RemoteException;

      }


      /*
      * To change this template, choose Tools | Templates
      * and open the template in the editor.
      */
      package org.anil.ws;
      //import javax.jws.WebService;
      /**
      *
      * @author ufindanil
      */
      //@WebService(name="HelloWorldPortType", serviceName="HelloWorldService")
      public class BookQuoteImpl {

      // Given the ISBN of a book, get its wholesale price.
      public String getBookPrice(String isbn){
      return "anilbook";
      }
      }


      <?xml version="1.0"?>
      <project name="Hello World Project" default="info" basedir=".">
      <property name="build.classes.dir" value="classes"/>
      <path id="myid">

      <fileset dir="lib2">
      <include name="**/*.jar"/>

      </fileset>
      <pathelement location="classes"/>

      </path>



      <taskdef name="servicegen" classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask" >

      <classpath refid="myid"/>
      </taskdef>
      <taskdef name="source2wsdd" classname="weblogic.ant.taskdefs.webservices.autotype.JavaSource2DD" >

      <classpath refid="myid"/>
      </taskdef>
      <taskdef name="source2wsdd" classname="weblogic.ant.taskdefs.webservices.autotype.JavaSource2DD" >

      <classpath refid="myid"/>
      </taskdef>
      <taskdef name="wspackage" classname="weblogic.ant.taskdefs.webservices.wspackage.WSPackage" >
      <classpath refid="myid"/>
      </taskdef>
      <target name="info">
      <source2wsdd javaSource="org/anil/ws/BookQuoteImpl.java" ddFile="ddfiles/web-services.xml" serviceURI="/MyService" />
      <wspackage output="ears/myWebService" contextURI="web_services" ddFile="ddfiles/web-services.xml" />
      </target>

      </project>



      ---------------------------

      Above files are what I have written

      When I run ant it is generating ear file but when I copy it in domains/autodeploy folder

      in deployments-webservices section it is showing none to display..

      Following is generated web.xml content. Do we need to specify any servlet related things ?

      <!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>
      </web-app>