Author: alessio.soldano(a)jboss.com
Date: 2011-07-05 06:44:40 -0400 (Tue, 05 Jul 2011)
New Revision: 14657
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
Log:
[JBPAPP-6795] Fixing TCK5 regression
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2011-07-05
08:43:37 UTC (rev 14656)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2011-07-05
10:44:40 UTC (rev 14657)
@@ -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;
+ }
+ }
}
Show replies by date