Author: jim.ma
Date: 2010-03-05 01:09:00 -0500 (Fri, 05 Mar 2010)
New Revision: 11718
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
Log:
[JBWS-2949]:ignore the handlerchain which contains illegal namespace prefix
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java 2010-03-04
21:01:55 UTC (rev 11717)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java 2010-03-05
06:09:00 UTC (rev 11718)
@@ -74,7 +74,7 @@
public void addChild(UnifiedHandlerChainsMetaData handlerConfig,
UnifiedHandlerChainMetaData handlerChain, UnmarshallingContext navigator, String
namespaceURI,
String localName)
{
- handlerConfig.addHandlerChain(handlerChain);
+ if (!handlerChain.isExcluded()) handlerConfig.addHandlerChain(handlerChain);
}
/**
@@ -120,13 +120,21 @@
{
if (log.isTraceEnabled())
log.trace("UnifiedHandlerChainMetaData setValue: nuri=" + namespaceURI
+ " localName=" + localName + " value=" + value);
-
- if (localName.equals("protocol-bindings"))
- handlerChain.setProtocolBindings(value);
- else if (localName.equals("service-name-pattern"))
- handlerChain.setServiceNamePattern(navigator.resolveQName(value));
- else if (localName.equals("port-name-pattern"))
- handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ try
+ {
+ if (localName.equals("protocol-bindings"))
+ handlerChain.setProtocolBindings(value);
+ else if (localName.equals("service-name-pattern"))
+ handlerChain.setServiceNamePattern(navigator.resolveQName(value));
+ else if (localName.equals("port-name-pattern"))
+ handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ }
+ catch (java.lang.IllegalStateException ex)
+ {
+ log.warn("Could not get " + localName + " value : "
+ + ex.getMessage() + ", this handler chain will be ingored");
+ handlerChain.setExcluded(true);
+ }
}
/**
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2010-03-04
21:01:55 UTC (rev 11717)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2010-03-05
06:09:00 UTC (rev 11718)
@@ -42,6 +42,7 @@
private String protocolBindings;
private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
private PortInfo portInfo;
+ private boolean excluded;
public UnifiedHandlerChainMetaData(UnifiedHandlerChainsMetaData handlerChains)
{
@@ -91,4 +92,12 @@
{
handlers.add(handler);
}
+
+ public boolean isExcluded() {
+ return this.excluded;
+ }
+
+ public void setExcluded(boolean excluded) {
+ this.excluded = excluded;
+ }
}
Show replies by date