Re: nested/anonymous complex types.

From: Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
Date: Thu, 17 Aug 2006 19:38:48 -0700

Looks like you are using JAX-RPC. Try with JAX-WS. wsimport should be
able to handle all kinds of schemas. The SEI will not have SOAPElement
in the signatures.


Praveen wrote:

> Hi,
> This is my first post here and I am not sure if this is the right
> place. If it isn't please feel free to let me know.
> I need to develop a webservice that uses a couple of XSDs for the type
> information. One XSD is for the request and the other is for the
> response. Both XSDs happen to have anonmous or nested complex types.
> The nesting is multiple level. So there would be a complexType nested
> within another complexType and so on.
> After some experimenting, I found out that this type of nesting is not
> very well handled by JAX-WS or JAX-RPC. Since
> wscompile(/wsimport/wsdeploy/whatever tool is doing it behind the
> scenes) can not understand the nesting/anonymous complex types, it
> generates an SEI with vague Input/Ouput parameters that look like this:
> public javax.xml.soap.SOAPElement
> processRequest(javax.xml.soap.SOAPElement request) throws
>, java.rmi.RemoteException {
> But when I deploy the application, I think the deploy tool tries to
> generate the stubs and skeletons and along the process it assumes that
> the Input/Output parameters are strongly typed objects. I get an error
> looking similar to this:
> [#|2006-08-17T20:35:33.590-0400|INFO|sun-appserver-pe9.0||_ThreadID=11;_ThreadName=Thread-30;|D:\java\SunAppServer90\domains\domain1\generated\ejb\j2ee-modules\war\com\xyz\\processrequest\
> processRequest(javax.xml.soap.SOAPElement) in
> cannot be applied to (
> response =
> ((
> getTarget()).processRequest(myProcessRequestRequest);
> ^
> At this point I am assuming that I probably need to somehow define my
> own type mapping using the mapping.xml or something like that. But how
> do I specify which level of complexType I am referring and so on and
> so forth?
> Your help is greatly appreciated.
> Thanks!