aspose file tools*
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
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Problem in ServiceGen task" Watch "Problem in ServiceGen task" New topic
Author

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:-
http://localhost:7001/web_services/MessageWriter?WSDL

My configuration files are like this:-

Build.xml:-


<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="http://www.infosys.com/com/infosys/wsmdb" />

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

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

<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="weblogic.ant.taskdefs.build.WLPackageTask" />

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

<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>
<target name="compileWS">
<echo message="compile WS..." />
<javac classpathref="library" srcdir="${src}/webservices" destdir="${war_folder}" />
</target>
<target name="createWS" depends="compileWS" >
<servicegen destEar="${build}" warName="${war_file}" contextURI="web_services">
<classpath refid="library">
</classpath>
<classpath>
<pathelement path="${war_folder}" />
</classpath>
<service javaClassComponents="com.infosys.wsmdb.webservices.MessageWriter"
targetNamespace="${namespace}"
serviceName="MessageWriter" serviceURI="/MessageWriter"
generateTypes="True" expandMethods="True"
>
</service>
</servicegen>
</target>

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

<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>
<copy file="${build}/${war_file}" todir="${ear_folder}" />

<wlpackage srcdir="${ear_folder}" destdir="${package}" toFile="${package}/${ear_file}" />
</target>
<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}"/>
<classpath>
<pathelement location="${client_folder}/${client_jar_file}"/>
<pathelement path="${client_folder}"/>
</classpath>
</java>
</target>
<target name="all" depends="clean, init, createWS, createClient, createEAR" />
</project>


Application.xml:-

<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<application>
<display-name></display-name>
<module>
<web>
<web-uri>WSMDB_MessageWriter.war</web-uri>
<context-root>web_services</context-root>
</web>
</module>

</application>


Thanks inAdvance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in ServiceGen task
 
Similar Threads
Class not found
Problem in adding jar files to the building war file using ant
Builded file using clientgen does not have my jar files
Expose EJB as webservice
Builded file using clientgen does not have my jar files