You can have one java class for all complex types -- use org.w3c.dom.Element
or some simple wrapper class that might also include the xml type.  You need
to set up serializer/deserializer pairs for all such combinations.  The WSDL
would be read to determine these type mappings.

Jeff
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 12:59 AM
Subject: Dynamic invocation of web services with complex types


Hi people,

I was looking into dynamic invocation of web services for some time. Dynamic
invocation would have the advantage of using the wsdl to construct the soap
message dynamically, meaning that changes in wsdl could be automatically
picked up by the soap executor.

What I have found until now is that both Axis and the Web Service Invocation
Framework (originally created by ibm but now also an apache project,
http://ws.apache.org/wsif/) allow dynamic invocation. The DynamicInvoker
sample demonstrates how it can be done in Axis.

However, there is one caveat for both DynamicInvoker and WSIF: they work, as
they are, only with simple java types. If you want to use complex types, you
have to have a corresponding Java class created on the client side - which
makes dynamic invocation much less 'dynamic' : if the complex types in the
wsdl change, you have to change and recompile the corresponding java class.

JROM (Java Record Object Model; http://www.alphaworks.ibm.com/tech/jrom)
from alphaworks addresses exactly this problem, and it contains samples
which demonstrate Axis and WSIF used together with JROM.

However,  I would prefer using Axis alone to solve the problem of Dynamic
Invocation with complex types. Anybody solved this using Axis alone and
without pre-creating client side java classes to represent the complex
types?

Thanks for any hints,

Zoltan Schreter
NOKIA, Finland


Reply via email to