On Tue, Oct 19, 2010 at 4:27 PM, Brent Daniel <[email protected]> wrote:
> Simon,
>
> It seems to be working for me locally. Is there a stack trace?
>
> Brent
>
> On Tue, Oct 19, 2010 at 7:33 AM, Simon Laws <[email protected]> wrote:
>> On Tue, Oct 19, 2010 at 3:28 PM, Simon Laws <[email protected]>
>> wrote:
>>> On Mon, Oct 18, 2010 at 8:04 PM, <[email protected]> wrote:
>>>> Author: bdaniel
>>>> Date: Mon Oct 18 19:04:02 2010
>>>> New Revision: 1023951
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1023951&view=rev
>>>> Log:
>>>> TUSCANY-3711 Enable correct wsdl service name mapping and fix issue in
>>>> JAXWSServiceBindingProvider that was causing ?wsdl to fail
>>>>
>>>> Modified:
>>>>
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java
>>>>
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java
>>>>
>>>> Modified:
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java
>>>> URL:
>>>> http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java?rev=1023951&r1=1023950&r2=1023951&view=diff
>>>> ==============================================================================
>>>> ---
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java
>>>> (original)
>>>> +++
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java
>>>> Mon Oct 18 19:04:02 2010
>>>> @@ -113,16 +113,19 @@ public class JAXWSServiceBindingProvider
>>>> properties.put(Endpoint.WSDL_PORT, portName);
>>>>
>>>> QName serviceName = new QName(targetNamespace,
>>>> -
>>>> wsBinding.getService().getQName().getLocalPart());
>>>> +
>>>> wsBinding.getServiceName().getLocalPart());
>>>> properties.put(Endpoint.WSDL_SERVICE, serviceName);
>>>> -
>>>> +
>>>> wsEndpoint.setMetadata(metadata);
>>>> wsEndpoint.setProperties(properties);
>>>>
>>>> // Start up the endpoint
>>>> +
>>>> wsEndpoint.publish(wsBinding.getURI());
>>>> -
>>>> +
>>>> +
>>>> jaxwsBindingProvider.start();
>>>> +
>>>> }
>>>>
>>>> public void stop() {
>>>>
>>>> Modified:
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java
>>>> URL:
>>>> http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java?rev=1023951&r1=1023950&r2=1023951&view=diff
>>>> ==============================================================================
>>>> ---
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java
>>>> (original)
>>>> +++
>>>> tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java
>>>> Mon Oct 18 19:04:02 2010
>>>> @@ -273,15 +273,13 @@ public class WSDLDefinitionGenerator {
>>>> }
>>>>
>>>> protected void configureService(Definition definition, Service
>>>> service, PortType portType, String serviceName) throws WSDLException {
>>>> - // TODO -- this is the recommended mapping in the ws binding spec,
>>>> but for some reason it is causing ?wsdl to not be available
>>>> - // in binding-ws-runtime-jaxws-ri
>>>> WSDLPortTestCase.testQuestionMarkWSDL().
>>>> -// if ( serviceName != null ) {
>>>> -// QName name = new QName(definition.getTargetNamespace(),
>>>> serviceName);
>>>> -// if ( definition.getService(name) == null ) {
>>>> -// service.setQName(name);
>>>> -// return;
>>>> -// }
>>>> -// }
>>>> + if ( serviceName != null ) {
>>>> + QName name = new QName(definition.getTargetNamespace(),
>>>> serviceName);
>>>> + if ( definition.getService(name) == null ) {
>>>> + service.setQName(name);
>>>> + return;
>>>> + }
>>>> + }
>>>>
>>>> QName portTypeName = portType.getQName();
>>>> if (portTypeName != null) {
>>>>
>>>>
>>>>
>>>
>>> Hi Brent
>>>
>>> I'm seeing an NPE in testing/itest/ws-jaxws/launcher-ri which I think
>>> is related to this. It fails in the provider when trying to get the
>>> service name from the binding. The binding is marked as unresolved and
>>> the service name is null however. Rather strangely in this test two
>>> services are being created for the component. One called HelloWorld
>>> and the other called HelloWorldImpl. This seems to be an unrelated mix
>>> up in the annotation processing but may be the underlying cause.
>>>
>>> Regards
>>>
>>> Simon
>>>
>>> --
>>> Apache Tuscany committer: tuscany.apache.org
>>> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>>>
>>
>> I raised TUSCANY-3732 to track
>>
>> Simon
>>
>> --
>> Apache Tuscany committer: tuscany.apache.org
>> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>>
>
Hi Brent
testGetGreetings(org.apache.tuscany.sca.binding.ws.jaxws.launcher.JavaFirstTestCase)
Time elapsed: 2.219 sec <<< ERROR!
java.lang.IllegalStateException: java.lang.NullPointerException
at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:173)
at
org.apache.tuscany.sca.binding.ws.jaxws.launcher.JavaFirstTestCase.setUp(JavaFirstTestCase.java:48)
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:597)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: java.lang.NullPointerException
at
org.apache.tuscany.sca.binding.ws.jaxws.ri.JAXWSServiceBindingProvider.start(JAXWSServiceBindingProvider.java:115)
at
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$1.run(CompositeActivatorImpl.java:454)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoint(CompositeActivatorImpl.java:452)
at
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:408)
at
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:340)
at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:147)
... 28 more
Am checking if I have anything local that would cause this (but I
believe I saw this on my clean Linux build also)
Regards
Simon
--
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com