Author: alessio.soldano(a)jboss.com
Date: 2010-05-28 12:24:44 -0400 (Fri, 28 May 2010)
New Revision: 12389
Added:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
Log:
[JBWS-3042] all generated proxies and dispatches have to be feature aware - endpoint
metadata model is shared for service, thus we need to create new adapter that will take
care of it for every proxy and dispatch instance
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -267,6 +267,7 @@
// Associate a message context with the current thread
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ msgContext.setEndpointMetaData(getEndpointMetaData());
msgContext.setOperationMetaData(opMetaData);
Map<String, Object> requestCtx = getRequestContext();
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -42,6 +42,7 @@
import org.jboss.ws.feature.JsonEncodingFeature;
import org.jboss.ws.feature.SchemaValidationFeature;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.FeatureSet;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.wsdl.Extendable;
@@ -86,7 +87,10 @@
processMTOMFeature(feature, epMetaData, stub);
processRespectBindingFeature(feature, epMetaData, stub);
processChunkedEncodingFeature(feature, epMetaData, stub);
- epMetaData.addFeature(feature);
+
+ // overriding feature for this stub
+ FeatureAwareEndpointMetaData featureOverridableMetaData =
(FeatureAwareEndpointMetaData)stub;
+ featureOverridableMetaData.setFeature(feature);
}
/**
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -36,6 +36,7 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
@@ -77,6 +78,8 @@
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
+import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -86,12 +89,12 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Jul-2006
*/
-public class ClientImpl extends CommonClient implements
org.jboss.ws.extensions.wsrm.api.RMProvider, BindingProvider
+public class ClientImpl extends CommonClient implements
org.jboss.ws.extensions.wsrm.api.RMProvider, BindingProvider,
FeatureAwareEndpointMetaData
{
private static Logger log = Logger.getLogger(ClientImpl.class);
// the associated endpoint meta data
- private final ClientEndpointMetaData epMetaData;
+ private final FeatureAwareClientEndpointMetaDataAdapter epMetaData;
private EndpointConfigMetaData epConfigMetaData;
// Keep a handle on the resolver so that updateConfig calls may revisit the associated
chains
@@ -118,7 +121,7 @@
super(epMetaData);
setTargetEndpointAddress(epMetaData.getEndpointAddress());
- this.epMetaData = (ClientEndpointMetaData)epMetaData;
+ this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
this.epConfigMetaData = epMetaData.getEndpointConfigMetaData();
if (handlerResolver instanceof HandlerResolverImpl)
@@ -590,4 +593,21 @@
this.wsrmSequence = null;
}
}
+
+ //////////////////////////////////////////
+ // FeatureAwareEndpointMetaData support //
+ //////////////////////////////////////////
+
+ @Override
+ public <T extends WebServiceFeature> T getFeature(Class<T> key)
+ {
+ return this.epMetaData.getFeature(key);
+ }
+
+ @Override
+ public void setFeature(WebServiceFeature feature)
+ {
+ this.epMetaData.setFeature(feature);
+ }
+
}
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -49,6 +49,7 @@
import org.jboss.ws.core.StubExt;
import org.jboss.ws.extensions.wsrm.api.RMProvider;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.common.JavaUtils;
@@ -92,6 +93,7 @@
this.stubMethods = new
ArrayList(Arrays.asList(BindingProvider.class.getMethods()));
this.stubMethods.addAll(Arrays.asList(StubExt.class.getMethods()));
this.stubMethods.addAll(Arrays.asList(RMProvider.class.getMethods()));
+
this.stubMethods.addAll(Arrays.asList(FeatureAwareEndpointMetaData.class.getMethods()));
this.objectMethods = Arrays.asList(Object.class.getMethods());
}
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -44,6 +44,7 @@
import javax.xml.ws.EndpointReference;
import javax.xml.ws.Response;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service.Mode;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
@@ -75,6 +76,8 @@
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
+import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
@@ -90,14 +93,14 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2006
*/
-public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider,
EndpointMetadataProvider
+public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider,
EndpointMetadataProvider, FeatureAwareEndpointMetaData
{
// provide logging
private final Logger log = Logger.getLogger(DispatchImpl.class);
private BindingProvider bindingProvider;
private HandlerResolverImpl handlerResolver;
- private ClientEndpointMetaData epMetaData;
+ private FeatureAwareClientEndpointMetaDataAdapter epMetaData;
private JAXBContext jaxbContext;
private ExecutorService executor;
private String securityConfig;
@@ -109,7 +112,7 @@
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData,
Class<T> type, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = (ClientEndpointMetaData)epMetaData;
+ this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
this.executor = executor;
this.type = type;
this.mode = mode;
@@ -119,7 +122,7 @@
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData, JAXBContext
jbc, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = (ClientEndpointMetaData)epMetaData;
+ this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
this.executor = executor;
this.type = Object.class;
this.jaxbContext = jbc;
@@ -658,4 +661,21 @@
{
return epMetaData;
}
+
+ //////////////////////////////////////////
+ // FeatureAwareEndpointMetaData support //
+ //////////////////////////////////////////
+
+ @Override
+ public <T extends WebServiceFeature> T getFeature(Class<T> key)
+ {
+ return this.epMetaData.getFeature(key);
+ }
+
+ @Override
+ public void setFeature(WebServiceFeature feature)
+ {
+ this.epMetaData.setFeature(feature);
+ }
+
}
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -69,6 +69,8 @@
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
+import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -277,8 +279,9 @@
{
ExecutorService executor = (ExecutorService)getExecutor();
EndpointMetaData epMetaData = getEndpointMetaData(portName);
- DispatchImpl dispatch = new DispatchImpl(executor, epMetaData, type, mode);
- return dispatch;
+ FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new
FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
+
+ return new DispatchImpl(executor, clientMetaDataAdapter, type, mode);
}
@Override
@@ -286,8 +289,9 @@
{
ExecutorService executor = (ExecutorService)getExecutor();
EndpointMetaData epMetaData = getEndpointMetaData(portName);
- DispatchImpl dispatch = new DispatchImpl(executor, epMetaData, jbc, mode);
- return dispatch;
+ FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new
FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
+
+ return new DispatchImpl(executor, clientMetaDataAdapter, jbc, mode);
}
private EndpointMetaData getEndpointMetaData(QName portName)
@@ -363,13 +367,14 @@
try
{
ExecutorService executor = (ExecutorService)getExecutor();
- ClientProxy handler = new ClientProxy(executor, new ClientImpl(epMetaData,
handlerResolver));
+ FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new
FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
+ ClientProxy handler = new ClientProxy(executor, new
ClientImpl(clientMetaDataAdapter, handlerResolver));
ClassLoader cl = epMetaData.getClassLoader();
T proxy;
try
{
- proxy = (T)Proxy.newProxyInstance(cl, new Class[] { seiClass,
RMProvider.class, BindingProvider.class, StubExt.class }, handler);
+ proxy = (T)Proxy.newProxyInstance(cl, new Class[] { seiClass,
RMProvider.class, BindingProvider.class, StubExt.class, FeatureAwareEndpointMetaData.class
}, handler);
}
catch (RuntimeException rte)
{
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -68,7 +68,7 @@
if (addressingFeature == null)
{
final boolean enabled = true;
- final boolean required = !assertion.isOptional();
+ final boolean required = isRequired(assertion);
final Responses responses = getResponses(assertion);
endpointMD.addFeature(new AddressingFeature(enabled, required, responses));
@@ -76,6 +76,16 @@
}
}
+ private static boolean isRequired(final PrimitiveAssertion assertion)
+ {
+ Object optionalValue = assertion.getAttribute(new
javax.xml.namespace.QName("http://www.w3.org/ns/ws-policy",
"Optional"));
+
+ if (optionalValue == null)
+ return true;
+
+ return !Boolean.parseBoolean(optionalValue.toString());
+ }
+
@SuppressWarnings("unchecked")
private static Responses getResponses(final PrimitiveAssertion assertion)
{
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -38,6 +38,10 @@
{
// The endpoint address
private String endpointAddress;
+
+ ClientEndpointMetaData()
+ {
+ }
public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName
portTypeName, Type type)
{
Modified:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2010-05-28
15:56:41 UTC (rev 12388)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -158,6 +158,10 @@
private JAXBContextCache jaxbCache = new JAXBContextCache();
private List<BindingCustomization> bindingCustomization = new
ArrayList<BindingCustomization>();
+
+ EndpointMetaData()
+ {
+ }
public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName,
Type type)
{
Copied:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
(from rev 12384,
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java)
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
(rev 0)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -0,0 +1,507 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.umdm;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.Service.Mode;
+import javax.xml.ws.handler.PortInfo;
+
+import org.jboss.ws.core.jaxws.JAXBContextCache;
+import org.jboss.ws.core.jaxws.wsaddressing.NativeEndpointReference;
+import org.jboss.ws.core.soap.Style;
+import org.jboss.ws.core.soap.Use;
+import org.jboss.ws.metadata.config.CommonConfig;
+import org.jboss.ws.metadata.config.Configurable;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+
+/**
+ * Feature aware client endpoint meta data adapter.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class FeatureAwareClientEndpointMetaDataAdapter extends
ClientEndpointMetaData implements FeatureAwareEndpointMetaData
+{
+
+ private final ClientEndpointMetaData delegee;
+ private final Set<WebServiceFeature> features = new
HashSet<WebServiceFeature>();
+
+ public FeatureAwareClientEndpointMetaDataAdapter(final ClientEndpointMetaData
delegee)
+ {
+ this.delegee = delegee;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T extends WebServiceFeature> T getFeature(Class<T> key)
+ {
+ for (WebServiceFeature feature : this.features)
+ {
+ if (key == feature.getClass())
+ {
+ return (T)feature;
+ }
+ }
+
+ return this.delegee.getFeature(key);
+ }
+
+ @Override
+ public void setFeature(WebServiceFeature feature)
+ {
+ this.features.add(feature);
+ }
+
+ @Override
+ public FeatureSet getFeatures()
+ {
+ final FeatureSet retVal = this.delegee.getFeatures();
+
+ for (WebServiceFeature feature : this.features)
+ {
+ retVal.addFeature(feature);
+ }
+
+ return retVal;
+ }
+
+ @Override
+ public void addFeature(WebServiceFeature feature)
+ {
+ this.setFeature(feature);
+ }
+
+ @Override
+ public <T extends WebServiceFeature> boolean isFeatureEnabled(final
Class<T> key)
+ {
+ final T feature = this.getFeature(key);
+
+ return (feature != null ? feature.isEnabled() : false);
+ }
+
+ // ********************************************
+ // just delegate to non feature related methods
+ // ********************************************
+
+ @Override
+ public EndpointConfigMetaData createEndpointConfigMetaData(String configName, String
configFile)
+ {
+ return this.delegee.createEndpointConfigMetaData(configName, configFile);
+ }
+
+ @Override
+ public String getEndpointAddress()
+ {
+ return this.delegee.getEndpointAddress();
+ }
+
+ @Override
+ public PortInfo getPortInfo()
+ {
+ return this.delegee.getPortInfo();
+ }
+
+ @Override
+ public void setEndpointAddress(String endpointAddress)
+ {
+ this.delegee.setEndpointAddress(endpointAddress);
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.delegee.toString();
+ }
+
+ @Override
+ public void addHandler(HandlerMetaData handler)
+ {
+ this.delegee.addHandler(handler);
+ }
+
+ @Override
+ public void addHandlers(List<HandlerMetaData> configHandlers)
+ {
+ this.delegee.addHandlers(configHandlers);
+ }
+
+ @Override
+ public void addOperation(OperationMetaData opMetaData)
+ {
+ this.delegee.addOperation(opMetaData);
+ }
+
+ @Override
+ public void clearHandlers()
+ {
+ this.delegee.clearHandlers();
+ }
+
+ @Override
+ public void clearOperations()
+ {
+ this.delegee.clearOperations();
+ }
+
+ @Override
+ public void configure(Configurable configurable)
+ {
+ this.delegee.configure(configurable);
+ }
+
+ @Override
+ public void eagerInitialize()
+ {
+ this.delegee.eagerInitialize();
+ }
+
+ @Override
+ public String getAuthMethod()
+ {
+ return this.delegee.getAuthMethod();
+ }
+
+ @Override
+ public Collection<BindingCustomization> getBindingCustomizations()
+ {
+ return this.delegee.getBindingCustomizations();
+ }
+
+ @Override
+ public String getBindingId()
+ {
+ return this.delegee.getBindingId();
+ }
+
+ @Override
+ public ClassLoader getClassLoader()
+ {
+ return this.delegee.getClassLoader();
+ }
+
+ @Override
+ public CommonConfig getConfig()
+ {
+ return this.delegee.getConfig();
+ }
+
+ @Override
+ public String getConfigFile()
+ {
+ return this.delegee.getConfigFile();
+ }
+
+ @Override
+ public String getConfigName()
+ {
+ return this.delegee.getConfigName();
+ }
+
+ @Override
+ public String getDocumentation()
+ {
+ return this.delegee.getDocumentation();
+ }
+
+ @Override
+ public Use getEncodingStyle()
+ {
+ return this.delegee.getEncodingStyle();
+ }
+
+ @Override
+ public EndpointConfigMetaData getEndpointConfigMetaData()
+ {
+ return this.delegee.getEndpointConfigMetaData();
+ }
+
+ @Override
+ public NativeEndpointReference getEndpointReference()
+ {
+ return this.delegee.getEndpointReference();
+ }
+
+ @Override
+ public List<HandlerMetaData> getHandlerMetaData(HandlerType type)
+ {
+ return this.delegee.getHandlerMetaData(type);
+ }
+
+ @Override
+ public JAXBContextCache getJaxbCache()
+ {
+ return this.delegee.getJaxbCache();
+ }
+
+ @Override
+ public OperationMetaData getOperation(QName xmlName)
+ {
+ return this.delegee.getOperation(xmlName);
+ }
+
+ @Override
+ public OperationMetaData getOperation(Method method)
+ {
+ return this.delegee.getOperation(method);
+ }
+
+ @Override
+ public List<OperationMetaData> getOperations()
+ {
+ return this.delegee.getOperations();
+ }
+
+ @Override
+ public ParameterStyle getParameterStyle()
+ {
+ return this.delegee.getParameterStyle();
+ }
+
+ @Override
+ public QName getPortName()
+ {
+ return this.delegee.getPortName();
+ }
+
+ @Override
+ public QName getPortTypeName()
+ {
+ return this.delegee.getPortTypeName();
+ }
+
+ @Override
+ public Properties getProperties()
+ {
+ return this.delegee.getProperties();
+ }
+
+ @Override
+ public List<Class> getRegisteredTypes()
+ {
+ return this.delegee.getRegisteredTypes();
+ }
+
+ @Override
+ public UnifiedVirtualFile getRootFile()
+ {
+ return this.delegee.getRootFile();
+ }
+
+ @Override
+ public Class getServiceEndpointInterface()
+ {
+ return this.delegee.getServiceEndpointInterface();
+ }
+
+ @Override
+ public String getServiceEndpointInterfaceName()
+ {
+ return this.delegee.getServiceEndpointInterfaceName();
+ }
+
+ @Override
+ public ServiceMetaData getServiceMetaData()
+ {
+ return this.delegee.getServiceMetaData();
+ }
+
+ @Override
+ public Mode getServiceMode()
+ {
+ return this.delegee.getServiceMode();
+ }
+
+ @Override
+ public List<UnifiedPortComponentRefMetaData> getServiceRefContrib()
+ {
+ return this.delegee.getServiceRefContrib();
+ }
+
+ @Override
+ public Style getStyle()
+ {
+ return this.delegee.getStyle();
+ }
+
+ @Override
+ public Type getType()
+ {
+ return this.delegee.getType();
+ }
+
+ @Override
+ public void initEndpointConfig()
+ {
+ this.delegee.initEndpointConfig();
+ }
+
+ @Override
+ public boolean isHandlersInitialized()
+ {
+ return this.delegee.isHandlersInitialized();
+ }
+
+ @Override
+ public boolean matches(UnifiedPortComponentRefMetaData pcRef)
+ {
+ return this.delegee.matches(pcRef);
+ }
+
+ @Override
+ public void registerConfigObserver(Configurable observer)
+ {
+ this.delegee.registerConfigObserver(observer);
+ }
+
+ @Override
+ public void setAuthMethod(String authMethod)
+ {
+ this.delegee.setAuthMethod(authMethod);
+ }
+
+ @Override
+ public void setBindingId(String bindingId)
+ {
+ this.delegee.setBindingId(bindingId);
+ }
+
+ @Override
+ public void setConfigName(String configName)
+ {
+ this.delegee.setConfigName(configName);
+ }
+
+ @Override
+ public void setConfigName(String configName, String configFile)
+ {
+ this.delegee.setConfigName(configName, configFile);
+ }
+
+ @Override
+ public void setDocumentation(String documentation)
+ {
+ this.delegee.setDocumentation(documentation);
+ }
+
+ @Override
+ public void setEncodingStyle(Use value)
+ {
+ this.delegee.setEncodingStyle(value);
+ }
+
+ @Override
+ public void setEndpointReference(NativeEndpointReference epr)
+ {
+ this.delegee.setEndpointReference(epr);
+ }
+
+ @Override
+ public void setHandlersInitialized(boolean flag)
+ {
+ this.delegee.setHandlersInitialized(flag);
+ }
+
+ @Override
+ public void setParameterStyle(ParameterStyle value)
+ {
+ this.delegee.setParameterStyle(value);
+ }
+
+ @Override
+ public void setPortName(QName portName)
+ {
+ this.delegee.setPortName(portName);
+ }
+
+ @Override
+ public void setProperties(Properties properties)
+ {
+ this.delegee.setProperties(properties);
+ }
+
+ @Override
+ public void setServiceEndpointInterfaceName(String seiName)
+ {
+ this.delegee.setServiceEndpointInterfaceName(seiName);
+ }
+
+ @Override
+ public void setServiceMode(Mode serviceMode)
+ {
+ this.delegee.setServiceMode(serviceMode);
+ }
+
+ @Override
+ public void setStyle(Style value)
+ {
+ this.delegee.setStyle(value);
+ }
+
+ @Override
+ public void validate()
+ {
+ this.delegee.validate();
+ }
+
+ @Override
+ public void addExtension(MetaDataExtension ext)
+ {
+ this.delegee.addExtension(ext);
+ }
+
+ @Override
+ public MetaDataExtension getExtension(String namespace)
+ {
+ return this.delegee.getExtension(namespace);
+ }
+
+ @Override
+ public Map<String, MetaDataExtension> getExtensions()
+ {
+ return this.delegee.getExtensions();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return this.delegee.equals(obj);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return this.delegee.hashCode();
+ }
+
+}
Copied:
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java
(from rev 12384,
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java)
===================================================================
---
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java
(rev 0)
+++
stack/native/branches/jbossws-native-3.3.0.GA/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java 2010-05-28
16:24:44 UTC (rev 12389)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.umdm;
+
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * Wrapper over endpoint meta data to enable feature overriding.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public interface FeatureAwareEndpointMetaData
+{
+ void setFeature(WebServiceFeature feature);
+ <T extends WebServiceFeature> T getFeature(Class<T> key);
+}