You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ga...@apache.org on 2007/06/10 03:54:47 UTC
svn commit: r545829 - in /webservices/axis2/trunk/java/modules:
jaxws/src/org/apache/axis2/jaxws/server/
metadata/src/org/apache/axis2/jaxws/description/
metadata/src/org/apache/axis2/jaxws/description/impl/
Author: gawor
Date: Sat Jun 9 18:54:46 2007
New Revision: 545829
URL: http://svn.apache.org/viewvc?view=rev&rev=545829
Log:
override HandlerChain annotation (AXIS2-2787)
Modified:
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java?view=diff&rev=545829&r1=545828&r2=545829
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java Sat Jun 9 18:54:46 2007
@@ -109,7 +109,9 @@
* Since we're on the server, and there apparently is no Binding object
* anywhere to be found...
*/
- ic.setHandlers(new HandlerResolverImpl(endpointDesc).getHandlerChain(endpointDesc.getPortInfo()));
+ if (ic.getHandlers() == null) {
+ ic.setHandlers(new HandlerResolverImpl(endpointDesc).getHandlerChain(endpointDesc.getPortInfo()));
+ }
if (!bindingTypesMatch(requestMsgCtx, endpointDesc.getServiceDescription())) {
Protocol protocol = requestMsgCtx.getMessage().getProtocol();
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java?view=diff&rev=545829&r1=545828&r2=545829
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java Sat Jun 9 18:54:46 2007
@@ -97,6 +97,8 @@
*/
public abstract String getBindingType();
+ public abstract void setHandlerChain(HandlerChainsType handlerChain);
+
public abstract HandlerChainsType getHandlerChain();
/**
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?view=diff&rev=545829&r1=545828&r2=545829
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java Sat Jun 9 18:54:46 2007
@@ -23,10 +23,14 @@
import static org.apache.axis2.jaxws.description.builder.MDQConstants.CONSTRUCTOR_METHOD;
import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
import org.apache.axis2.jaxws.description.builder.WebMethodAnnot;
+import org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType;
import org.apache.axis2.jaxws.i18n.Messages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
import javax.xml.namespace.QName;
import javax.xml.ws.Response;
import java.io.IOException;
@@ -42,7 +46,7 @@
import java.util.concurrent.Future;
/** Utilities used throughout the Description package. */
-class DescriptionUtils {
+public class DescriptionUtils {
private static final Log log = LogFactory.getLog(DescriptionUtils.class);
static boolean isEmpty(String string) {
@@ -337,5 +341,24 @@
} else {
return false;
}
+ }
+
+ public static HandlerChainsType loadHandlerChains(InputStream is) {
+ try {
+ // All the classes we need should be part of this package
+ JAXBContext jc = JAXBContext
+ .newInstance("org.apache.axis2.jaxws.description.xml.handler",
+ EndpointDescriptionImpl.class.getClassLoader());
+
+ Unmarshaller u = jc.createUnmarshaller();
+
+ JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
+ return (HandlerChainsType)o.getValue();
+
+ } catch (Exception e) {
+ throw ExceptionFactory
+ .makeWebServiceException(
+ "EndpointDescriptionImpl: loadHandlerList: thrown when attempting to unmarshall JAXB content");
+ }
}
}
Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?view=diff&rev=545829&r1=545828&r2=545829
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java Sat Jun 9 18:54:46 2007
@@ -1229,6 +1229,10 @@
// ANNOTATION: HandlerChain
// ===========================================
+ public void setHandlerChain(HandlerChainsType handlerChain) {
+ handlerChainsType = handlerChain;
+ }
+
/**
* Returns a schema derived java class containing the the handler configuration filel
*
@@ -1263,28 +1267,13 @@
if(is == null) {
log.warn("Unable to load handlers from file: " + handlerFileName);
} else {
- try {
- // All the classes we need should be part of this package
- JAXBContext jc = JAXBContext
- .newInstance("org.apache.axis2.jaxws.description.xml.handler",
- this.getClass().getClassLoader());
-
- Unmarshaller u = jc.createUnmarshaller();
-
- JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
- handlerChainsType = (HandlerChainsType)o.getValue();
-
- } catch (Exception e) {
- throw ExceptionFactory
- .makeWebServiceException(
- "EndpointDescriptionImpl: getHandlerList: thrown when attempting to unmarshall JAXB content");
- }
+ handlerChainsType = DescriptionUtils.loadHandlerChains(is);
}
}
}
return handlerChainsType;
}
-
+
public HandlerChain getAnnoHandlerChainAnnotation() {
if (this.handlerChainAnnotation == null) {
if (getServiceDescriptionImpl().isDBCMap()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org