Hi,
As part of the databinding integration, we require some changes in the
core/spi to support the propagation of type system information from the
model loaders to databinding transformers.
A type system defines the typing for a databinding. For example,
ClassLoader/Class is the type system for Java, TypeHelper/Type for SDO and
XMLSchema for AXIOM, DOM and other weakly-typed XML bindings. Type systems
can have different scoping and visibility in the composite hiearchy.
Typically, the type system is created and populated by loaders based on some
SCDL extensions such as "import.sdo" or introspections. Databinding
interceptors added to the wire during post-wiring require such information
to drive data transformations. We need a way to pass the type system from
loaders to transformers.
The following is an example to illustrate what changes I made. I had some
discussions with Jeremy on IRC yesterday.
1) Loading phase
<composite ...> <!-- CompositeComponentType --->
<import.sdo .../> <!-- SDOType -->
...
</composite>
The "import.sdo" loader will create a TypeHelper for the composite and
return it in SDOType (a wrapper of TypeHelper extending ModelObject). The
CompositeComponentType loader add it to the model extensions. We need to
keep the same TypeHelper instance for multiple invocations of the
"import.sdo" loader. Since the "load" SPI doesn't carry the parent model, I
use the DeploymentContext to keep the state.
2) Build phase:
The CompositeBuilder creates runtime CompositeComponent(s) based on the
CompositeComponentType model object. We need to build/pass the TypeHelper
(in a generic Object) to CompositeComponent so that port-wiring processors
can access it.
3) Post wiring phase:
The DataBindingPostWireProcessor receives InboundWire and OutboundWire and
adds DataBindingInterceptor(s) to the wires. For the transformers to receive
type system in TransformationContext, the DataBindingInteceptor should be
able to capture the type system.
I have to make two changes in RuntimeWire getContainerName(),
setContainerName() to setContainer() and getContainer() so that we can
navigate through SCAObject.getParent() to the current CompositeComponent to
retrieve the type system.
With the changes I made locally (and with other changes in databinding and
axis2 binding modules), I can finally remove the SDO dependencies and data
conversion logic from Axis2 binding completely and run helloworldwsclient
and helloworldws round-trip successfully using simple types as well as SDO
complex types.
Please review the changes. If there are no objections, I plan the commit
them (we can refine as we go) before Jeremy move the modules.
Thanks,
Raymond
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]