Incorrent port name in wsdlElement leads to NPE
-----------------------------------------------
Key: TUSCANY-2242
URL: https://issues.apache.org/jira/browse/TUSCANY-2242
Project: Tuscany
Issue Type: Bug
Components: Java SCA Axis Binding Extension
Affects Versions: Java-SCA-1.1
Environment: WinXP SP2, IBM JDK 1.5
Reporter: Simon Laws
Priority: Minor
Fix For: Java-SCA-Next
Can be reproduced by changing the SCDL in sample/helloworld-ws-reference to the
following
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://helloworld"
xmlns:hw="http://helloworld"
name="helloworldwsclient">
<!-- A component with an embedded reference definition connecting to an
external webservice
The wsdl interface for the reference is derived from the information
specified by the 'wsdlElement'
-->
<component name="HelloTuscanyServiceComponent">
<implementation.java class="helloworld.HelloWorldServiceComponent"/>
<reference name="helloWorldService">
<binding.ws
wsdlElement="http://helloworld#wsdl.port(HelloWorldService/NonExistentPort)"/>
</reference>
</component>
<!-- A component with a reference promoted as a composite reference -->
<component name="HelloWorldServiceComponent">
<implementation.java class="helloworld.HelloWorldServiceComponent"/>
</component>
<reference name="HelloWorldService"
promote="HelloWorldServiceComponent/helloWorldService">
<interface.java interface="helloworld.HelloWorldService" />
<binding.ws
wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
</reference>
</composite>
Notice the "NonExistentPort" port name. Running the nit test for ht sample
leads to
Caused by: java.lang.NullPointerException
at
org.apache.tuscany.sca.binding.ws.xml.WebServiceBindingProcessor.resolve(WebServiceBindingProcessor.java:292)
at
org.apache.tuscany.sca.binding.ws.xml.WebServiceBindingProcessor.resolve(WebServiceBindingProcessor.java:1)
at
org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:252)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:109)
at
org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveContracts(BaseAssemblyProcessor.java:362)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:845)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:1)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:109)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:139)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:1)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve(ExtensibleURLArtifactProcessor.java:86)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase(ContributionServiceImpl.java:485)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:369)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:165)
at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.addContribution(DefaultSCADomain.java:291)
at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:171)
at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:113)
at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:243)
... 22 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]