Re: Deploying with wscompile

From: Vishal Goenka <vgoenka_at_CAMPUSPIPELINE.COM>
Date: Fri, 08 Nov 2002 13:18:45 -0700

On Thu, 24 Oct 2002 08:18:08 -0600, Vishal Goenka <vgoenka_at_CAMPUSPIPELINE.COM> wrote:

>On Wed, 23 Oct 2002 02:33:22 -0600, Sen, Puny <Punyanjan.Sen_at_SOFTWAREAGUSA.COM> wrote:
>>Is it possible to make a deployable web service using just wscompile? If so,
>>what should the the contents of the configuration file, web.xml, etc, look
>I don't think so. You must use wsdeploy.

I take back my earlier response. You can indeed deploy using wscompile
only. It is unfortunate that there isn't too much documentation, so I had
to arrive at this after some experimentation, but that is true with several
of the JAX-RPC areas given its infancy.

The reason I was forced to look into this is worth pointing out. Given the
poor one-way treatment of Enumerations in JAX-RPC, I could not use wsdeploy
since my WSDL file had enumerations, and wsdeploy fails to parse the Java
mapping of the WSDL enumeration that was generated by wscompile!

Here's what I did to do that:

1. Started with a WSDL file only for interface/type definitions
2. Use config.xml similar to what a client would use, to generate the
server ties (-gen:server). Make sure you generate the model file using the
-model option in wscompile.
3. Hand generate jaxrpc-ri-runtime.xml file. This seemed painful at first,
but if you have the jaxrpc-ri.xml file (one that you would have created
to use wsdeploy), you can easily generate the jaxrpc-ri-runtime.xml using
simple mappings. Use XmlProperty of 'ant' to read the jaxrpc-ri.xml and your
wsdl files, and a simple <concat> task in ant can generate the
jaxrpc-ri-runtime.xml. If anyone knows how to get wscompile to generate it
for you, I would appreciate the information!
4. Hand generate the web.xml file (again, look at a sample generated by
wscompile, and an 'ant' target written similar to above will suffice)

Presto! Just pack everything in a war just as wsdeploy would and you can
deploy it.