• 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
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

JAX-WS create server and client jar in one build pass (ant)

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using JAX-WS with WebLogic 10.3, Java 1.6. I'm attempting to build both my service war and client jar in one pass through an ant script. Since the clientgen ant task depends on a deployed wsdl I am forced to deploy before compiling the client. Does anyone have any strategies for building a server war and client jar in one pass? A sample any file would be great. I have not had success using apt or wsgen.

<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask"/>

<target name="build-service" depends="compile">
<jwsc srcdir="${src}"
destdir="${dist}"
debug="on"
keepGenerated="yes">
<classpath>
<pathelement path="${wl_home}/server/lib/weblogic.jar"/>
<pathelement path="${wl_home}/server/lib/webservices.jar"/>
<pathelement path="${bea_home}/modules/features/weblogic.server.modules_10.3.0.0.jar"/>
</classpath>

<module contextPath="JAXWS" name="JAXWSTutorial">
<jws file="com/artisan/sample/service/PricingServiceImpl.java" type="JAXWS"/>
<fileset dir="${war}">
<include name="**/*.xml"/>
</fileset>
<descriptor file="${war}/WEB-INF/web.xml"/>
<descriptor file="${war}/WEB-INF/weblogic.xml"/>
</module>
</jwsc>

<clientgen type="JAXWS"
wsdl="http://tstwap01:7400/JAXWS/services/PricingServiceImpl?wsdl"
destDir="${classes}"
packageName="com.sample.wsclient"
serviceName="PricingService"/>

<javac srcdir="${classes}" destdir="${classes}" debug="true" includes="com/sample/wsclient/*.java">
<classpath refid="project.class.path"/>
</javac>

<jar destfile="${dist}/pricingService.jar" basedir="${classes}" includes="com/sample/wsclient/*.class"/>
</target>
 
Dave Meyers
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got wsgen to work, so I am good to go.

<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask"/>
<taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen"/>

<target name="build-service" depends="compile">
<jwsc srcdir="${src}"
destdir="${dist}"
debug="on"
keepGenerated="yes">
<classpath>
<pathelement path="${wl_home}/server/lib/weblogic.jar"/>
<pathelement path="${wl_home}/server/lib/webservices.jar"/>
<pathelement path="${bea_home}/modules/features/weblogic.server.modules_10.3.0.0.jar"/>
</classpath>

<module contextPath="JAXWS" name="APLP-JAXWSTutorial">
<jws file="com/sample/service/PricingServiceImpl.java" type="JAXWS"/>
<descriptor file="${war}/WEB-INF/weblogic.xml"/>
</module>
</jwsc>

<wsgen sei="com.artisan.sample.service.PricingServiceImpl"
resourcedestdir="${build}"
sourcedestdir="${classes}"
destdir="${classes}"
genwsdl="true" verbose="true" keep="true">
<classpath>
<pathelement location="${classes}"/>
</classpath>
</wsgen>

<clientgen type="JAXWS" wsdl="${build}/PricingServiceImplService.wsdl"
destDir="${classes}"
packageName="com.sample.wsclient"
serviceName="PricingService"/>

<jar destfile="${dist}/pricingService.jar" basedir="${classes}" includes="com/sample/wsclient/*.class"/>
</target>
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic