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

Raymond Feng commented on TUSCANY-2059:
---------------------------------------

It seems that AXIS2 always generate ONEWAY operations for the methods with void 
return. In SCA, we need to annotate the method with @Oneway to mark it ONEWAY. 
There is a gap in Java2WSDL to provide an option to configure if we should map 
such methods into WSDL ONEWAY operations. 

The SCA spec follows the JAXWS to map Java2WSDL. So I assume we should annotate 
the method with either SCA @Oneway or javax.jws.OneWay. And we probably need to 
get AXIS2 to provide an option to override the default method mapping rules.



> Exception when using binding.ws instead of binding.sca. Interface contains 
> only methods without any in/out parameters and return values
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2059
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2059
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows XP SP2, Intel Core 2 CPU, 2.6, 2GB Ram, jdk 
> 1.5.0_10 
>            Reporter: Daniel Stucky
>            Assignee: Raymond Feng
>         Attachments: test.zip
>
>
> I have the following Java Interface that works with binding.sca:
> public interface Gamma
> {     
>       void start();                   
>       void doSomething();
>       void stop();
> }
> When I use binding.ws (I let Tuscany create the WSDL interfaces 
> automatically), I get the following exception (see below):
> If I add a parameter (e.g. int x) to any of the methods or I replace any 
> return type void by a type (e.g. int) it works.
> Does WSDL not allow services without any In/Out parameters ?
> java.lang.reflect.UndeclaredThrowableException
>       at $Proxy12.getRef(Unknown Source)
>       at services.AlphaImpl.run(AlphaImpl.java:27)
>       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:105)
>       at 
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:88)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:249)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:146)
>       at $Proxy11.run(Unknown Source)
>       at launch.Launch.main(Launch.java:14) Caused by: 
> org.apache.tuscany.sca.interfacedef.util.FaultException: An unknown message 
> label has been encountered: In
>       at 
> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:80)
>       at 
> org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:74)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:249)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:146)
>       ... 12 more
> I also tried it with version 1.2, the exception changed to this:
> org.osoa.sca.ServiceRuntimeException: Target fault type cannot be resolved: 
> null
>       at 
> org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:134)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:267)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:155)
>       at $Proxy12.getRef(Unknown Source)
>       at services.AlphaImpl.run(AlphaImpl.java:27)
>       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:109)
>       at 
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
>       at 
> org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
>       at 
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:267)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:155)
>       at $Proxy11.run(Unknown Source)
>       at launch.Launch.main(Launch.java:14)
> Caused by: org.apache.tuscany.sca.interfacedef.util.FaultException: Target 
> fault type cannot be resolved: null
>       at 
> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:97)
>       at 
> org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:78)
>       ... 16 more
> Caused by: org.apache.axis2.AxisFault: Target fault type cannot be resolved: 
> null
>       at 
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>       at 
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>       at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>       at 
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>       at 
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>       at 
> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:118)
>       at 
> org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:89)
>       ... 17 more

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to