I started investigating TUSCANY-2112.  The approach I am taking is to make
something like the following work without having to annotate the java
interfaces with @Conversational etc.

    <component name="MyConvServiceComponent">
        <implementation.java class="
org.apache.tuscany.sca.mytest.MyConvServiceImpl"/>
        <service name="MyConvService" requires="sca:conversational">
            <interface.java interface="
org.apache.tuscany.sca.mytest.MyConvService"
                            callbackInterface="
org.apache.tuscany.sca.mytest.MyConvCallback"/>
            <operation name="endConversation"
requires="tuscany:endsConversation"/>
            <binding.ws/>
            <callback>
                <binding.ws/>
            </callback>
        </service>
    </component>
    <component name="MyConvClientComponent">
        <implementation.java class="
org.apache.tuscany.sca.mytest.MyConvClientImpl"/>
        <reference name="myConvService" target="MyConvServiceComponent"
requires="sca:conversational">
            <interface.java interface="
org.apache.tuscany.sca.mytest.MyConvService"
                            callbackInterface="
org.apache.tuscany.sca.mytest.MyConvCallback"/>
            <operation name="endConversation"
requires="tuscany:endsConversation"/>
            <binding.ws uri="/MyConvServiceComponent"/>
        </reference>
    </component>

I have tried some fix in Axis2ServiceBindingProvider and
Axis2ReferenceBindingProvider (where I noticed some TODO's) to set the
conversation related flags based on the intents.  But, then there seem to be
some other problems like the intents are not propagated to references etc,
for which I have created a JIRA.  Even though I set the flags explicitly
through the debugger by changing the values, I ended up with a
"pass-by-value not allowed" exception due to some object serialization
problems.  Appears like the intent processing should be done at higher level
than the bindings, perhaps when when the component instance is created!!

Some questions I have:
1. About setting endsConversation intent on callback methods.  The
<callback> tag does not seem to allow <operation> tags inside.  Should these
intents be set under <service> tag itself?  In this case we will need to
qualify the operation name so that it is recognized it is from callback
interface.
2. Should the callback interface be inheriting the intents from the
service?  Or should it be set on the callback instead?

Reply via email to