complexTypes for dynamic invocations?

From: Kenneth Andersson <kandersson_at_SIMTECH.A-STAR.EDU.SG>
Date: Wed, 22 Jan 2003 10:36:35 +0800


I'm doing some generic and dynamic invocations of Web Services by just parsing the WSDL and from there configuring the JAX-RPC Call interface to be able use the call.invoke(Object[] params) method. For simple datatypes it is easy. However, for operations with complex datatypes or elements, I have to get the XML Schema definition from the <wsdl:types> element, figure out a corresponding XML construct, and then pass it as a Java construct to the JAX-RPC Call interface.

I have two questions that I hope someone can help me with:

1. For a generic XML construct other than simple datatypes, what parameter am I supposed to pass to the call.invoke(Object[] params) method?
(Simple datatypes such as xsd:string, xsd:int, xsd:boolean are quite straightforward, just pass in java String[], Integer[], Boolean[], etc. What should I pass for a complex datatype? element?)

2. To parse the WSDL is not that difficult, except the <wsdl:types> element since it (almost always) contains XML Schema. How to parse the XML Schema and then construct a corresponding XML? Any good XML Schema parsers out there?
(I actually wrote my own WSDL Parser using JDOM, but I haven't dealt with the <wsdl:types> entry yet. Now I saw that JWSDL [JSR110] is released, but JWSDL also doesn't support the contents of <wsdl:types> [they treat it as extensibility elements since potentially not just XSD could be used])

I just joined this mailing list so apologise if you have already covered the above topics. Anyway, would appreciate some input.

Thanks and regards,