• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Problem in ServiceGen task

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic