Author: alessio.soldano(a)jboss.com
Date: 2011-07-05 07:04:09 -0400 (Tue, 05 Jul 2011)
New Revision: 14659
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10/
stack/native/branches/jbossws-native-3.1.2.SP10/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
Log:
[JBPAPP-6795] Fixing TCK5 regression
Property changes on: stack/native/branches/jbossws-native-3.1.2.SP10
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/native/branches/jbossws-native-3.1.2:14327
+ /stack/native/branches/jbossws-native-3.1.2:14327,14657
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2.SP10/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2011-07-05
10:47:04 UTC (rev 14658)
+++
stack/native/branches/jbossws-native-3.1.2.SP10/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2011-07-05
11:04:09 UTC (rev 14659)
@@ -27,6 +27,7 @@
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
+import javax.xml.ws.BindingType;
import javax.xml.ws.Endpoint;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.Service;
@@ -75,7 +76,8 @@
@Override
public Endpoint createEndpoint(String bindingId, Object implementor)
{
- EndpointImpl endpoint = new EndpointImpl(bindingId, implementor);
+ final String nonNullBindingId = this.getBindingId(bindingId,
implementor.getClass());
+ EndpointImpl endpoint = new EndpointImpl(nonNullBindingId, implementor);
return endpoint;
}
@@ -163,4 +165,17 @@
throw new WebServiceException(e);
}
}
+
+ private String getBindingId(final String bindingId, final Class<?>
implementorClass)
+ {
+ if (bindingId != null)
+ {
+ return bindingId;
+ }
+ else
+ {
+ final BindingType bindingType =
implementorClass.getAnnotation(BindingType.class);
+ return (bindingType != null) ? bindingType.value() :
SOAPBinding.SOAP11HTTP_BINDING;
+ }
+ }
}