users@jax-rpc.java.net

Re: wsdeploy not creating wsdl

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Fri, 07 Oct 2005 10:51:10 -0700

Glenn,
What output are you seeing when running this? Have you tried to run
wsdeploy command line on HWS.war with verbose on?

Glenn wrote:

>I'm using jdk 1.5.0_05, jwsdp 1.6 and tomcat 5.5.9 on Windows XP. I've copied all of the jars from the following directories into <TOMCAT_HOME>/shared/lib:
> <JWSDP_HOME>/jaxrpc/lib
> <JWSDP_HOME>/saaj/lib
> <JWSDP_HOME>/jaxp/lib/endorsed
> <JWSDP_HOME>/jwsdp-shared/lib
>
>I've written a simple Hello World Web Service:
>Interface:
>
> package com.test.service;
>
> import java.rmi.Remote;
> import java.rmi.RemoteException;
>
> public interface HelloWorld extends Remote {
> public String sayHi(String s) throws RemoteException;
> }
>
>Implementation:
>
> package com.test.service;
>
> import java.rmi.RemoteException;
>
> public class HelloWS implements HelloWorld {
> public HelloWS() {
> }
>
> public String sayHi(String s) throws RemoteException {
> return "Hi "+s;
> }
> }
>
>I have the following web.xml file
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app>
> <display-name>Hello World Service</display-name>
> <description>A simple web service</description>
> <session-config>
> <session-timeout>60</session-timeout>
> </session-config>
> </web-app>
>
>And the following jaxrpc-ri.xml file
> <?xml version="1.0" encoding="UTF-8"?>
> <webServices xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd";
> version="1.0"
> targetNamespaceBase="http://com.test/wsdl";
> typeNamespaceBase="http://com.test/types";
> urlPatternBase="/myHelloWS"/>
>
> <!-- The endpoint becomes the service name in the WSDL -->
> <endpoint name="HelloWorldWS"
> displayName="Hello World Service"
> description="A simple web service"
> interface="com.test.service.HelloWorld"
> implementation="com.test.service.HelloWS"/>
>
> <endpointMapping endpointName=HelloWorldWS" urlpattern="/hi"/>
> </webServices>
>
>In my build.xml I compile the HelloWorld and HelloWS classes and copy them to the web/WEB-INF/classes directory
>Then I copy web.xml to the web\WEB-INF directory and finally run the following target.
>
> <target name="build-war" depends="init, compile">
> <taskdef name="wsdeploy"
> classname="com.sun.xml.rpc.tools.ant.Wsdeploy">
> <classpath>
> <fileset dir="${jwsdp.dir}/jaxrpc/lib">
> <include name="**/*.jar"/>
> </fileset>
> <fileset dir="${jwsdp.dir}/jwsdp-shared/lib">
> <include name="**/*.jar"/>
> </fileset>
> <fileset dir="${jwsdp.dir}/saaj/lib">
> <include name="**/*.jar"/>
> </fileset>
> </classpath>
> </taskdef>
> <war destFile="${build.dir}/HWS.war"
> webxml="${config.dir}/web.xml" >
> <fileset dir="${web.dir}"/>
> </war>
>
> <wsdeploy outWarFile="${dist.dir}/myHelloWS.war"
> inWarFile="${build.dir}/HWS.war"
> tmpdir="${build.dir}/wsdeploy-generated"
> verbose="true"
> keep="true">
> </wsdeploy>
> </target>
>
>The compilation and initial war file succeed, The temp dir is created and all the files from the initial war are put into the appropriate directories. The deployable war file is created, but it does not contain the wsdl or the stubs and ties. These files do not exist in the generated temp directory either. The target completes (BUILD SUCCESSFUL). Looking at the generated war file, the original web.xml and jaxrpc-ri.xml are there renamed as web-before.xml and jaxrpc-ri-before.xml. The new web.xml looks like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app>
> <display-name>Hello World Service</display-name>
> <description>A simple web service</description>
> <listener>
><listener-class>com.sun.xml.rpc.server.http.JAXRPCContextListener</listener-class>
> </listener>
> <session-config>
> <session-timeout>60</session-timeout>
> </session-config>
> </web-app>
>
>and the file jaxrpc-ri-runtime.xml looks like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <endpoints xmlns='http://java.sun.com/xml/ns/jax-rpc/ri/runtime'
> version='1.0'>
> </endpoints>
>
>Does anyone have any ideas about what I'm doing wrong?
>
>Thanks in advance.
>Glenn
>
>
>
>
>_______________________________________________
>Join Excite! - http://www.excite.com
>The most personalized portal on the Web!
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
>

-- 
 - Doug