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

Reply via email to