Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2398

Problem with using interface.java on reference when using interface.wsdl in service with a doc/lit/bare wsdl

    XMLWordPrintableJSON

Details

    Description

      I have a component that uses an interface.wsdl element with a doc/lit/bare wsdl in the service tag. When I use interface.wsdl in the reference element of a client component that invokes the service over binding.ws, it works fine. Here is the composite that works:
      <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://itest" name="mywsdltest">

      <component name="AComponent">
      <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.AServiceImpl"/>
      <service name="AService">
      <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org#wsdl.interface(AServicePortType)"/>
      <binding.ws uri="http://localhost:8085/AService/endpointref"/>
      </service>
      </component>
      <component name="AClientComponent">
      <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.AClientServiceImpl"/>
      <reference name="aService">
      <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org#wsdl.interface(AServicePortType)"/>
      <binding.ws uri="http://localhost:8085/AService/endpointref"/>
      </reference>
      </component>
      </composite>

      When I change the interface.wsdl under reference to interface.java, I am getting a TransformationException with the following trace.

      org.apache.tuscany.sca.databinding.TransformationException: java.lang.NullPointerException
      at org.apache.tuscany.sca.core.databinding.transformers.Output2OutputTransformer.transform(Output2OutputTransformer.java:250)
      at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:81)
      at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.transform(DataTransformationInterceptor.java:186)
      at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.invoke(DataTransformationInterceptor.java:169)
      at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
      at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
      at $Proxy20.getGreetings(Unknown Source)
      at org.apache.tuscany.sca.itest.databindings.jaxb.impl.AClientServiceImpl.getGreetingsForward(AClientServiceImpl.java:36)
      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:132)
      at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:112)
      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:112)
      at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
      at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
      at $Proxy19.getGreetingsForward(Unknown Source)
      at org.apache.tuscany.sca.itest.databindings.jaxb.MyTestCase.testWS(MyTestCase.java:61)
      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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
      at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
      at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
      at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
      at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
      at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:75)
      at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
      at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
      at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
      at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: java.lang.NullPointerException
      at org.apache.tuscany.sca.databinding.jaxb.axiom.OMElement2JAXB$1.run(OMElement2JAXB.java:59)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.tuscany.sca.databinding.jaxb.axiom.OMElement2JAXB.transform(OMElement2JAXB.java:52)
      at org.apache.tuscany.sca.databinding.jaxb.axiom.OMElement2JAXB.transform(OMElement2JAXB.java:42)
      at org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint$LazyPullTransformer.transform(DefaultTransformerExtensionPoint.java:199)
      at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:81)
      at org.apache.tuscany.sca.core.databinding.transformers.Output2OutputTransformer.transform(Output2OutputTransformer.java:243)
      ... 39 more

      At this step, I added @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) annotation to the service java interface source and then ended up with a ServiceRuntimeException with the following trace.
      org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.RuntimeException: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: Element cannot be resolved:

      {http://jaxb.databindings.itest.sca.tuscany.apache.org/}

      arg0
      at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:276)
      at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:70)
      at org.apache.tuscany.sca.itest.databindings.jaxb.MyTestCase.setUp(MyTestCase.java:43)
      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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
      at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
      at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
      at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.RuntimeException: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: Element cannot be resolved:

      {http://jaxb.databindings.itest.sca.tuscany.apache.org/}

      arg0
      at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:252)
      at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:120)
      at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:243)
      ... 16 more
      Caused by: org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.RuntimeException: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: Element cannot be resolved:

      {http://jaxb.databindings.itest.sca.tuscany.apache.org/}

      arg0
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:986)
      at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:250)
      ... 18 more
      Caused by: java.lang.RuntimeException: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: Element cannot be resolved:

      {http://jaxb.databindings.itest.sca.tuscany.apache.org/}

      arg0
      at org.apache.tuscany.sca.interfacedef.wsdl.java2wsdl.Java2WSDLHelper.createWSDLInterfaceContract(Java2WSDLHelper.java:279)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ReferenceBindingProvider.<init>(Axis2ReferenceBindingProvider.java:68)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:70)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:1)
      at org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createReferenceBindingProvider(DefaultProviderFactoryExtensionPoint.java:220)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.addReferenceBindingProvider(CompositeActivatorImpl.java:264)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:146)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:982)
      ... 19 more
      Caused by: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: Element cannot be resolved:

      {http://jaxb.databindings.itest.sca.tuscany.apache.org/}

      arg0
      at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl$WSDLPart.<init>(WSDLOperationIntrospectorImpl.java:277)
      at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getMessageType(WSDLOperationIntrospectorImpl.java:199)
      at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getInputType(WSDLOperationIntrospectorImpl.java:138)
      at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getOperation(WSDLOperationIntrospectorImpl.java:220)
      at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceIntrospectorImpl.getOperation(WSDLInterfaceIntrospectorImpl.java:84)
      at org.apache.tuscany.sca.interfacedef.wsdl.java2wsdl.Java2WSDLHelper.createWSDLInterfaceContract(Java2WSDLHelper.java:251)
      ... 26 more

      Attachments

        1. TUSCANY-2398-recreate.patch
          19 kB
          Vamsavardhana Reddy

        Issue Links

          Activity

            People

              rfeng Zhaohui Feng
              vamsic Vamsavardhana Reddy
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: