[ 
https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831387#action_12831387
 ] 

Anil GVN commented on TUSCANY-3458:
-----------------------------------

I took a little bit of help from the tuscany 1.x samples & tried the following 
.composite configurations. But still its failing.

service.composite

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"; 
targetNamespace="http://sample"; name="Calculator">
  <component name="CalculatorServiceComponent">
    <implementation.java class="com.ca.garan10.sca.CalculatorServiceImpl"/>
    <service name="CalculatorService">
      <interface.java interface="com.ca.garan10.sca.CalculatorService" 
        callbackInterface="com.ca.garan10.sca.CallBackHandler" />    
      <binding.ws uri="http://localhost:8080/CalculatorServiceComponent"/>
      <callback>
        <binding.ws/>
      </callback>
    </service>
  </component>
</composite>


client.composite:

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"; 
targetNamespace="http://sample"; name="CalculatorClient">
  <component name="CalculatorClientComponent">
    <implementation.java class="com.ca.garan10.sca.CalculatorClientImpl"/>
    <reference name="calculatorService">
      <interface.java interface="com.ca.garan10.sca.CalculatorService" 
        callbackInterface="com.ca.garan10.sca.CallBackHandler" />    
      <binding.ws uri="http://localhost:8080/CalculatorServiceComponent"/>
      <callback>
        <binding.ws uri="http://localhost:9090/CalculatorClientComponent"/>
      </callback>
    </reference>
  </component>
</composite>


I see that the callback handler object is being set. But I see this exception @ 
the server during invocation using callback handler:

org.oasisopen.sca.ServiceRuntimeException: No callback wire found
        at 
org.apache.tuscany.sca.core.invocation.impl.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:59)
        at $Proxy25.onResponse(Unknown Source)
        at 
com.ca.garan10.sca.CalculatorServiceImpl.run(CalculatorServiceImpl.java:118)
        at java.lang.Thread.run(Thread.java:595)

Can someone please help me!
Thanks,
Anil

> Support for Callbacks in TUSCANY 2.x
> ------------------------------------
>
>                 Key: TUSCANY-3458
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3458
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension
>    Affects Versions: Java-SCA-2.0-M4
>         Environment: java 5 + Tuscany 2.0 M4
>            Reporter: Anil GVN
>            Priority: Critical
>
> Hi,
> When I am trying to run callback web service test (callback-basic-ws), it 
> works. What I have observed is that in this test case, both client & server 
> are in the same composite.
> Then I tried to separate them out into 2 different composites. This gave me 
> the following exception at the server side:
> Caused by: org.oasisopen.sca.ServiceRuntimeException: No callback wire found
>       at 
> org.apache.tuscany.sca.core.invocation.impl.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:59)
>       at $Proxy23.callBackMessage(Unknown Source)
>       at 
> org.apache.tuscany.sca.test.CallBackBasicServiceImpl.knockKnock(CallBackBasicServiceImpl.java:33)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at 
> org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:135)
>       at 
> org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:72)
>       at 
> org.apache.tuscany.sca.core.invocation.RuntimeWireInvoker.invoke(RuntimeWireInvoker.java:126)
>       ... 29 more
> (( I tried to provide callback in my server composite also. ))
> There is another application that I wrote myself which sort of replicates the 
> same scenario where in I found that I am getting a NullPointerException when 
> trying to access the @Callback annotated variable in my serviceImpl.
> This raised the following question in my mind. Is the Callback mechanism 
> fully supported on all bindings? 
> Or is it that there needs to be some extra information provided in my 
> server.composite file (which I don't think is the case), in case of 
> ws-binding? May be I am missing something somewhere!
> The composite files on the server & client sides look as follows:
>  
> server.composite:
> ---------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"; 
> targetNamespace="http://sample"; name="Calculator">
>   <component name="CallBackBasicService">
>     <implementation.java 
> class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
>     <service name="CallBackBasicService">
>       <binding.ws uri="http://localhost:8086/CallBackBasicService"/>
>       <callback>
>         <binding.ws uri="http://localhost:8084/aCallBackService"/>
>       </callback>
>     </service>
>   </component>
> </composite>
> --------------
> client.composite:
> --------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <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">
>       <binding.ws uri="http://localhost:8086/CallBackBasicService"/>
>       <callback>
>         <binding.ws uri="http://localhost:8084/aCallBackService"/>
>       </callback>
>     </reference>
>   </component>
> </composite>
> Thanks & Regards,
> Anil

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to