Comments inline below.
Simon
Raymond Feng wrote:
Hi,
I'm playing with itest-callback-basic-ws with different ways to specify
<callback> for the service element. The following are what I found:
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
targetNamespace="http://callback"
name="CallBackBasicTest">
<component name="CallBackBasicClient">
<implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
<reference name="aCallBackService" target="CallBackBasicService">
<callback>
<binding.ws uri="http://localhost:8084/aCallBackService"/>
</callback>
</reference>
</component>
<component name="CallBackBasicService">
<implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
<service name="CallBackBasicService">
<binding.ws uri="http://localhost:8085/CallBackBasicService"/>
<!-- callback -->
</service>
</component>
</composite>
1) It works without callback element. From the debugger, it seems that
we use the <binding.sca> to call back. Should we use the reference side
callback binding instead?
The SCA 1.1 spec says that the behaviour is implementation dependent if
the service has no callback element, so we can choose what to do. However
in this case the reference does have a callback element and the SCA 1.1
spec says that this element specifies the bindings that can be used for
the callback. The client callback element doesn't specify <binding.sca>,
so it's incorrect for the service to use binding.sca for the callback.
I think the service should use binding.ws as specified by the reference.
2) empty callback/binding.ws doesn't work: (the callback binding uri is
null, not trying to bind to the uri from the reference side callback
binding). This used to work in 1.x.
<callback>
<binding.ws/>
</callback>
This should work according to the SCA 1.1 spec.
3) callback/binding.ws with explicit URI works:
<callback>
<binding.ws uri="http://localhost:8084/aCallBackService"/>
</callback>
This is legal according to the SCA 1.1 spec but it shouldn't be used in
normal circumstances because it restricts the service to a single client
with a fixed callback address.
Simon
What's the right expectation here?
Thanks,
Raymond
/________________________________________________________________
Raymond Feng
[email protected] <mailto:[email protected]>
/Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
/
________________________________________________________________/