Do we think the following is a supported scenario for 2.x

1/
    <component name="CallBackBasicClient">
       <implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
        <reference name="aCallBackService" target="CallBackBasicService"/>
    </component>

    <component name="CallBackBasicService">
      <implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
      <service name="CallBackBasicService">
         <binding.ws/>
      </service>
    </component>

Where the interface for the CallBackBasicService is bidirectional.

The spec says "If the callback element is not present, the behaviour
is runtime implementation dependent.". We could assume that the
callback binding is the same as the forward binding if it's not
specified. This is tricky though as you don't know what the callback
binding is until you have matched the forward wire. We do this late in
the day now and the callback would always end up with and SCA binding.
.

If we don't allow that what should the minimum 2.x configuration be to
get this to work?

2/
    <component name="CallBackBasicClient">
       <implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
        <reference name="aCallBackService" target="CallBackBasicService">
            <callback>
                <binding.ws>
            </callback>
        </reference>
    </component>

    <component name="CallBackBasicService">
      <implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
      <service name="CallBackBasicService">
         <binding.ws/>
      </service>
    </component>

This relies on us passing the callback binding URI with the forward
message. 1.x does this (it passes the component/service URI rather
than a binding URL) but I'm unable to determine that is does anything
useful with it. I don't see where it could go to look up the callback
service endpoint based on the URI that is passed. Certainly 1.x
callback scenarios only seem to work if you fully specify the callback
bindings (i'm not including the case here where you might set a
callback object).

3/
    <component name="CallBackBasicClient">
       <implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
        <reference name="aCallBackService" target="CallBackBasicService">
            <binding.ws uri="http://L3AW203:8085/CallBackBasicService"/>
            <callback>
                <binding.ws uri="http://L3AW203:8084/CallBack"/>
            </callback>
        </reference>
    </component>

    <component name="CallBackBasicService">
      <implementation.java
class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
      <service name="CallBackBasicService">
         <binding.ws uri="http://L3AW203:8085/CallBackBasicService"/>
          <callback>
              <binding.ws uri="http://L3AW203:8084/CallBack"/>
          </callback>
      </service>
    </component>

Clearly in 2.x we should support 3.

I think we could also support 2. We have a number of options here as
we have access to a registry of endpoints now. We could either pass
the callback Endpoint URI with the forward message or pass the URI of
the actual callback binding. The latter may make some sense if you are
interacting with non SCA bidirectional services however that makes it
difficult to determine the callback binding on the service side in the
SCA case as you don't have the callback Endpoint URI to send to the
registry.

I'm in the middle of giving 2 a try based in passing the callback
Endpoint URI. In the case of binding.ws this is passed in the WSA from
field.

Thoughts?

Simon

Reply via email to