You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Anila Kumar GVN (JIRA)" <de...@tuscany.apache.org> on 2010/02/05 14:10:27 UTC

[jira] Created: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

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: Anila Kumar 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.


[jira] Commented: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Anil GVN (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831426#action_12831426 ] 

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

Hi Simon,

Here's the complete console output seen @ the server node:

-----------------
Feb 9, 2010 3:39:35 PM org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 domain: tuscany.apache.org
Feb 9, 2010 3:39:35 PM org.apache.tuscany.sca.node.impl.NodeFactoryImpl loadContributions
INFO: Loading contribution: file:/E:/Work/code/sca-calculator-server/bin/
Feb 9, 2010 3:39:39 PM org.apache.tuscany.sca.implementation.java.introspect.JavaIntrospectionHelper checkInvalidAnnotations
WARNING: Invalid annotation @org.oasisopen.sca.annotation.Callback(value=class java.lang.Void) is found on com.ca.garan10.sca.CallBackHandler com.ca.garan10.sca.CalculatorServiceImpl.callback
Feb 9, 2010 3:39:41 PM org.mortbay.log.Slf4jLog info
INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
- No JMS connection factories are defined.Will not listen for any JMS messages
Feb 9, 2010 3:39:41 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: jetty-6.1.19
Feb 9, 2010 3:39:41 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: Started SelectChannelConnector@0.0.0.0:8086
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://garan10-xp:8086/CallBackBasicService
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@613258)Endpoint:  URI = CallBackBasicService#service-binding(CallBackBasicService/CallBackBasicService)
- No JMS connection factories are defined.Will not listen for any JMS messages
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: jetty-6.1.19
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: Started SelectChannelConnector@0.0.0.0:8080
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://garan10-xp:8080/CalculatorServiceComponent
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@26753751)Endpoint:  URI = CalculatorServiceComponent#service-binding(CalculatorService/CalculatorService)
- No JMS connection factories are defined.Will not listen for any JMS messages
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: jetty-6.1.19
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: Started SelectChannelConnector@0.0.0.0:1128
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://garan10-xp:1128/AddServiceComponent/AddService
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@20182749)Endpoint:  URI = AddServiceComponent#service-binding(AddService/AddService)
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@9719229)Endpoint:  URI = SubtractServiceComponent#service-binding(SubtractServiceImpl/SubtractServiceImpl)
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@8115306)Endpoint:  URI = MultiplyServiceComponent#service-binding(MultiplyServiceImpl/MultiplyServiceImpl)
Feb 9, 2010 3:39:42 PM org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@28745811)Endpoint:  URI = DivideServiceComponent#service-binding(DivideServiceImpl/DivideServiceImpl)
Setting callback handler: [Proxy - org.apache.tuscany.sca.core.invocation.impl.JDKCallbackInvocationHandler@1de152f]
Exception in thread "Thread-12" 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:119)
	at java.lang.Thread.run(Thread.java:595)
-----------------

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
>            Assignee: Simon Laws
>            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.


[jira] Commented: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Anil GVN (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830892#action_12830892 ] 

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

Thanks Nash. It's failing failing despite the fixes :(

The problem that I see is that the server is not able to get the CALLBACK object. Rest is working fine. I have tried even to load from the requestContext but still its failing. That's what makes me think if its ever tested on remote JVM scenario - in this case in "binding.ws" scenario.

Regards,
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.


[jira] Commented: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Anil GVN (JIRA)" <de...@tuscany.apache.org>.
    [ 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.


[jira] Closed: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws closed TUSCANY-3458.
-------------------------------

    Resolution: Fixed

Closing now as work has been done on the callback processing for M5. Please re-open if the issue remains. 

> 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
>            Assignee: Simon Laws
>            Priority: Critical
>             Fix For: Java-SCA-Next
>
>
> 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.


[jira] Assigned: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws reassigned TUSCANY-3458:
-----------------------------------

    Assignee: Simon Laws

> 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
>            Assignee: Simon Laws
>            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.


[jira] Commented: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831414#action_12831414 ] 

Simon Laws commented on TUSCANY-3458:
-------------------------------------

Hi 

Can you copy the console output here. I'd like to see if there are any endpoint resolution errors reported. 

Thanks 

Simon

> 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
>            Assignee: Simon Laws
>            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.


[jira] Commented: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831438#action_12831438 ] 

Simon Laws commented on TUSCANY-3458:
-------------------------------------

Thanks 

This warning looks significant. 

WARNING: Invalid annotation @org.oasisopen.sca.annotation.Callback(value=class java.lang.Void) is found on com.ca.garan10.sca.CallBackHandler com.ca.garan10.sca.CalculatorServiceImpl.callback 

Do you have the sca-api module on your classpath. If so can you show me how you're using the annotation as it's complaining about it for some reason. 

I also added a couple of tests with alternative configurations. I found the multiple node configuration a little hard to figure out so I'll post separately on that. However they both apparently work so I must have a slightly different configuration from you. If we don't get anywhere with the annotation issues I'll ask you to take a look here (http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/itest/callback-two-composites/) and here (http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/itest/callback-two-nodes/) and see how these differ from what you have.

Simon

> 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
>            Assignee: Simon Laws
>            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.


[jira] Commented: (TUSCANY-3458) Support for Callbacks in TUSCANY 2.x

Posted by "Simon Nash (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830315#action_12830315 ] 

Simon Nash commented on TUSCANY-3458:
-------------------------------------

The composite definitions don't seem to be quite correct.  The callback binding on the service side shouldn't have a callback address, because this will be provided at runtime by the client when it makes the forward call.  Also, the namespaces on the server and client are different (200903 and 200912).  For the M4 release, I think the definitions should be 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/>
      </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://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>


> 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.