Author: nagy
Date: Fri Apr 16 17:29:04 2010
New Revision: 935004
URL: http://svn.apache.org/viewvc?rev=935004&view=rev
Log:
Fix to bring use of features during service creation in line with spec so as to
prevent potential portability issues.
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java?rev=935004&r1=935003&r2=935004&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
(original)
+++
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
Fri Apr 16 17:29:04 2010
@@ -85,8 +85,6 @@ public class ServiceDelegate extends jav
private HandlerResolver handlerResolver = null;
- private WebServiceFeature[] features = null;
-
/**
* NON-STANDARD SPI! Set any metadata to be used on the creation of the
NEXT Service by this thread.
* NOTE that this uses ThreadLocal to store the metadata, and that
ThreadLocal is cleared after it is
@@ -200,12 +198,17 @@ public class ServiceDelegate extends jav
public ServiceDelegate(URL url, QName qname, Class clazz,
WebServiceFeature... features) throws WebServiceException {
super();
this.serviceQname = qname;
- this.features = features;
if (!isValidServiceName()) {
throw ExceptionFactory
.makeWebServiceException(Messages.getMessage("serviceDelegateConstruct0", ""));
}
+
+ if ((features != null) && (features.length != 0)) {
+ throw ExceptionFactory
+
.makeWebServiceException(Messages.getMessage("serviceDelegateConstruct2",
serviceQname.toString()));
+ }
+
// Get any metadata that is to be used to build up this service, then
reset it so it isn't used
// to create any other services.
DescriptionBuilderComposite sparseComposite = getServiceMetadata();
@@ -266,7 +269,7 @@ public class ServiceDelegate extends jav
*/
public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode
mode)
throws WebServiceException {
- return createDispatch(portName, type, mode, (WebServiceFeature[])
features);
+ return createDispatch(portName, type, mode, (WebServiceFeature[])
null);
}
/*
@@ -274,7 +277,7 @@ public class ServiceDelegate extends jav
* @see
javax.xml.ws.spi.ServiceDelegate#createDispatch(javax.xml.namespace.QName,
javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode)
*/
public Dispatch<java.lang.Object> createDispatch(QName portName,
JAXBContext context, Mode mode) {
- return createDispatch(portName, context, mode, (WebServiceFeature[])
features);
+ return createDispatch(portName, context, mode, (WebServiceFeature[])
null);
}
@Override
@@ -500,7 +503,7 @@ public class ServiceDelegate extends jav
* @see javax.xml.ws.spi.ServiceDelegate#getPort(java.lang.Class)
*/
public <T> T getPort(Class<T> sei) throws WebServiceException {
- return getPort((QName) null, sei, (WebServiceFeature[]) features);
+ return getPort((QName) null, sei, (WebServiceFeature[]) null);
}
/*
@@ -508,7 +511,7 @@ public class ServiceDelegate extends jav
* @see javax.xml.ws.spi.ServiceDelegate#getPort(javax.xml.namespace.QName,
java.lang.Class)
*/
public <T> T getPort(QName portName, Class<T> sei) throws
WebServiceException {
- return getPort(portName, sei, (WebServiceFeature[]) features);
+ return getPort(portName, sei, (WebServiceFeature[]) null);
}
@Override
Modified:
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=935004&r1=935003&r2=935004&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
(original)
+++
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
Fri Apr 16 17:29:04 2010
@@ -349,4 +349,6 @@ missingInvocationController=An invocatio
unknownClassType=Unknown class type {0}
axisEndpointReferenceFactoryErr=Cannot create an endpoint reference because
the service name is null, and the port name is set to {0}
axisEndpointReferenceFactoryErr2=Cannot create an endpoint reference because
the address, service name, and/or port name are null.
-dispatchInvalidTypeWithMode=Unsupported Dispatch Type: Dispatch type
javax.xml.soap.SOAPMessage cannot be used with messages in Payload mode.
\ No newline at end of file
+dispatchInvalidTypeWithMode=Unsupported Dispatch Type: Dispatch type
javax.xml.soap.SOAPMessage cannot be used with messages in Payload mode.
+serviceDelegateConstruct2=An attempt was made to construct the ServiceDelegate
object with the {0} service and with WebServicesFeatures, but there are no
standard features defined for service creation in the current specification.
+