users@jax-rpc.java.net

nested/anonymous complex types.

From: Praveen <praveen_c_at_yahoo.com>
Date: Thu, 17 Aug 2006 17:42:26 -0700 (PDT)

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
        com.xyz.ProcessRequestType_Exception, 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|javax.enterprise.system.stream.out|_ThreadID=11;_ThreadName=Thread-30;|D:\java\SunAppServer90\domains\domain1\generated\ejb\j2ee-modules\war\com\xyz\\processrequest\ProcessRequestSEI_Tie.java:54: processRequest(javax.xml.soap.SOAPElement) in com.xyz.ProcessRequestSEI cannot be applied to (com.xyz.ProcessRequest)
            com.xyz.ProcessRequestResponse response = ((com.xyz.ProcessRequestSEI) 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!