Say I use SCDL like (for WS binding):

   <component name="MyComponent">
       <implementation.java class="
test.sca.w2j.ws.static_sdo.helloworld.GreetingComponentImpl"/>
       <reference name="helloWorldService">
           <interface.wsdl interface="
http://w2j.sca.soa.ws/test/hw-ws-static-sdo-2parm#wsdl.interface(HelloWorld)
"/>
           <binding.ws wsdlElement="
http://w2j.sca.soa.ws/test/hw-ws-static-sdo-2parm#wsdl.port(HelloWorldService/HelloWorldSoapPort)
"/>
       </reference>
   </component>

If I rely on the DefaultWSDLInterfaceIntrospector to build the Operation
model objects for the Component-level Interface, they will be created with a
null DB, because of the null in:

   WSDLOperation op = new WSDLOperation(wsdlFactory, wsdlOp, inlineSchemas,
null, resolver);

This leads to the following exception as I try to convert between the null
DB at the component level and the AXIOM DB set by the WS binding at the
binding level.

org.apache.tuscany.sca.databinding.TransformationException: No wrapper
handler is provided for databinding: null
   at
org.apache.tuscany.core.databinding.transformers.Input2InputTransformer.getWrapperHandler
(Input2InputTransformer.java:204)
   at
org.apache.tuscany.core.databinding.transformers.Input2InputTransformer.transform
(Input2InputTransformer.java:112)
   at
org.apache.tuscany.core.databinding.transformers.Input2InputTransformer.transform
(Input2InputTransformer.java:53)
   at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(
MediatorImpl.java:77)
   at
org.apache.tuscany.core.databinding.wire.DataTransformationInteceptor.transform
(DataTransformationInteceptor.java:168)


So I tried setting up the Axiom DB instead from
DefaultWSDLInterfaceIntrospector on the component-level-interface Operation
objects loaded from <interface.wsdl> definitions.  (Note I had to workaround
JIRA TUSCANY-1342 with the fix I suggested).

This change has the side effect, however, of causing
DataTransformationInteceptor to not get set up when I'm using the WS
binding, since the WS binding uses the Axiom DB and since the
DataBindingRuntimeWireProcessor won't create the interceptor in the case the
DBs match.

Does someone have a better idea of how to make the DataBinding framework do
what I want here?

Looking at this I'm wondering... did we lose a DB "layer" in the move to
1.0-spec code?   Before we had component-level, composite-level and
binding-level.    Now we have only component-level and binding-level.

Is a DB Interceptor needed to transform between the impl level and the
component level in a case like this where you have a Java impl w/ SDO DB but
you put <interface.wsdl> on the component-level service/ref?

(One might ask what is the point of using <interface.wsdl> at all in a case
like this, since the WS binding can convert between different, compatible
Java interfaces on either side.    Well, I'm looking ahead to the time when
we have a wire between a ref w/ WS binding and a service w/ WS binding and <
interface.wsdl> would allow us to easily determine interface compatibility
on the wire.)

Scott

Reply via email to