users@jax-rpc.java.net

Re: Can't find com.sun.xml.rpc.tools.ant.Wscompile

From: Bobby Bissett - Javasoft <robert.bissett_at_sun.com>
Date: Thu, 20 Nov 2003 14:44:54 -0500

> In the "Samples/HelloWorld" Example they used WSDL as Service
> endpoint,but i want to use the "Jax-rpc Implementation" as Service
> endpoint and generate the WSDL file.(That is was I was trying to change
> the existing Build.XML file under "samples/HelloWorld" directory).
> Can you please change the existing ("samples/HelloWorld/Build.XML") so
> that I it can generate WSDL file from the Service Endpoint.Or can you
> please give an example of writing the Build.XML for "HelloService"
> example under "Jwstutorial/jaxrpc" which i can implement/Run under
> "Jwsdp_Home/Samples" directory.

There are examples in the tutorial about how to create an endpoint
starting with an interface (I think the main "helloservice" example
starts with an interface). The tutorial is here:

http://java.sun.com/webservices/tutorial.html

Basically, you need to change two things: tell wscompile you're defining
a service rather than importing a wsdl, and change the config.xml files
that you give to wscompile so that it has the correct info in it.

To change the wscompile arguments, you want to use -define instead
-import. When using the ant scripts, you can change:
     import="true"
to:
     define="true"

That tells wscompile that you're going to be generating a wsdl starting
from an interface.

Then change the config file for the service generation, which you can
just do by pointing the 'config="${config.rpcenc.file}"' for the server
generation to point to a new config.xml file that uses a <service>
element rather than a <wsdl> element.

Now that you're generating a wsdl, you should change the config.xml file
for the client generation to point to the new wsdl, i.e. online after
you deploy the war file, rather than the old one that you're not using.

Cheers,
Bobby



---------------------------------------------------------------------
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