[jboss-svn-commits] JBossWS SVN: r736 - in branches/tdiesler/trunk: . src/main/java/javax/jws src/main/java/org/jboss/ws/annotation src/main/java/org/jboss/ws/deployment src/main/java/org/jboss/ws/jaxws/handler src/main/resources/jbossws.sar/META-INF src/test/ant src/test/java/org/jboss/test/ws/addressing/action src/test/java/org/jboss/test/ws/addressing/replyto src/test/java/org/jboss/test/ws/jaxws/handlerscope src/test/java/org/jboss/test/ws/samples/jsr181ejb src/test/java/org/jboss/test/ws/samples/wsaddressing src/test/resources/addressing/action/Doc-META-INF src/test/resources/addressing/action/Rpc-META-INF src/test/resources/addressing/replyto/Initial-WEB-INF src/test/resources/jaxws src/test/resources/jaxws/handlerscope src/test/resources/jaxws/handlerscope/WEB-INF src/test/resources/samples/jsr181ejb/META-INF src/test/resources/samples/wsaddressing/WEB-INF
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Aug 13 08:52:31 EDT 2006
Author: thomas.diesler at jboss.com
Date: 2006-08-13 08:51:55 -0400 (Sun, 13 Aug 2006)
New Revision: 736
Added:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ServerHandler.java
branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/
branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/
branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/jaxws-handlers.xml
branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/web.xml
Removed:
branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/jaxws-handlers.xml
branches/tdiesler/trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxws-handlers.xml
branches/tdiesler/trunk/src/test/resources/addressing/replyto/Initial-WEB-INF/jaxws-handlers.xml
branches/tdiesler/trunk/src/test/resources/samples/jsr181ejb/META-INF/jaxws-handlers.xml
Modified:
branches/tdiesler/trunk/progress.txt
branches/tdiesler/trunk/src/main/java/javax/jws/HandlerChain.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/annotation/PortComponent.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml
branches/tdiesler/trunk/src/test/ant/build-jars.xml
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ClientHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointBean.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/jsr181ejb/EJB3Bean01.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/StatefulEndpointImpl.java
branches/tdiesler/trunk/src/test/resources/samples/wsaddressing/WEB-INF/jaxws-handlers.xml
Log:
hander scoping
Modified: branches/tdiesler/trunk/progress.txt
===================================================================
--- branches/tdiesler/trunk/progress.txt 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/progress.txt 2006-08-13 12:51:55 UTC (rev 736)
@@ -1,3 +1 @@
-Implement SOAP-1.2 binding
-Generate WSDL with SOAP-1.2 binding
-Add SOAP-1.2 binding test case
+Add configName, configFile to @PortComponent
\ No newline at end of file
Modified: branches/tdiesler/trunk/src/main/java/javax/jws/HandlerChain.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/jws/HandlerChain.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/java/javax/jws/HandlerChain.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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 javax.jws;
// $Id$
@@ -40,8 +40,8 @@
* @since 26-Apr-2005
*/
@Retention(value = RetentionPolicy.RUNTIME)
- @Target(value = {ElementType.TYPE})
- public @interface HandlerChain
+ at Target(value = { ElementType.TYPE })
+public @interface HandlerChain
{
/**
@@ -55,6 +55,4 @@
* @deprecated
*/
String name() default "";
-}
-
-;
+};
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/annotation/PortComponent.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/annotation/PortComponent.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/annotation/PortComponent.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -41,15 +41,36 @@
/**
* The contextRoot element specifies the context root that the web service endpoint is deployed to.
* If it is not specified it will be derived from the deployment short name.
+ *
+ * Applies to server side port components only.
*/
String contextRoot() default "";
/**
* Relative path that is appended to the contextRoot to form fully qualified
* endpoint address for the web service endpoint.
+ *
+ * Applies to server side port components only.
*/
String urlPattern() default "";
+ /**
+ * The optional config-name element gives the client configuration name that must be present in
+ * the configuration given by element config-file.
+ *
+ * Server side default: Standard Endpoint
+ * Client side default: Standard Client
+ */
+ String configName() default "";
+
+ /**
+ * The optional config-file element gives the to a URL or resource name for the configuration.
+ *
+ * Server side default: standard-jaxws-endpoint-config.xml
+ * Client side default: standard-jaxws-client-config.xml
+ */
+ String configFile() default "";
+
/**
* The authMethod is used to configure the authentication mechanism for the web service.
* As a prerequisite to gaining access to any web service which are protected by an authorization
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -132,6 +132,17 @@
PortComponent anPortComponent = (PortComponent)wsClass.getAnnotation(PortComponent.class);
if (anPortComponent != null)
{
+ // setup config name
+ String configName = anPortComponent.configName();
+ if (configName.length() > 0)
+ epMetaData.setConfigName(configName);
+
+ // setup config file
+ String configFile = anPortComponent.configFile();
+ if (configFile.length() > 0)
+ epMetaData.setConfigFile(configFile);
+
+ // setup endpoint url
if (anPortComponent.contextRoot().length() > 0)
{
contextRoot = anPortComponent.contextRoot();
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -56,6 +56,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.addressing.AddressingPropertiesImpl;
import org.jboss.ws.addressing.metadata.AddressingOpMetaExt;
+import org.jboss.ws.annotation.PortComponent;
import org.jboss.ws.jaxrpc.ParameterStyle;
import org.jboss.ws.jaxrpc.ParameterWrapping;
import org.jboss.ws.jaxrpc.Style;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericHandler.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -35,15 +35,17 @@
*/
public abstract class GenericHandler implements Handler
{
+ private String handlerName;
private PortInfo portInfo;
- public GenericHandler()
+ public String getHandlerName()
{
+ return handlerName;
}
- public GenericHandler(PortInfo portInfo)
+ public void setHandlerName(String handlerName)
{
- this.portInfo = portInfo;
+ this.handlerName = handlerName;
}
public PortInfo getPortInfo()
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/GenericSOAPHandler.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -41,15 +41,6 @@
// The header blocks that can be processed by this Handler instance
private Set<QName> headers = new HashSet<QName>();
- public GenericSOAPHandler()
- {
- }
-
- public GenericSOAPHandler(PortInfo portInfo)
- {
- super(portInfo);
- }
-
/** Gets the header blocks that can be processed by this Handler instance.
*/
public Set<QName> getHeaders()
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerResolverImpl.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -64,10 +64,25 @@
QName portName = info.getPortName();
String bindingID = info.getBindingID();
- handlerChain.addAll(serviceMap.get(serviceName));
- handlerChain.addAll(portMap.get(portName));
- handlerChain.addAll(bindingMap.get(bindingID));
+ if (serviceMap.keySet().contains(serviceName))
+ handlerChain.addAll(serviceMap.get(serviceName));
+ if (serviceMap.keySet().contains(null))
+ handlerChain.addAll(serviceMap.get(null));
+
+ if (portMap.keySet().contains(portName))
+ handlerChain.addAll(portMap.get(portName));
+
+ if (portMap.keySet().contains(null))
+ handlerChain.addAll(portMap.get(null));
+
+ if (bindingMap.keySet().contains(bindingID))
+ handlerChain.addAll(bindingMap.get(bindingID));
+
+ if (bindingMap.keySet().contains(null))
+ handlerChain.addAll(bindingMap.get(null));
+
+
return Collections.unmodifiableList(handlerChain);
}
Modified: branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml
===================================================================
--- branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -12,6 +12,19 @@
</client-config>
<client-config>
+ <config-name>Standard WSAddressing Client</config-name>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.ws.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </client-config>
+
+ <client-config>
<config-name>Standard Secure Client</config-name>
<post-handler-chains>
<javaee:handler-chain>
Modified: branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml
===================================================================
--- branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -12,12 +12,25 @@
</endpoint-config>
<endpoint-config>
+ <config-name>Standard WSAddressing Endpoint</config-name>
+ <pre-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.ws.addressing.jaxws.WSAddressingServerHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </pre-handler-chains>
+ </endpoint-config>
+
+ <endpoint-config>
<config-name>Standard Secure Endpoint</config-name>
<pre-handler-chains>
<javaee:handler-chain>
<javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
<javaee:handler>
- <javaee:handler-name>WSSecurityHandlerInbound</javaee:handler-name>
+ <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
<javaee:handler-class>org.jboss.ws.wsse.jaxws.WSSecurityHandlerInbound</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
Modified: branches/tdiesler/trunk/src/test/ant/build-jars.xml
===================================================================
--- branches/tdiesler/trunk/src/test/ant/build-jars.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/ant/build-jars.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -29,7 +29,6 @@
</classes>
<webinf dir="${build.test.dir}/resources/addressing/action/Doc-META-INF">
<include name="wsdl/**"/>
- <include name="jaxws-handlers.xml"/>
</webinf>
</war>
<war warfile="${build.test.dir}/libs/jbossws-addressing-action-rpc.war" webxml="${build.test.dir}/resources/addressing/action/Rpc-WEB-INF/web.xml">
@@ -38,7 +37,6 @@
</classes>
<webinf dir="${build.test.dir}/resources/addressing/action/Rpc-META-INF">
<include name="wsdl/**"/>
- <include name="jaxws-handlers.xml"/>
</webinf>
</war>
@@ -50,9 +48,6 @@
<include name="org/jboss/test/ws/addressing/replyto/InitialEndpoint_*_RequestStruct.class"/>
<include name="org/jboss/test/ws/addressing/replyto/InitialEndpoint_*_ResponseStruct.class"/>
</classes>
- <webinf dir="${build.test.dir}/resources/addressing/replyto/Initial-WEB-INF">
- <include name="jaxws-handlers.xml"/>
- </webinf>
</war>
<war warfile="${build.test.dir}/libs/jbossws-addressing-replyto.war" webxml="${build.test.dir}/resources/addressing/replyto/ReplyTo-WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
@@ -387,6 +382,18 @@
</webinf>
</war>
+ <!-- jbossws-jaxws-handlerscope -->
+ <war warfile="${build.test.dir}/libs/jbossws-jaxws-handlerscope.war" webxml="${build.test.dir}/resources/jaxws/handlerscope/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointBean.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerscope/SOAPEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerscope/ServerHandler.class"/>
+ </classes>
+ <webinf dir="${build.test.dir}/resources/jaxws/handlerscope/WEB-INF">
+ <include name="jaxws-handlers.xml"/>
+ </webinf>
+ </war>
+
<!-- jbossws-jaxws-provider-jaxb -->
<war warfile="${build.test.dir}/libs/jbossws-jaxws-provider-jaxb.war" webxml="${build.test.dir}/resources/jaxws/provider/jaxb/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
@@ -1530,9 +1537,6 @@
<include name="org/jboss/test/ws/samples/wsaddressing/StatefulEndpoint.class"/>
<include name="org/jboss/test/ws/samples/wsaddressing/ServerHandler.class"/>
</classes>
- <webinf dir="${build.test.dir}/resources/samples/wsaddressing/WEB-INF">
- <include name="jaxws-handlers.xml"/>
- </webinf>
</war>
<!-- jbossws-samples-wssecurity-sign -->
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -31,6 +31,7 @@
import javax.xml.ws.ResponseWrapper;
import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.PortComponent;
/**
* WS-Addressing service endpoint
@@ -40,7 +41,7 @@
*/
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@WebService(name = "ActionDocEndpoint", targetNamespace = "http://org.jboss.ws/addressing/action", wsdlLocation = "WEB-INF/wsdl/ActionDocService.wsdl")
- at HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
+ at PortComponent(configName = "Standard WSAddressing Endpoint")
public class ActionDocEndpointImpl
{
// provide logging
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -23,12 +23,12 @@
//$Id$
-import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.PortComponent;
/**
* WS-Addressing service endpoint
@@ -38,7 +38,7 @@
*/
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebService(name="ActionRpcEndpoint", targetNamespace = "http://org.jboss.ws/addressing/action", wsdlLocation = "WEB-INF/wsdl/ActionRpcService.wsdl")
- at HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
+ at PortComponent(configName = "Standard WSAddressing Endpoint")
public class ActionRpcEndpointImpl
{
// provide logging
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/replyto/InitialEndpointImpl.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -23,13 +23,13 @@
//$Id$
-import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.PortComponent;
/**
* WS-Addressing service endpoint
@@ -39,7 +39,7 @@
*/
@SOAPBinding(style = Style.RPC)
@WebService(name = "InitialEndpoint", targetNamespace = "http://org.jboss.ws/addressing/replyto")
- at HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
+ at PortComponent(configName = "Standard WSAddressing Endpoint")
public class InitialEndpointImpl implements InitialEndpoint
{
// provide logging
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ClientHandler.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ClientHandler.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ClientHandler.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -40,11 +40,6 @@
*/
public class ClientHandler extends GenericSOAPHandler
{
- public ClientHandler(PortInfoImpl portInfo)
- {
- super(portInfo);
- }
-
public boolean handleOutbound(MessageContext msgContext)
{
try
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -24,14 +24,9 @@
// $Id: $
import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.HandlerResolver;
-import javax.xml.ws.handler.PortInfo;
import junit.framework.Test;
@@ -55,10 +50,10 @@
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-jaxws-handlerscope?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerscope", "SOAPEndpointService");
- QName portName = new QName("http://org.jboss.ws/jaxws/handlerscope", "SOAPEndpointPort");
Service service = Service.create(wsdlURL, serviceName);
SOAPEndpoint port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class);
+ /*
HandlerResolver handlerResolver = new HandlerResolver()
{
public List<Handler> getHandlerChain(PortInfo info)
@@ -73,9 +68,9 @@
}
};
service.setHandlerResolver(handlerResolver);
-
+ */
String retStr = port.echo("hello");
- assertEquals("hello", retStr);
+ assertEquals("hello:endpoint", retStr);
}
}
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointBean.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointBean.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointBean.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -23,6 +23,7 @@
// $Id: $
+import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@@ -33,6 +34,7 @@
@WebService(name = "SOAPEndpoint", targetNamespace = "http://org.jboss.ws/jaxws/handlerscope")
@BindingType(value = "http://www.w3.org/2003/05/soap/bindings/HTTP/") // SOAP-1.2
+ at HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
@SOAPBinding(style = Style.RPC)
public class SOAPEndpointBean implements SOAPEndpoint
{
Added: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ServerHandler.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ServerHandler.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ServerHandler.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.handlerscope;
+
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.ws.jaxws.handler.GenericSOAPHandler;
+
+/**
+ * A client side handler for the ws-addressing
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Nov-2005
+ */
+public class ServerHandler extends GenericSOAPHandler
+{
+ public boolean handleOutbound(MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+ SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
+ String value = soapElement.getValue();
+
+ String handlerName = getHandlerName();
+ soapElement.setValue(value + ":" + handlerName);
+
+ return true;
+ }
+ catch (SOAPException ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ public boolean handleInbound(MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+ SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
+ soapElement = (SOAPElement)soapElement.getChildElements().next();
+ String value = soapElement.getValue();
+
+ String handlerName = getHandlerName();
+ soapElement.setValue(value + ":" + handlerName);
+
+ return true;
+ }
+ catch (SOAPException ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+}
Property changes on: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ServerHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/jsr181ejb/EJB3Bean01.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/jsr181ejb/EJB3Bean01.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/jsr181ejb/EJB3Bean01.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -42,7 +42,7 @@
// standard JSR181 annotations
@WebService(name = "EndpointInterface", targetNamespace = "http://org.jboss.ws/samples/jsr181ejb", serviceName = "TestService")
- at HandlerChain(file = "resource://META-INF/jaxws-handlers.xml")
+ at PortComponent(authMethod="BASIC", transportGuarantee="NONE", configName = "Standard WSSecurity Endpoint")
@SOAPBinding(style = SOAPBinding.Style.RPC)
// standard EJB3 annotations
@@ -52,7 +52,6 @@
// jboss propriatary annotations
@RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
- at PortComponent(authMethod="BASIC", transportGuarantee="NONE")
@SecurityDomain("JBossWS")
public class EJB3Bean01 implements EJB3RemoteInterface
{
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/StatefulEndpointImpl.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/StatefulEndpointImpl.java 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/StatefulEndpointImpl.java 2006-08-13 12:51:55 UTC (rev 736)
@@ -38,6 +38,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.PortComponent;
/**
* WS-Addressing stateful service endpoint
@@ -46,8 +47,9 @@
* @since 24-Nov-2005
*/
@WebService(name = "StatefulEndpoint", targetNamespace = "http://org.jboss.ws/samples/wsaddressing", serviceName = "TestService")
+ at PortComponent(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
@SOAPBinding(style = SOAPBinding.Style.RPC)
- at HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
public class StatefulEndpointImpl implements StatefulEndpoint
{
// provide logging
Deleted: branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/jaxws-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/jaxws-handlers.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/resources/addressing/action/Doc-META-INF/jaxws-handlers.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee handler-chain.xsd">
-
- <handler-chain>
- <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
- <handler>
- <handler-name>WS-Addressing Handler</handler-name>
- <handler-class>org.jboss.ws.addressing.jaxws.WSAddressingServerHandler</handler-class>
- </handler>
- </handler-chain>
-</handler-chains>
\ No newline at end of file
Deleted: branches/tdiesler/trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxws-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxws-handlers.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxws-handlers.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee handler-chain.xsd">
-
- <handler-chain>
- <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
- <handler>
- <handler-name>WS-Addressing Handler</handler-name>
- <handler-class>org.jboss.ws.addressing.jaxws.WSAddressingServerHandler</handler-class>
- </handler>
- </handler-chain>
-</handler-chains>
\ No newline at end of file
Deleted: branches/tdiesler/trunk/src/test/resources/addressing/replyto/Initial-WEB-INF/jaxws-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/addressing/replyto/Initial-WEB-INF/jaxws-handlers.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/resources/addressing/replyto/Initial-WEB-INF/jaxws-handlers.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee handler-chain.xsd">
-
- <handler-chain>
- <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
- <handler>
- <handler-name>WS-Addressing Handler</handler-name>
- <handler-class>org.jboss.ws.addressing.jaxws.WSAddressingServerHandler</handler-class>
- </handler>
- </handler-chain>
-</handler-chains>
\ No newline at end of file
Added: branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/jaxws-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/jaxws-handlers.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/jaxws-handlers.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns1="http://org.jboss.ws/jaxws/handlerscope"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee handler-chain.xsd">
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+ <handler>
+ <handler-name> SOAP11Handler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <protocol-bindings>##SOAP12_HTTP</protocol-bindings>
+ <handler>
+ <handler-name> SOAP12Handler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP ##SOAP12_HTTP</protocol-bindings>
+ <handler>
+ <handler-name> SOAPHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <service-name-pattern>ns1:SOAPEndpointService</service-name-pattern>
+ <handler>
+ <handler-name> ServiceHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <service-name-pattern>ns1:SOAPEndpointSer*</service-name-pattern>
+ <handler>
+ <handler-name> ServiceWildcardHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <service-name-pattern>ns1:InvalidService</service-name-pattern>
+ <handler>
+ <handler-name> InvalidServiceHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <port-name-pattern>ns1:SOAPEndpointPort</port-name-pattern>
+ <handler>
+ <handler-name> PortHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <port-name-pattern>ns1:SOAPEndpointPo*</port-name-pattern>
+ <handler>
+ <handler-name> PortWildcardHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+ <handler-chain>
+ <port-name-pattern>ns1:InvalidPort</port-name-pattern>
+ <handler>
+ <handler-name> InvalidPortHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerscope.ServerHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+</handler-chains>
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/jaxws-handlers.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/web.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/web.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/web.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.handlerscope.SOAPEndpointBean</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: branches/tdiesler/trunk/src/test/resources/jaxws/handlerscope/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: branches/tdiesler/trunk/src/test/resources/samples/jsr181ejb/META-INF/jaxws-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/samples/jsr181ejb/META-INF/jaxws-handlers.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/resources/samples/jsr181ejb/META-INF/jaxws-handlers.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee handler-chain.xsd">
-
- <handler-chain>
- <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
- <handler>
- <handler-name>WSSecurityHandlerInbound</handler-name>
- <handler-class>org.jboss.ws.wsse.jaxws.WSSecurityHandlerInbound</handler-class>
- </handler>
- </handler-chain>
-</handler-chains>
\ No newline at end of file
Modified: branches/tdiesler/trunk/src/test/resources/samples/wsaddressing/WEB-INF/jaxws-handlers.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/samples/wsaddressing/WEB-INF/jaxws-handlers.xml 2006-08-13 11:11:25 UTC (rev 735)
+++ branches/tdiesler/trunk/src/test/resources/samples/wsaddressing/WEB-INF/jaxws-handlers.xml 2006-08-13 12:51:55 UTC (rev 736)
@@ -7,10 +7,6 @@
<handler-chain>
<protocol-bindings>##SOAP11_HTTP</protocol-bindings>
<handler>
- <handler-name>WS-Addressing Handler</handler-name>
- <handler-class>org.jboss.ws.addressing.jaxws.WSAddressingServerHandler</handler-class>
- </handler>
- <handler>
<handler-name>Application Server Handler</handler-name>
<handler-class>org.jboss.test.ws.samples.wsaddressing.ServerHandler</handler-class>
</handler>
More information about the jboss-svn-commits
mailing list