You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org> on 2007/08/18 02:34:30 UTC

[jira] Resolved: (TUSCANY-1266) ServiceBindingProvider getBindingInterfaceContract is unnecessary

     [ https://issues.apache.org/jira/browse/TUSCANY-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino resolved TUSCANY-1266.
---------------------------------------------

    Resolution: Invalid

I don't think that this analysis is correct: ServiceBindingProvider.getInterfaceContract is still required.

Sure you can do some of the work to prepare the interface contract annotated with the binding-specific databinding in the ServiceBindingProvider constructor, but if you don't return that interface contract in ServiceBindingProvider.getInterfaceContract() then the runtime will never know about it.

You can try to return null from Axis2ServiceBindingProvider.getInterfaceContract(), and you'll see that most Web Services test cases will break.

Here's a build log showing that:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.tuscany.sca.binding.axis2.Axis2ServiceTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec
Running org.apache.tuscany.sca.binding.axis2.itests.HelloWorldWSDLMergedTestCase
log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAXUtils).
log4j:WARN Please initialize the log4j system properly.
Added Servlet mapping: http://localhost:8085/HelloWorldService/helloWorld
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.454 sec
Running org.apache.tuscany.sca.binding.axis2.itests.HelloWorldOMTestCase
Added Servlet mapping: http://localhost:8085/HelloWorldService/helloWorld
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.417 sec
Running org.apache.tuscany.sca.binding.axis2.itests.endpoints.WSDLRelativeURITestCase
Added Servlet mapping: http://localhost:8085/HelloWorldService/helloWorld/myRelativeURI
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.634 sec
Running org.apache.tuscany.sca.binding.axis2.itests.HelloWorldTestCase
Added Servlet mapping: http://localhost:8085/services/HelloWorldWebService
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.502 sec <<< FAILURE!
testCalculator(org.apache.tuscany.sca.binding.axis2.itests.HelloWorldTestCase)  Time elapsed: 0.417 sec  <<< ERROR!
java.lang.reflect.UndeclaredThrowableException
        at $Proxy6.getGreetings(Unknown Source)
        at org.apache.tuscany.sca.binding.axis2.itests.HelloWorldComponent.getGreetings(HelloWorldComponent.java:30)
        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.JavaTargetInvoker.invokeTarget(JavaTargetInvoker.java:112)
        at org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invoke(JavaTargetInvoker.java:134)
        at org.apache.tuscany.sca.implementation.java.invocation.PassByValueInvoker.invoke(PassByValueInvoker.java:61)
        at org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.invoke(TargetInvokerInvoker.java:46)
        at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvoker.invoke(RuntimeSCABindingInvoker.java:41)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:231)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:92)
        at $Proxy6.getGreetings(Unknown Source)
        at org.apache.tuscany.sca.binding.axis2.itests.HelloWorldTestCase.testCalculator(HelloWorldTestCase.java:32)
        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 junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
Caused by: org.apache.axis2.AxisFault: argument type mismatch
        at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
        at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
        at org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:88)
        at org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:68)
        at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInteceptor.invoke(DataTransformationInteceptor.java:68)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:231)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:92)
        ... 38 more

Running org.apache.tuscany.sca.binding.axis2.itests.endpoints.DefaultMultiServiceTestCase
Added Servlet mapping: http://localhost:8085/HelloWorldService/helloWorld
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.262 sec
Running org.apache.tuscany.sca.binding.axis2.itests.endpoints.DefaultSingleServiceTestCase
Added Servlet mapping: http://localhost:8085/HelloWorldService/helloWorld
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.345 sec
Running org.apache.tuscany.sca.binding.axis2.itests.HelloWorldNoWSDLTestCase
Added Servlet mapping: http://localhost:8085/helloWorld
Added Servlet mapping: http://localhost:8085/Echo
Added Servlet mapping: http://localhost:8085/helloWorld
Added Servlet mapping: http://localhost:8085/Echo
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.314 sec <<< FAILURE!
testHelloWorld(org.apache.tuscany.sca.binding.axis2.itests.HelloWorldNoWSDLTestCase)  Time elapsed: 0.757 sec  <<< ERROR!
java.lang.reflect.UndeclaredThrowableException
        at $Proxy6.getGreetings(Unknown Source)
        at org.apache.tuscany.sca.binding.axis2.itests.HelloWorldComponent.getGreetings(HelloWorldComponent.java:30)
        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.JavaTargetInvoker.invokeTarget(JavaTargetInvoker.java:112)
        at org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invoke(JavaTargetInvoker.java:134)
        at org.apache.tuscany.sca.implementation.java.invocation.PassByValueInvoker.invoke(PassByValueInvoker.java:61)
        at org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.invoke(TargetInvokerInvoker.java:46)
        at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvoker.invoke(RuntimeSCABindingInvoker.java:41)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:231)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:92)
        at $Proxy6.getGreetings(Unknown Source)
        at org.apache.tuscany.sca.binding.axis2.itests.HelloWorldNoWSDLTestCase.testHelloWorld(HelloWorldNoWSDLTestCase.java:32)
        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 junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
Caused by: org.apache.axis2.AxisFault: argument type mismatch
        at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
        at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
        at org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:88)
        at org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:68)
        at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInteceptor.invoke(DataTransformationInteceptor.java:68)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:231)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:92)
        ... 38 more

testEchoFoo(org.apache.tuscany.sca.binding.axis2.itests.HelloWorldNoWSDLTestCase)  Time elapsed: 0.551 sec  <<< ERROR!
java.lang.reflect.UndeclaredThrowableException
        at $Proxy7.echoFoo(Unknown Source)
        at org.apache.tuscany.sca.binding.axis2.itests.EchoComponent.echoFoo(EchoComponent.java:30)
        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.JavaTargetInvoker.invokeTarget(JavaTargetInvoker.java:112)
        at org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invoke(JavaTargetInvoker.java:134)
        at org.apache.tuscany.sca.implementation.java.invocation.PassByValueInvoker.invoke(PassByValueInvoker.java:61)
        at org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.invoke(TargetInvokerInvoker.java:46)
        at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCABindingInvoker.invoke(RuntimeSCABindingInvoker.java:41)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:231)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:92)
        at $Proxy7.echoFoo(Unknown Source)
        at org.apache.tuscany.sca.binding.axis2.itests.HelloWorldNoWSDLTestCase.testEchoFoo(HelloWorldNoWSDLTestCase.java:54)
        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 junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
Caused by: org.apache.axis2.AxisFault: Pass-by-value is not supported for the given object
        at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
        at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
        at org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:88)
        at org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:68)
        at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInteceptor.invoke(DataTransformationInteceptor.java:68)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:231)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:92)
        ... 38 more

Running org.apache.tuscany.sca.binding.axis2.Axis2ReferenceTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
Running org.apache.tuscany.sca.binding.axis2.Java2WSDLHelperTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.049 sec
Running org.apache.tuscany.sca.binding.axis2.itests.endpoints.WSDLExplicitURITestCase
Added Servlet mapping: http://localhost:8085/myExplicitURI
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.241 sec

Results :

Tests in error: 
  testCalculator(org.apache.tuscany.sca.binding.axis2.itests.HelloWorldTestCase)
  testHelloWorld(org.apache.tuscany.sca.binding.axis2.itests.HelloWorldNoWSDLTestCase)
  testEchoFoo(org.apache.tuscany.sca.binding.axis2.itests.HelloWorldNoWSDLTestCase)

Tests run: 15, Failures: 0, Errors: 3, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
 

> ServiceBindingProvider getBindingInterfaceContract is unnecessary
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-1266
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1266
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-0.90
>            Reporter: ant elder
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> I think ServiceBindingProvider getBindingInterfaceContract is unnecessary and could be removed.
> It was originally so that binding extensions had the opotunity to fiddle with the InterfaceContract, specifically for the databinding, but with the current SPIs this can be done elsewhere. For example the Axis2 binding could do this in the Axis2ServiceBindingProvider constructor.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org