This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Problem in ServiceGen task Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Problem in ServiceGen task" Watch "Problem in ServiceGen task" New topic

Problem in ServiceGen task

Manoj Raghuwanshi
Ranch Hand

Joined: Jun 20, 2004
Posts: 75
I am using service ant task in weblogic to generate web services EAR and client jar.
When I deploy this on weblogic 8.1 it is showing me deployed but when I try the following URL in the browser it gives nothing:-

My configuration files are like this:-


<project name="wsmdb_poc" default="all" basedir=".">

<property name="lib" value="./lib" />
<property name="build" value="./build" />
<property name="dist" value="./dist" />
<property name="config" value="./config" />
<property name="src" value="./src/com/infosys/wsmdb/" />
<property name="war_folder" value="${build}/wsmdb_webservices" />
<property name="ear_folder" value="${build}/wsmdb_poc" />
<property name="mdb_folder" value="${build}/wsmdb_mdb" />
<property name="client_folder" value="${build}/wsmdb_client" />
<property name="package" value="${build}/ear" />
<property name="war_file" value="WSMDB_MessageWriter.war" />
<property name="ear_file" value="wsmdb_poc.ear" />
<property name="mdb_jar_file" value="wsmdb_mdb.jar" />
<property name="client_jar_file" value="cadvp_client.jar" />
<property name="namespace" value="" />

<property name="file" value="Request.xml" />

<path id="library">
<fileset dir="${lib}">
<include name="**.jar" />

<taskdef classpathref="library" name="servicegen"
classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask" />
<taskdef classpathref="library" name="clientgen"
classname="weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask" />
<taskdef classpathref="library" name="wlpackage"
classname="" />

<target name="clean">
<echo message="cleaning..." />
<delete dir="${build}" />

<target name="init">
<echo message="init..." />
<mkdir dir="${build}" />
<mkdir dir="${war_folder}" />
<mkdir dir="${ear_folder}" />
<mkdir dir="${mdb_folder}" />
<mkdir dir="${client_folder}" />
<mkdir dir="${package}" />
<target name="compileWS">
<echo message="compile WS..." />
<javac classpathref="library" srcdir="${src}/webservices" destdir="${war_folder}" />
<target name="createWS" depends="compileWS" >
<servicegen destEar="${build}" warName="${war_file}" contextURI="web_services">
<classpath refid="library">
<pathelement path="${war_folder}" />
<service javaClassComponents="com.infosys.wsmdb.webservices.MessageWriter"
serviceName="MessageWriter" serviceURI="/MessageWriter"
generateTypes="True" expandMethods="True"

<target name="createClient" depends="createWS">
<clientgen ear="${build}" warName="${war_file}" packageName="com.infosys.wsmdb.client"
<classpath refid="library" />
<javac classpathref="library" srcdir="${src}/client" destdir="${client_folder}" includes="">
<classpath> <pathelement path="${client_folder}/${client_jar_file}" /> </classpath>

<target name="createEAR">
<copy file="${config}/application.xml" todir="${ear_folder}/META-INF"/>
<copy todir="${ear_folder}/APP-INF/lib">
<fileset file="${lib}/*.jar" />
<copy file="${build}/${war_file}" todir="${ear_folder}" />

<wlpackage srcdir="${ear_folder}" destdir="${package}" toFile="${package}/${ear_file}" />
<target name="run">
<java classpathref="library" classname="com.infosys.wsmdb.client.RequestClient" fork="true">
<arg value="http://localhost:7001/web_services/MessageWriter?WSDL"/>
<arg value="${file}"/>
<pathelement location="${client_folder}/${client_jar_file}"/>
<pathelement path="${client_folder}"/>
<target name="all" depends="clean, init, createWS, createClient, createEAR" />


<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' ''>


Thanks inAdvance
Consider Paul's rocket mass heater.
subject: Problem in ServiceGen task