Author: nagy
Date: Mon Mar 29 14:55:09 2010
New Revision: 928797
URL: http://svn.apache.org/viewvc?rev=928797&view=rev
Log:
Added method signatures to support JAX-WS 2.2 changes.
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java?rev=928797&r1=928796&r2=928797&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
(original)
+++
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
Mon Mar 29 14:55:09 2010
@@ -46,8 +46,12 @@ public class Provider extends javax.xml.
private static final Element[] ZERO_LENGTH_ARRAY = new Element[0];
- @Override
+ @Override
public Endpoint createAndPublishEndpoint(String s, Object obj) {
+ return createAndPublishEndpoint(s, obj, (WebServiceFeature[]) null);
+ }
+
+ public Endpoint createAndPublishEndpoint(String s, Object obj,
WebServiceFeature... features) {
Endpoint ep = new EndpointImpl(obj);
ep.publish(s);
return ep;
@@ -55,12 +59,27 @@ public class Provider extends javax.xml.
@Override
public Endpoint createEndpoint(String binding, Object obj) {
+ return createEndpoint(binding, obj, (WebServiceFeature[])null);
+ }
+
+ //TODO: Fix the Endpoint to support WebServiceFeatures (for non-JEE users)
+ public Endpoint createEndpoint(String binding, Object obj,
WebServiceFeature... features) {
return new EndpointImpl(obj);
}
+ //TODO: Fix the Endpoint to support WebServiceFeatures (for non-JEE users)
+// @Override
+// public Endpoint createEndpoint(String binding, Class clazz, Invoker
invoker, WebServiceFeature... features) {
+//
+// }
+
@Override
public ServiceDelegate createServiceDelegate(URL url, QName qname, Class
clazz) {
- return new org.apache.axis2.jaxws.spi.ServiceDelegate(url, qname,
clazz);
+ return createServiceDelegate(url, qname, clazz,
(WebServiceFeature[])null);
+ }
+
+ public ServiceDelegate createServiceDelegate(URL url, QName qname, Class
clazz, WebServiceFeature... features) {
+ return new org.apache.axis2.jaxws.spi.ServiceDelegate(url, qname,
clazz, features);
}
@Override
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=928797&r1=928796&r2=928797&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
Mon Mar 29 14:55:09 2010
@@ -85,6 +85,8 @@ 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
@@ -195,9 +197,10 @@ public class ServiceDelegate extends jav
sparsePortCompositeThreadLocal.set(null);
}
- public ServiceDelegate(URL url, QName qname, Class clazz) throws
WebServiceException {
+ public ServiceDelegate(URL url, QName qname, Class clazz,
WebServiceFeature... features) throws WebServiceException {
super();
this.serviceQname = qname;
+ this.features = features;
if (!isValidServiceName()) {
throw ExceptionFactory
@@ -228,7 +231,7 @@ public class ServiceDelegate extends jav
ApplicationContextMigratorUtil.addApplicationContextMigrator(context,
Constants.APPLICATION_CONTEXT_MIGRATOR_LIST_ID, new
PropertyMigrator());
}
-
+
//================================================
// JAX-WS API methods
//================================================
@@ -263,7 +266,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[])
null);
+ return createDispatch(portName, type, mode, (WebServiceFeature[])
features);
}
/*
@@ -271,7 +274,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[])
null);
+ return createDispatch(portName, context, mode, (WebServiceFeature[])
features);
}
@Override
@@ -497,7 +500,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[]) null);
+ return getPort((QName) null, sei, (WebServiceFeature[]) features);
}
/*
@@ -505,12 +508,12 @@ 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[]) null);
+ return getPort(portName, sei, (WebServiceFeature[]) features);
}
@Override
public <T> T getPort(Class<T> sei, WebServiceFeature... features) {
- return getPort((QName) null, sei, features);
+ return getPort((QName) null, sei, features);
}
@Override
@@ -549,7 +552,7 @@ public class ServiceDelegate extends jav
makeWebServiceException(Messages.getMessage("invalidEndpointReference",
e.toString()));
}
-
+
return getPort(axis2EPR, addressingNamespace, sei, features);
}
@@ -612,7 +615,7 @@ public class ServiceDelegate extends jav
throw
ExceptionFactory.makeWebServiceException(Messages.getMessage("portErr1"), e2);
}
}
-
+
JAXWSProxyHandler proxyHandler = new JAXWSProxyHandler(this,
interfaces[0], endpointDesc, features);
Object proxyClass = Proxy.newProxyInstance(classLoader, interfaces,
proxyHandler);
return sei.cast(proxyClass);