Re: Some newbie questions...

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Mon, 25 Jul 2005 09:17:07 -0700

Hi Ryan,

See inline responses ...

Ryan Cuprak wrote:
> Hello,
> Tinkering with a HelloWorld example and got the warning below:
> [wscompile] warning: You have specified : -gen:both or -gen:client with
> a SEI. The use of these modes are recommended with WSDL only.
This message says that you are trying to generate client-side artifacts
starting from an SEI. The recommended programming model is to start from

> I generated it with the following snippet:
> <target name="client-gen">
> <delete dir="src-gen" quiet="true"/>
> <mkdir dir="src-gen"/>
> <wscompile
> keep="true"
> client="true"
This says that you are generating client-side artifacts.

> base="src-gen"
> xPrintStackTrace="true"
> verbose="true"
> classpath="${bin}"
> config="${config.rpcenc.file}">
Can you share your ${config.rpcenc.file} ?

I recently posted a doc/lit sample on JWSPD 1.6 at
I'd recommend you to try that sample since rpc/enc is not a recommended
encoding for WSDL.

> <classpath>
> <path refid="classpath"/>
> </classpath>
> </wscompile>
> </target>
> The ant target for the server generates the wdsl but as far as I can
> tell I am not re-using it for generating the client code. So, if
> wscompile doesn't know about the wsdl, then it must build one on the fly
On the server-side, if wsdeploy does not know about WSDL then it will
generate one. However on the client-side wscompile does need to know the
exact WSDL to generate the artifacts.

> - correct? Looking at the reference I don't see an easy way to feed it a
> wsdl - is this possible?
Once your endpoint is deployed correctly, the WSDL is available by
appending ?WSDL to the endpoint address. For instance, if the endpoint
address is http://localhost:8080/jaxrpc/hello, then the WSDL will be
available at http://localhost:8080/jaxrpc/hello?WSDL. You should use
this WSDL to generate your client-side artifacts.

> With regards to the model file, does wsdeploy require it? Presently I
> am not writing the internal model to a file (-model) but wsdeploy
> doesn't appear to complain. I am a little perplexed on the utility of
> this model file.
All the features (for example -f:explicitcontext, etc.) that you specify
on the command-line are stored in the model and then used by wsdeploy
for the server-side artifact generation. In the absence of model file,
wsdeploy will use a default encoding and no features will be used. So if
you expect to generate a rpc/enc WSDL and has no specific requirements
on the generated WSDL, then you might be ok otherwise you need to store
the model file in raw WAR.

> In terms of the section on
> ( which
> details supported for wscompile - where can I get a more in-depth
> description?
The options supported by wscompile are documented in

I'd recommend you to download JAX-WS 2.0 EA2
which is much more powerful than JAX-RPC, requires no artifact
generation, much simpler programming model, no intricate
switches/features, a default of doc/lit WSDL (WS-I BP recommended) and a
host of other cool features. The tools are much better documented
(evolving though)!

> I am just trying to get my head around this - help/pointers are greatly
> appreciated!

Thanks for your interest in JAX-RPC.

> Thanks,
> Ryan

got Web Services ?
Download Java Web Services Developer Pack from