Hi,
I raised a similar issue on this list before but I didn't get any responses.
When I debugged a test case from Rick today, I found it was due to same
problem.
Let's assume we have composite level reference with Axis2 web service
binding.
<reference name="RemoteInteropDocService">
<!-- interface.wsdl
interface="http://soapinterop.org/#wsdl.interface(DocTestPortType)"/ -->
<interface.java interface="org.soapinterop.DocTestPortType"/>
<binding.ws
endpoint="http://soapinterop.org/#wsdl.endpoint(interopDocSvc/interopDocPort)"
location="wsdl/interopdoc.wsdl"/>
</reference>
Physically, there are two service contracts involved for this reference.
1) The interface declared in <interface.xxx>. I assume it's for the inbound
wiring. For example, you can have a reference at a component being wired to
this reference (
component.reference --> composite.reference).
2) The WSDL portType used by the <binding.ws>. It really defines the
contract for the outgoing request. With Axis2, AXIOM is the databinding. If
a portType is not declared for binding.ws, we should derive it from the
interface.xxx (Java2WSDL could be used for interface.java).
We may have two cases (SC: ServiceContract):
a) component.reference (SC1) --> composite.reference (SC2) --> Axis2 web
service (SC3)
b) composite.reference (SC2) --> Axis2 web service (SC3)
(CompositeContext.locateService(<compositeReferenceName>) is used to make
the invocation)
In case a), the DataBindingInterceptor will be added to the wire (to be
precise, SC1.outbound wire) if SC1 and SC2 require some mappings.
But we don't have a way to add a DataBindingInterceptor between SC2 and SC3.
As a result, case b) is failing (Rick's test case). I have tried to do this
in the BindingBuilder but it doesn't seem to be very straightforward with
the following observations.
1) Wires are created for Reference by the WireService after the Reference
instance is created by a builder.
2) No outbound wire is created for Reference.
3) WirePostProcessor is not triggered for case b).
One thing I can think of is to allow the builder to set an optional outbound
service contract for the Reference and the WireService will create the
outbound wire for Reference in this case. And the TargetInvoker should be
added to the outbound wire instead of inbound wire. During connecting, the
Connector will trigger the WirePostProcessor to mediate the inbound wire and
outbound wire. Then we have a chance to add a DataBindingInterceptor to
mediate SC2 and SC3.
Any thoughts?
Thanks,
Raymond
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]