JBossWS SVN: r12221 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-13 04:22:15 -0400 (Thu, 13 May 2010)
New Revision: 12221
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java
Log:
[JBWS-3025] Cleaning default Bus in ServiceObjectFactory and improving port match in ServiceRefStubPropertyConfigurer
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-05-13 08:21:26 UTC (rev 12220)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-05-13 08:22:15 UTC (rev 12221)
@@ -97,7 +97,7 @@
Bus bus;
//Reset bus before constructing Service
- BusFactory.setThreadDefaultBus(null);
+ BusFactory.setDefaultBus(null);
URL cxfConfig = getCXFConfiguration(serviceRef.getVfsRoot());
if (cxfConfig != null)
{
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java 2010-05-13 08:21:26 UTC (rev 12220)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java 2010-05-13 08:22:15 UTC (rev 12221)
@@ -33,6 +33,7 @@
import org.apache.cxf.configuration.Configurer;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
+import org.jboss.logging.Logger;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
@@ -56,10 +57,6 @@
public void configureBean(Object beanInstance)
{
- if (beanInstance instanceof JaxWsProxyFactoryBean)
- {
- configureJaxWsProxyFactoryBean((JaxWsProxyFactoryBean)beanInstance);
- }
if (delegate != null)
{
delegate.configureBean(beanInstance);
@@ -68,9 +65,19 @@
public void configureBean(String name, Object beanInstance)
{
- if (beanInstance instanceof JaxWsProxyFactoryBean)
+ if (name != null && beanInstance instanceof JaxWsProxyFactoryBean)
{
- configureJaxWsProxyFactoryBean((JaxWsProxyFactoryBean)beanInstance);
+ QName portQName = null;
+ try
+ {
+ String portName = name.substring(0, name.indexOf(".jaxws-client.proxyFactory"));
+ portQName = QName.valueOf(portName);
+ }
+ catch (Exception e)
+ {
+ Logger.getLogger(this.getClass()).warn("Unable to retrieve port QName from '" + name + "', trying matching port using endpoint interface name only.");
+ }
+ configureJaxWsProxyFactoryBean(portQName, (JaxWsProxyFactoryBean)beanInstance);
}
if (delegate != null)
{
@@ -78,10 +85,10 @@
}
}
- private synchronized void configureJaxWsProxyFactoryBean(JaxWsProxyFactoryBean proxyFactory)
+ private synchronized void configureJaxWsProxyFactoryBean(QName portQName, JaxWsProxyFactoryBean proxyFactory)
{
Class<?> clazz = proxyFactory.getServiceClass();
- UnifiedPortComponentRefMetaData upcmd = serviceRefMD.getPortComponentRef(clazz != null ? clazz.getName() : null, getServiceName(proxyFactory));
+ UnifiedPortComponentRefMetaData upcmd = serviceRefMD.getPortComponentRef(clazz != null ? clazz.getName() : null, portQName);
if (upcmd != null)
{
setProperties(proxyFactory, upcmd);
@@ -89,18 +96,6 @@
}
}
- private static QName getServiceName(JaxWsProxyFactoryBean proxyFactory)
- {
- try
- {
- return proxyFactory.getServiceName();
- }
- catch (Exception e) //ignore
- {
- return null;
- }
- }
-
private void setMTOM(JaxWsServiceFactoryBean serviceFactoryBean, UnifiedPortComponentRefMetaData upcmd)
{
if (upcmd.getEnableMTOM())
14 years, 7 months
JBossWS SVN: r12220 - container/jboss60/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-05-13 04:21:26 -0400 (Thu, 13 May 2010)
New Revision: 12220
Added:
container/jboss60/branches/jbossws-jboss600M3-jms-integration/
Log:
Created branch for jms integration
Copied: container/jboss60/branches/jbossws-jboss600M3-jms-integration (from rev 12219, container/jboss60/branches/jbossws-jboss600M3)
14 years, 7 months
JBossWS SVN: r12219 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core: jaxrpc/client and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-05-12 12:20:01 -0400 (Wed, 12 May 2010)
New Revision: 12219
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
Log:
[JBPAPP-4120] JAX-WS Port injected using @WebServiceRef retains last message.
Refactoring to eliminate caching of EndpointInvocation within the CommonClient
referenced when injected.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12 15:39:09 UTC (rev 12218)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12 16:20:01 UTC (rev 12219)
@@ -84,8 +84,6 @@
protected EndpointMetaData epMetaData;
// The current operation name
protected QName operationName;
- // Output parameters
- protected EndpointInvocation epInv;
// The binding provider
protected CommonBindingProvider bindingProvider;
// A Map<QName,UnboundHeader> of header entries
@@ -239,6 +237,11 @@
protected abstract boolean shouldMaintainSession();
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ return new EndpointInvocation(opMetaData);
+ }
+
/** Call invokation goes as follows:
*
* 1) synchronize the operation name with the operation meta data
@@ -279,7 +282,7 @@
binding.setHeaderSource(this);
// Create the invocation and sync the input parameters
- epInv = new EndpointInvocation(opMetaData);
+ EndpointInvocation epInv = createEndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
// Set the required outbound properties
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12 15:39:09 UTC (rev 12218)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12 16:20:01 UTC (rev 12219)
@@ -50,6 +50,7 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.binding.TypeMappingImpl;
@@ -71,6 +72,8 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.common.JavaUtils;
+import com.sun.corba.se.spi.orb.Operation;
+
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
*
@@ -90,6 +93,8 @@
private QName portType;
// A Map<String,Object> of Call properties
private Map<String, Object> properties = new HashMap<String, Object>();
+ // The EndpointInvocation for the call.
+ private EndpointInvocation epInv;
// The set of supported properties
private static final Set<String> standardProperties = new HashSet<String>();
@@ -156,7 +161,15 @@
{
return properties;
}
+
+ @Override
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ epInv = super.createEndpointInvocation(opMetaData);
+ return epInv;
+ }
+
/** Gets the address of a target service endpoint.
*/
public String getTargetEndpointAddress()
14 years, 7 months
JBossWS SVN: r12218 - in stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core: jaxrpc/client and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-05-12 11:39:09 -0400 (Wed, 12 May 2010)
New Revision: 12218
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
Log:
[JBPAPP-4120] JAX-WS Port injected using @WebServiceRef retains last message.
Refactoring to eliminate caching of EndpointInvocation within the CommonClient
referenced when injected.
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12 14:58:53 UTC (rev 12217)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12 15:39:09 UTC (rev 12218)
@@ -87,8 +87,6 @@
protected EndpointMetaData epMetaData;
// The current operation name
protected QName operationName;
- // Output parameters
- protected EndpointInvocation epInv;
// The binding provider
protected CommonBindingProvider bindingProvider;
// A Map<QName,UnboundHeader> of header entries
@@ -242,6 +240,11 @@
protected abstract boolean shouldMaintainSession();
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ return new EndpointInvocation(opMetaData);
+ }
+
/** Call invokation goes as follows:
*
* 1) synchronize the operation name with the operation meta data
@@ -280,7 +283,7 @@
binding.setHeaderSource(this);
// Create the invocation and sync the input parameters
- epInv = new EndpointInvocation(opMetaData);
+ EndpointInvocation epInv = createEndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral()
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12 14:58:53 UTC (rev 12217)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12 15:39:09 UTC (rev 12218)
@@ -48,6 +48,7 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.binding.TypeMappingImpl;
@@ -68,6 +69,8 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.common.JavaUtils;
+import com.sun.corba.se.spi.orb.Operation;
+
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
*
@@ -87,6 +90,8 @@
private QName portType;
// A Map<String,Object> of Call properties
private Map<String, Object> properties = new HashMap<String, Object>();
+ // The EndpointInvocation for the call.
+ private EndpointInvocation epInv;
// The set of supported properties
private static final Set<String> standardProperties = new HashSet<String>();
@@ -153,7 +158,15 @@
{
return properties;
}
+
+ @Override
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ epInv = super.createEndpointInvocation(opMetaData);
+ return epInv;
+ }
+
/** Gets the address of a target service endpoint.
*/
public String getTargetEndpointAddress()
14 years, 7 months
JBossWS SVN: r12217 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core: jaxrpc/client and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-05-12 10:58:53 -0400 (Wed, 12 May 2010)
New Revision: 12217
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
Log:
[JBWS-3004] JAX-WS Port injected using @WebServiceRef retains last message.
Refactoring to eliminate caching of EndpointInvocation within the CommonClient
referenced when injected.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12 14:26:09 UTC (rev 12216)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12 14:58:53 UTC (rev 12217)
@@ -89,8 +89,6 @@
protected EndpointMetaData epMetaData;
// The current operation name
protected QName operationName;
- // Output parameters
- protected EndpointInvocation epInv;
// The binding provider
protected CommonBindingProvider bindingProvider;
// A Map<QName,UnboundHeader> of header entries
@@ -244,6 +242,11 @@
protected abstract boolean shouldMaintainSession();
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ return new EndpointInvocation(opMetaData);
+ }
+
/** Call invokation goes as follows:
*
* 1) synchronize the operation name with the operation meta data
@@ -285,7 +288,7 @@
binding.setHeaderSource(this);
// Create the invocation and sync the input parameters
- epInv = new EndpointInvocation(opMetaData);
+ EndpointInvocation epInv = createEndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral()
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12 14:26:09 UTC (rev 12216)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12 14:58:53 UTC (rev 12217)
@@ -48,6 +48,7 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.binding.TypeMappingImpl;
@@ -68,6 +69,8 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.common.JavaUtils;
+import com.sun.corba.se.spi.orb.Operation;
+
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances.
*
@@ -87,6 +90,8 @@
private QName portType;
// A Map<String,Object> of Call properties
private Map<String, Object> properties = new HashMap<String, Object>();
+ // The EndpointInvocation for the call.
+ private EndpointInvocation epInv;
// The set of supported properties
private static final Set<String> standardProperties = new HashSet<String>();
@@ -153,7 +158,15 @@
{
return properties;
}
+
+ @Override
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ epInv = super.createEndpointInvocation(opMetaData);
+ return epInv;
+ }
+
/** Gets the address of a target service endpoint.
*/
public String getTargetEndpointAddress()
14 years, 7 months
JBossWS SVN: r12216 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: core/jaxws/spi and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-12 10:26:09 -0400 (Wed, 12 May 2010)
New Revision: 12216
Added:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureSet.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
Log:
[JBWS-3022] implementing @AddressingFeature policy deployer
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2010-05-12 13:37:05 UTC (rev 12215)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2010-05-12 14:26:09 UTC (rev 12216)
@@ -101,15 +101,42 @@
@SuppressWarnings("unchecked")
private static <T> void processAddressingFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
{
- if (feature instanceof AddressingFeature && feature.isEnabled())
+ if (feature instanceof AddressingFeature)
{
- BindingExt bindingExt = (BindingExt)((BindingProvider)stub).getBinding();
+ BindingExt bindingExt = (BindingExt) ((BindingProvider) stub).getBinding();
List<Handler> handlers = bindingExt.getHandlerChain(HandlerType.POST);
- handlers.add(new WSAddressingClientHandler());
- bindingExt.setHandlerChain(handlers, HandlerType.POST);
+ int addressingHandlerIndex = getAddressingHandlerIndex(handlers);
+
+ if (feature.isEnabled())
+ {
+ if (addressingHandlerIndex == -1)
+ {
+ handlers.add(new WSAddressingClientHandler());
+ bindingExt.setHandlerChain(handlers, HandlerType.POST);
+ }
+ }
+ else if (addressingHandlerIndex != -1)
+ {
+ handlers.remove(addressingHandlerIndex);
+ bindingExt.setHandlerChain(handlers, HandlerType.POST);
+ }
}
}
+ private static int getAddressingHandlerIndex(final List<Handler> handlers)
+ {
+ if (handlers != null)
+ {
+ for (int i = 0; i < handlers.size(); i++)
+ {
+ if (handlers.get(i) instanceof WSAddressingClientHandler)
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
/**
* Setup http chunked encoding
*
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-05-12 13:37:05 UTC (rev 12215)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-05-12 14:26:09 UTC (rev 12216)
@@ -23,8 +23,6 @@
import java.io.IOException;
import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
@@ -201,78 +199,6 @@
}
}
- /**
- * The getPort method returns a stub. A service client uses this stub to invoke operations on the target service endpoint.
- * The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
- */
- @Override
- public <T> T getPort(QName portName, Class<T> seiClass)
- {
- assertSEIConstraints(seiClass);
-
- if (serviceMetaData == null)
- throw new WebServiceException("Service meta data not available");
-
- // com/sun/ts/tests/jaxws/api/javax_xml_ws/Service#GetPort1NegTest1WithWsdl
- EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
- if (epMetaData == null && serviceMetaData.getEndpoints().size() > 0)
- throw new WebServiceException("Cannot get port meta data for: " + portName);
-
- // This is the case when the service could not be created from wsdl
- if (serviceMetaData.getEndpoints().size() == 0)
- {
- log.warn("Cannot get port meta data for: " + portName);
-
- QName portType = getPortTypeName(seiClass);
- epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, portType, Type.JAXWS);
- }
-
- String seiClassName = seiClass.getName();
- epMetaData.setServiceEndpointInterfaceName(seiClassName);
-
- return getPortInternal(epMetaData, seiClass);
- }
-
- /**
- * The getPort method returns a stub. A service client uses this stub to invoke operations on the target service endpoint.
- * The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
- */
- @Override
- public <T> T getPort(Class<T> seiClass)
- {
- assertSEIConstraints(seiClass);
-
- if (serviceMetaData == null)
- throw new WebServiceException("Service meta data not available");
-
- String seiClassName = seiClass.getName();
- EndpointMetaData epMetaData = serviceMetaData.getEndpointByServiceEndpointInterface(seiClassName);
-
- if (epMetaData == null && serviceMetaData.getEndpoints().size() == 1)
- {
- epMetaData = serviceMetaData.getEndpoints().get(0);
- epMetaData.setServiceEndpointInterfaceName(seiClassName);
- }
- else
- {
- QName portTypeName = getPortTypeName(seiClass);
- for (EndpointMetaData epmd : serviceMetaData.getEndpoints())
- {
- if (portTypeName.equals(epmd.getPortTypeName()))
- {
- epmd.setServiceEndpointInterfaceName(seiClass.getName());
- epMetaData = epmd;
- break;
- }
- }
- }
-
- if (epMetaData == null)
- throw new WebServiceException("Cannot get port meta data for: " + seiClassName);
-
- return getPortInternal(epMetaData, seiClass);
- }
-
private <T> QName getPortTypeName(Class<T> seiClass)
{
if (!seiClass.isAnnotationPresent(WebService.class))
@@ -309,7 +235,9 @@
}
}
- return (T)createProxy(seiClass, epMetaData);
+ T port = (T)createProxy(seiClass, epMetaData);
+ initWebserviceFeatures(port, epMetaData.getFeatures().getFeatures());
+ return port;
}
private void assertSEIConstraints(Class seiClass)
@@ -573,6 +501,78 @@
return port;
}
+ /**
+ * The getPort method returns a stub. A service client uses this stub to invoke operations on the target service endpoint.
+ * The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
+ */
+ @Override
+ public <T> T getPort(QName portName, Class<T> seiClass)
+ {
+ assertSEIConstraints(seiClass);
+
+ if (serviceMetaData == null)
+ throw new WebServiceException("Service meta data not available");
+
+ // com/sun/ts/tests/jaxws/api/javax_xml_ws/Service#GetPort1NegTest1WithWsdl
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null && serviceMetaData.getEndpoints().size() > 0)
+ throw new WebServiceException("Cannot get port meta data for: " + portName);
+
+ // This is the case when the service could not be created from wsdl
+ if (serviceMetaData.getEndpoints().size() == 0)
+ {
+ log.warn("Cannot get port meta data for: " + portName);
+
+ QName portType = getPortTypeName(seiClass);
+ epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, portType, Type.JAXWS);
+ }
+
+ String seiClassName = seiClass.getName();
+ epMetaData.setServiceEndpointInterfaceName(seiClassName);
+
+ return getPortInternal(epMetaData, seiClass);
+ }
+
+ /**
+ * The getPort method returns a stub. A service client uses this stub to invoke operations on the target service endpoint.
+ * The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
+ */
+ @Override
+ public <T> T getPort(Class<T> seiClass)
+ {
+ assertSEIConstraints(seiClass);
+
+ if (serviceMetaData == null)
+ throw new WebServiceException("Service meta data not available");
+
+ String seiClassName = seiClass.getName();
+ EndpointMetaData epMetaData = serviceMetaData.getEndpointByServiceEndpointInterface(seiClassName);
+
+ if (epMetaData == null && serviceMetaData.getEndpoints().size() == 1)
+ {
+ epMetaData = serviceMetaData.getEndpoints().get(0);
+ epMetaData.setServiceEndpointInterfaceName(seiClassName);
+ }
+ else
+ {
+ QName portTypeName = getPortTypeName(seiClass);
+ for (EndpointMetaData epmd : serviceMetaData.getEndpoints())
+ {
+ if (portTypeName.equals(epmd.getPortTypeName()))
+ {
+ epmd.setServiceEndpointInterfaceName(seiClass.getName());
+ epMetaData = epmd;
+ break;
+ }
+ }
+ }
+
+ if (epMetaData == null)
+ throw new WebServiceException("Cannot get port meta data for: " + seiClassName);
+
+ return getPortInternal(epMetaData, seiClass);
+ }
+
private <T> void initWebserviceFeatures(T stub, WebServiceFeature... features)
{
if (features != null)
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/policy/AddressingPolicyAssertionDeployer.java 2010-05-12 14:26:09 UTC (rev 12216)
@@ -0,0 +1,108 @@
+/*
+ * 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.extensions.addressing.policy;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.AddressingFeature.Responses;
+
+import org.apache.ws.policy.PrimitiveAssertion;
+import org.jboss.ws.extensions.policy.deployer.domainAssertion.AssertionDeployer;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertion;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
+import org.jboss.wsf.common.addressing.AddressingConstants;
+
+/**
+ * Associates AddressingFeature with endpoint meta data if not set yet.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class AddressingPolicyAssertionDeployer implements AssertionDeployer
+{
+
+ @Override
+ public void deployClientSide(final PrimitiveAssertion assertion, final ExtensibleMetaData extensibleMD)
+ throws UnsupportedAssertion
+ {
+ this.deploy(assertion, extensibleMD);
+ }
+
+ @Override
+ public void deployServerSide(final PrimitiveAssertion assertion, final ExtensibleMetaData extensibleMD)
+ throws UnsupportedAssertion
+ {
+ this.deploy(assertion, extensibleMD);
+ }
+
+ private static void deploy(final PrimitiveAssertion assertion, final ExtensibleMetaData extensibleMD)
+ throws UnsupportedAssertion
+ {
+ if (extensibleMD instanceof EndpointMetaData)
+ {
+ final EndpointMetaData endpointMD = (EndpointMetaData) extensibleMD;
+ final AddressingFeature addressingFeature = endpointMD.getFeature(AddressingFeature.class);
+
+ if (addressingFeature == null)
+ {
+ final boolean enabled = true;
+ final boolean required = !assertion.isOptional();
+ final Responses responses = getResponses(assertion);
+
+ endpointMD.addFeature(new AddressingFeature(enabled, required, responses));
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Responses getResponses(final PrimitiveAssertion assertion)
+ {
+ final QName assertionQName = assertion.getName();
+
+ if (AddressingConstants.Metadata.Elements.ANONYMOUSRESPONSES_QNAME.equals(assertionQName))
+ {
+ return AddressingFeature.Responses.ANONYMOUS;
+ }
+ if (AddressingConstants.Metadata.Elements.NONANONYMOUSRESPONSES_QNAME.equals(assertionQName))
+ {
+ return AddressingFeature.Responses.NON_ANONYMOUS;
+ }
+
+ List terms = assertion.getTerms();
+ if (terms != null)
+ {
+ for (final Object term : terms)
+ {
+ if (term instanceof PrimitiveAssertion)
+ {
+ return getResponses((PrimitiveAssertion) term);
+ }
+ }
+ }
+
+ return AddressingFeature.Responses.ALL;
+ }
+
+}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java 2010-05-12 13:37:05 UTC (rev 12215)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java 2010-05-12 14:26:09 UTC (rev 12216)
@@ -33,6 +33,7 @@
import org.apache.ws.policy.XorCompositeAssertion;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.extensions.addressing.policy.AddressingPolicyAssertionDeployer;
import org.jboss.ws.extensions.policy.deployer.domainAssertion.AssertionDeployer;
import org.jboss.ws.extensions.policy.deployer.domainAssertion.NopAssertionDeployer;
import org.jboss.ws.extensions.policy.deployer.domainAssertion.WSSecurityAssertionDeployer;
@@ -42,6 +43,7 @@
import org.jboss.ws.extensions.wsrm.policy.RM10PolicyAssertionDeployer;
import org.jboss.ws.extensions.wsrm.policy.RM11PolicyAssertionDeployer;
import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
+import org.jboss.wsf.common.addressing.AddressingConstants;
/**
* @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
@@ -60,6 +62,7 @@
me.domainDeployerMap.put("http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd", WSSecurityAssertionDeployer.class);
me.domainDeployerMap.put("http://docs.oasis-open.org/ws-rx/wsrmp/200702", RM11PolicyAssertionDeployer.class);
me.domainDeployerMap.put("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", RM10PolicyAssertionDeployer.class);
+ me.domainDeployerMap.put(AddressingConstants.Metadata.NS, AddressingPolicyAssertionDeployer.class);
me.domainDeployerMap.put("http://www.w3.org/2006/05/addressing/wsdl", NopAssertionDeployer.class);
}
@@ -90,6 +93,7 @@
instance.domainDeployerMap.put("http://docs.oasis-open.org/ws-rx/wsrmp/200702", NopAssertionDeployer.class);
instance.domainDeployerMap.put("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", NopAssertionDeployer.class);
instance.domainDeployerMap.put("http://www.w3.org/2006/05/addressing/wsdl", NopAssertionDeployer.class);
+ instance.domainDeployerMap.put(AddressingConstants.Metadata.NS, NopAssertionDeployer.class);
return instance;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureSet.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureSet.java 2010-05-12 13:37:05 UTC (rev 12215)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureSet.java 2010-05-12 14:26:09 UTC (rev 12216)
@@ -62,5 +62,18 @@
{
this.features.add(feature);
}
+
+ public WebServiceFeature[] getFeatures()
+ {
+ final WebServiceFeature[] retVal = new WebServiceFeature[this.features.size()];
+
+ int i = 0;
+ for (final WebServiceFeature feature : this.features)
+ {
+ retVal[i++] = feature;
+ }
+
+ return retVal;
+ }
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2010-05-12 13:37:05 UTC (rev 12215)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2010-05-12 14:26:09 UTC (rev 12216)
@@ -341,7 +341,11 @@
{
boolean result = false;
Element srcElement = extElement.getElement();
- if (Constants.URI_WS_POLICY.equals(srcElement.getNamespaceURI()))
+ final boolean is200409PolicyNamespace = Constants.URI_WS_POLICY.equals(srcElement.getNamespaceURI());
+ final boolean is200702PolicyNamespace = WSDLGenerator.WSP_NS.equals(srcElement.getNamespaceURI());
+ final boolean isPolicyNamespace = is200702PolicyNamespace || is200409PolicyNamespace;
+
+ if (isPolicyNamespace)
{
//copy missing namespaces from the source element to our element
Element element = (Element)srcElement.cloneNode(true);
@@ -361,6 +365,7 @@
result = true;
}
}
+
return result;
}
14 years, 7 months
JBossWS SVN: r12215 - framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-12 09:37:05 -0400 (Wed, 12 May 2010)
New Revision: 12215
Modified:
framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService3.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService4.wsdl
Log:
[JBWS-3022] fixing test WSDLs
Modified: framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService3.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService3.wsdl 2010-05-12 10:44:09 UTC (rev 12214)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService3.wsdl 2010-05-12 13:37:05 UTC (rev 12215)
@@ -64,7 +64,9 @@
</service>
<wsp:Policy wsu:Id="a7bb8243-904e-4a6b-a7c0-afee3f99c9ec" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
<wsam:Addressing xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
- <wsp:Policy/>
+ <wsp:Policy>
+ <wsam:AnonymousResponses/>
+ </wsp:Policy>
</wsam:Addressing>
</wsp:Policy>
</definitions>
\ No newline at end of file
Modified: framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService4.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService4.wsdl 2010-05-12 10:44:09 UTC (rev 12214)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3022/WEB-INF/wsdl/AddNumbersService4.wsdl 2010-05-12 13:37:05 UTC (rev 12215)
@@ -64,7 +64,9 @@
</service>
<wsp:Policy wsu:Id="7a647e5-d212-4ba9-a5c9-b4c643bb9099" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
<wsam:Addressing xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
- <wsp:Policy/>
+ <wsp:Policy>
+ <wsam:NonAnonymousResponses/>
+ </wsp:Policy>
</wsam:Addressing>
</wsp:Policy>
</definitions>
\ No newline at end of file
14 years, 7 months
JBossWS SVN: r12214 - in stack/native/trunk/modules/core/src/main/java/org/jboss: ws/metadata/builder/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-12 06:44:09 -0400 (Wed, 12 May 2010)
New Revision: 12214
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
Log:
[JBWS-3022] @Addressing.responses value have to be validated in addressing handlers
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-05-12 10:42:40 UTC (rev 12213)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2010-05-12 10:44:09 UTC (rev 12214)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.addressing.jaxws;
+import java.lang.annotation.Annotation;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.HashSet;
@@ -30,18 +31,21 @@
import javax.xml.namespace.QName;
import javax.xml.soap.Detail;
+import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.EndpointReference;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.soap.Addressing;
import javax.xml.ws.soap.AddressingFeature;
import javax.xml.ws.soap.SOAPFaultException;
@@ -53,6 +57,7 @@
import org.jboss.ws.metadata.umdm.FaultMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.wsf.common.addressing.AddressingConstants;
import org.jboss.wsf.common.handler.GenericSOAPHandler;
import org.w3c.dom.Element;
@@ -97,8 +102,6 @@
SOAPAddressingProperties addrProps = (SOAPAddressingProperties) ADDR_BUILDER.newAddressingProperties();
SOAPMessage soapMessage = ((SOAPMessageContext) msgContext).getMessage();
- //OperationMetaData operationMD = this.getOperationMetaData(msgContext);
- //AddressingOpMetaExt addressingMD = this.getAddressingMetaData(msgContext);
CommonMessageContext commonMsgContext = (CommonMessageContext) msgContext;
if (this.isAddressingRequired(msgContext))
@@ -233,6 +236,8 @@
}
outProps.writeHeaders(soapMessage);
+
+ this.ensureAnonymousPolicy(inProps, msgContext);
}
private AttributedURI newURI(final String uri) // TODO: client addressing handler have the same method - refactor it to some helper class
@@ -266,7 +271,73 @@
return addressingMD;
}
+
+ private void ensureAnonymousPolicy(final SOAPAddressingProperties inProps, final MessageContext msgContext)
+ {
+ final AddressingFeature addressing = this.getOperationMetaData(msgContext).getEndpointMetaData().getFeature(AddressingFeature.class);
+ final boolean isOnlyAnonymousEnabled = addressing != null && addressing.getResponses() == AddressingFeature.Responses.ANONYMOUS;
+ final boolean isOnlyNonAnonymousEnabled = addressing != null && addressing.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS;
+ final boolean isReplyToAnonymous = this.isAnonymous(inProps.getReplyTo());
+ final boolean isFaultToAnonymous = this.isAnonymous(inProps.getFaultTo());
+
+ if ((isOnlyAnonymousEnabled) && (!isReplyToAnonymous || !isFaultToAnonymous))
+ {
+ try
+ {
+ this.addRelatesTo(inProps, msgContext);
+ SOAPFault fault = new SOAPFaultImpl();
+ fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "OnlyAnonymousAddressSupported"));
+ fault.setFaultString("A header representing a Message Addressing Property is not valid and the message cannot be processed");
+ this.addFaultDetail(fault, !isReplyToAnonymous ? AddressingConstants.Core.Elements.REPLYTO_QNAME : AddressingConstants.Core.Elements.FAULTTO_QNAME);
+ throw new SOAPFaultException(fault);
+ }
+ catch (SOAPException e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+ else if ((isOnlyNonAnonymousEnabled) && (isReplyToAnonymous || isFaultToAnonymous))
+ {
+ try
+ {
+ this.addRelatesTo(inProps, msgContext);
+ SOAPFault fault = new SOAPFaultImpl();
+ fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "OnlyNonAnonymousAddressSupported"));
+ fault.setFaultString("A header representing a Message Addressing Property is not valid and the message cannot be processed");
+ this.addFaultDetail(fault, isReplyToAnonymous ? AddressingConstants.Core.Elements.REPLYTO_QNAME : AddressingConstants.Core.Elements.FAULTTO_QNAME);
+ throw new SOAPFaultException(fault);
+ }
+ catch (SOAPException e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+ }
+
+ private void addFaultDetail(final SOAPFault faultElement, final QName problemHeaderQName) throws SOAPException
+ {
+ final Detail detailElement = faultElement.addDetail();
+ final SOAPElement problemHeaderQNameElement = detailElement.addChildElement(AddressingConstants.Core.Elements.PROBLEMHEADERQNAME_QNAME);
+ problemHeaderQNameElement.setTextContent(problemHeaderQName.toString());
+ }
+
+ private void addRelatesTo(final SOAPAddressingProperties inProps, final MessageContext msgContext) throws SOAPException
+ {
+ final String reqMessageID = inProps.getMessageID().getURI().toString();
+ final SOAPMessage soapMessage = ((SOAPMessageContext) msgContext).getMessage();
+ final SOAPElement relatesToElement = soapMessage.getSOAPHeader().addChildElement(AddressingConstants.Core.Elements.RELATESTO_QNAME);
+
+ relatesToElement.setTextContent(reqMessageID);
+ }
+ private boolean isAnonymous(final EndpointReference epr)
+ {
+ if ((epr != null) && (epr.getAddress() != null))
+ return ADDR_CONSTANTS.getAnonymousURI().equals(epr.getAddress().getURI().toString());
+
+ return true;
+ }
+
private String getFaultAction(final MessageContext msgContext)
{
final OperationMetaData operationMD = this.getOperationMetaData(msgContext);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2010-05-12 10:42:40 UTC (rev 12213)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2010-05-12 10:44:09 UTC (rev 12214)
@@ -54,7 +54,6 @@
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -81,7 +80,7 @@
if (an.annotationType() == Addressing.class)
{
Addressing anFeature = sepClass.getAnnotation(Addressing.class);
- AddressingFeature feature = new AddressingFeature(anFeature.enabled(), anFeature.required());
+ AddressingFeature feature = new AddressingFeature(anFeature.enabled(), anFeature.required(), anFeature.responses());
sepMetaData.addFeature(feature);
}
else if (an.annotationType() == MTOM.class)
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2010-05-12 10:42:40 UTC (rev 12213)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2010-05-12 10:44:09 UTC (rev 12214)
@@ -49,6 +49,7 @@
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.soap.AddressingFeature;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -392,7 +393,9 @@
{
AddressingConstantsImpl ADDR = new AddressingConstantsImpl();
wsaTo = outProps.getTo().getURI().toString();
- if (wsaTo.equals(ADDR.getAnonymousURI()))
+ final AddressingFeature addressing = epMetaData.getFeature(AddressingFeature.class);
+ final boolean onlyAnonymousAllowed = addressing != null && addressing.getResponses() == AddressingFeature.Responses.ANONYMOUS;
+ if (wsaTo.equals(ADDR.getAnonymousURI()) || onlyAnonymousAllowed)
wsaTo = null;
}
if (wsaTo != null)
14 years, 7 months
JBossWS SVN: r12213 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-12 06:42:40 -0400 (Wed, 12 May 2010)
New Revision: 12213
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3022] excluding test for CXF
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-12 10:40:56 UTC (rev 12212)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-12 10:42:40 UTC (rev 12213)
@@ -59,6 +59,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
org/jboss/test/ws/jaxws/handlerscope/*TestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-12 10:40:56 UTC (rev 12212)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-12 10:42:40 UTC (rev 12213)
@@ -59,6 +59,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
org/jboss/test/ws/jaxws/handlerscope/*TestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-12 10:40:56 UTC (rev 12212)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-12 10:42:40 UTC (rev 12213)
@@ -52,6 +52,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-12 10:40:56 UTC (rev 12212)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-12 10:42:40 UTC (rev 12213)
@@ -49,6 +49,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-3020] Investigate why HandlerScopeTestCase fails
14 years, 7 months
JBossWS SVN: r12212 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-12 06:40:56 -0400 (Wed, 12 May 2010)
New Revision: 12212
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3022] excluding test for Metro
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-12 10:38:37 UTC (rev 12211)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-12 10:40:56 UTC (rev 12212)
@@ -70,6 +70,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
# [JBWS-2998] Complete integration development for JSR109 requirements
org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-12 10:38:37 UTC (rev 12211)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-12 10:40:56 UTC (rev 12212)
@@ -70,6 +70,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
# [JBWS-2998] Complete integration development for JSR109 requirements
org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-12 10:38:37 UTC (rev 12211)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-12 10:40:56 UTC (rev 12212)
@@ -64,6 +64,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2998] Complete integration development for JSR109 requirements
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-12 10:38:37 UTC (rev 12211)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-12 10:40:56 UTC (rev 12212)
@@ -64,6 +64,7 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/jbws3008/**
+org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2998] Complete integration development for JSR109 requirements
14 years, 7 months