The JAX-RPC DII interface passes an Object in and returns an Object. You must tell JAX-RPC how to map the Objects to XML. When using complex types, you either need to pass simple types, provide a JavaBeans class, or provide a customer serializer. This tutorial shows how to use complex types with the DII interface using a holder and JavaBeans class. (starting on page 5) The problem is that you need to a JavaBeans class. Unfortunately, Axis doesn't provide a runtime utility service that can generate a JavaBeans class from WSDL.
If you're trying to do runtime discovery and invocation of a service, you might consider using SAAJ rather than DII. SAAJ which lets you construct and parse the message manually, and you can use JWSDL and a schema parser to dynamically examine the type definitions. Alternatively, you might consider using Systinet WASP, which provides a runtime WSDL2Java service. You pass it a WSDL file (either a URL or an attachment), and it returns a JavaBeans jar file. You can then dynamically configure the service to use the JavaBeans class as described in the article above.
Dig Deeper on Topics Archive
Related Q&A from Anne Thomas Manes
Anne Thomas Manes explains the differences between open source clients and open source implementations. Continue Reading
Anne Thomas Manes discusses the best way to go about creating an enterprise data dictionary and why the systems works well. Continue Reading
Anne Thomas Manes explains the difference between 'hard' real time and 'live' real time systems. Continue Reading