JBossWS SVN: r6474 - in spi/trunk: .settings and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-17 14:12:18 -0400 (Thu, 17 Apr 2008)
New Revision: 6474
Added:
spi/trunk/.settings/
spi/trunk/.settings/org.maven.ide.eclipse.prefs
Modified:
spi/trunk/.classpath
spi/trunk/.project
Log:
Add maven eclipse integration
Modified: spi/trunk/.classpath
===================================================================
--- spi/trunk/.classpath 2008-04-17 17:37:30 UTC (rev 6473)
+++ spi/trunk/.classpath 2008-04-17 18:12:18 UTC (rev 6474)
@@ -1,18 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/test/java">
+ <attributes>
+ <attribute name="maven.type" value="test"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/gnu-getopt/getopt/1.0.13/getopt-1.0.13.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta11/jboss-kernel-2.0.0.Beta11.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR7/jbossxb-2.0.0.CR7.jar"/>
- <classpathentry kind="output" path="target/eclipse"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/eclipse/classes"/>
</classpath>
Modified: spi/trunk/.project
===================================================================
--- spi/trunk/.project 2008-04-17 17:37:30 UTC (rev 6473)
+++ spi/trunk/.project 2008-04-17 18:12:18 UTC (rev 6474)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>spi</name>
+ <name>jbossws-spi</name>
<comment></comment>
<projects>
</projects>
@@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Added: spi/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- spi/trunk/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ spi/trunk/.settings/org.maven.ide.eclipse.prefs 2008-04-17 18:12:18 UTC (rev 6474)
@@ -0,0 +1,9 @@
+#Thu Apr 17 20:06:11 CEST 2008
+activeProfiles=
+eclipse.preferences.version=1
+filterResources=false
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+useMavenFolders=false
+version=1
16 years, 9 months
JBossWS SVN: r6473 - stack/metro/trunk/src/test/resources.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-17 13:37:30 -0400 (Thu, 17 Apr 2008)
New Revision: 6473
Modified:
stack/metro/trunk/src/test/resources/test-excludes-jboss422.txt
stack/metro/trunk/src/test/resources/test-excludes-jboss423.txt
stack/metro/trunk/src/test/resources/test-excludes-jboss500.txt
stack/metro/trunk/src/test/resources/test-excludes-jboss501.txt
Log:
[JBWS-1178] Multiple virtual host and soap:address problem
Modified: stack/metro/trunk/src/test/resources/test-excludes-jboss422.txt
===================================================================
--- stack/metro/trunk/src/test/resources/test-excludes-jboss422.txt 2008-04-17 17:35:44 UTC (rev 6472)
+++ stack/metro/trunk/src/test/resources/test-excludes-jboss422.txt 2008-04-17 17:37:30 UTC (rev 6473)
@@ -2,6 +2,9 @@
# $Id: test-excludes.txt 3907 2007-07-17 12:55:40Z thomas.diesler(a)jboss.com $
#
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1674] Fix @WebServiceRef with Metro
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/webserviceref/**
Modified: stack/metro/trunk/src/test/resources/test-excludes-jboss423.txt
===================================================================
--- stack/metro/trunk/src/test/resources/test-excludes-jboss423.txt 2008-04-17 17:35:44 UTC (rev 6472)
+++ stack/metro/trunk/src/test/resources/test-excludes-jboss423.txt 2008-04-17 17:37:30 UTC (rev 6473)
@@ -2,6 +2,9 @@
# $Id$
#
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1674] Fix @WebServiceRef with Metro
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/webserviceref/**
Modified: stack/metro/trunk/src/test/resources/test-excludes-jboss500.txt
===================================================================
--- stack/metro/trunk/src/test/resources/test-excludes-jboss500.txt 2008-04-17 17:35:44 UTC (rev 6472)
+++ stack/metro/trunk/src/test/resources/test-excludes-jboss500.txt 2008-04-17 17:37:30 UTC (rev 6473)
@@ -5,6 +5,9 @@
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1673] Fix JAXR samples for Metro
org/jboss/test/ws/jaxws/samples/jaxr/**
Modified: stack/metro/trunk/src/test/resources/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/src/test/resources/test-excludes-jboss501.txt 2008-04-17 17:35:44 UTC (rev 6472)
+++ stack/metro/trunk/src/test/resources/test-excludes-jboss501.txt 2008-04-17 17:37:30 UTC (rev 6473)
@@ -8,6 +8,9 @@
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1673] Fix JAXR samples for Metro
org/jboss/test/ws/jaxws/samples/jaxr/**
16 years, 9 months
JBossWS SVN: r6472 - stack/cxf/trunk/src/test/resources.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-17 13:35:44 -0400 (Thu, 17 Apr 2008)
New Revision: 6472
Modified:
stack/cxf/trunk/src/test/resources/test-excludes-jboss422.txt
stack/cxf/trunk/src/test/resources/test-excludes-jboss423.txt
stack/cxf/trunk/src/test/resources/test-excludes-jboss500.txt
stack/cxf/trunk/src/test/resources/test-excludes-jboss501.txt
Log:
[JBWS-1178] Multiple virtual host and soap:address problem
Modified: stack/cxf/trunk/src/test/resources/test-excludes-jboss422.txt
===================================================================
--- stack/cxf/trunk/src/test/resources/test-excludes-jboss422.txt 2008-04-17 14:49:16 UTC (rev 6471)
+++ stack/cxf/trunk/src/test/resources/test-excludes-jboss422.txt 2008-04-17 17:35:44 UTC (rev 6472)
@@ -9,6 +9,9 @@
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/webserviceref/**
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1774] Provide tools implementation for CXF
org/jboss/test/ws/jaxws/complex/**
org/jboss/test/ws/jaxws/holder/**
Modified: stack/cxf/trunk/src/test/resources/test-excludes-jboss423.txt
===================================================================
--- stack/cxf/trunk/src/test/resources/test-excludes-jboss423.txt 2008-04-17 14:49:16 UTC (rev 6471)
+++ stack/cxf/trunk/src/test/resources/test-excludes-jboss423.txt 2008-04-17 17:35:44 UTC (rev 6472)
@@ -9,6 +9,9 @@
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/webserviceref/**
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1774] Provide tools implementation for CXF
org/jboss/test/ws/jaxws/complex/**
org/jboss/test/ws/jaxws/holder/**
Modified: stack/cxf/trunk/src/test/resources/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/src/test/resources/test-excludes-jboss500.txt 2008-04-17 14:49:16 UTC (rev 6471)
+++ stack/cxf/trunk/src/test/resources/test-excludes-jboss500.txt 2008-04-17 17:35:44 UTC (rev 6472)
@@ -5,6 +5,9 @@
# Won't Fix: [CXF-1261] Handler does not see XOP message properly
org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.*
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1774] Provide tools implementation for CXF
org/jboss/test/ws/jaxws/complex/**
org/jboss/test/ws/jaxws/holder/**
Modified: stack/cxf/trunk/src/test/resources/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/src/test/resources/test-excludes-jboss501.txt 2008-04-17 14:49:16 UTC (rev 6471)
+++ stack/cxf/trunk/src/test/resources/test-excludes-jboss501.txt 2008-04-17 17:35:44 UTC (rev 6472)
@@ -5,6 +5,9 @@
# Won't Fix: [CXF-1261] Handler does not see XOP message properly
org/jboss/test/ws/jaxws/samples/xop/doclit/XOPHandlerTestCase.*
+# [JBWS-1178] Multiple virtual host and soap:address problem
+org/jboss/test/ws/jaxws/jbws1178/**
+
# [JBWS-1774] Provide tools implementation for CXF
org/jboss/test/ws/jaxws/complex/**
org/jboss/test/ws/jaxws/holder/**
16 years, 9 months
JBossWS SVN: r6471 - stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-04-17 10:49:16 -0400 (Thu, 17 Apr 2008)
New Revision: 6471
Modified:
stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java
Log:
refactoring - no functional change
Modified: stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java
===================================================================
--- stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java 2008-04-17 14:32:47 UTC (rev 6470)
+++ stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/ServletControllerExt.java 2008-04-17 14:49:16 UTC (rev 6471)
@@ -53,88 +53,110 @@
{
private static Logger log = Logger.getLogger(ServletControllerExt.class);
- private ServletTransportFactory transport;
+ private ServletTransportFactory cxfTransport;
private CXFServlet cxfServlet;
- public ServletControllerExt(ServletTransportFactory transport, CXFServlet servlet)
+ public ServletControllerExt(ServletTransportFactory cxfTransport, CXFServlet cxfServlet)
{
- super(transport, servlet);
- this.transport = transport;
- this.cxfServlet = servlet;
+ super(cxfTransport, cxfServlet);
+ this.cxfTransport = cxfTransport;
+ this.cxfServlet = cxfServlet;
}
-
- public void invoke(HttpServletRequest req, HttpServletResponse res) throws ServletException
+
+ /**
+ * Finds destination based on request URI
+ * @param requestURI to be recognized
+ * @return destination associated with the request URI
+ * @throws ServletException when destination wasn't found
+ */
+ private ServletDestination findDestination(HttpServletRequest req) throws ServletException
{
- try
+ // Find destination based on request URI
+ String requestURI = req.getRequestURI();
+ Collection<ServletDestination> destinations = cxfTransport.getDestinations();
+ for (ServletDestination destination : destinations)
{
- // Find destination based on request URI
- String requestURI = req.getRequestURI();
- ServletDestination dest = null;
- Collection<ServletDestination> destinations = transport.getDestinations();
- for (ServletDestination aux : destinations)
+ EndpointInfo endpointInfo = destination.getEndpointInfo();
+ String address = endpointInfo.getAddress();
+
+ // Fix invalid leading slash
+ if (address.startsWith("/http://"))
{
- EndpointInfo ei = aux.getEndpointInfo();
- String address = ei.getAddress();
-
- // Fix invalid leading slash
- if (address.startsWith("/http://"))
- {
- address = address.substring(1);
- ei.setAddress(address);
- }
-
- String path = address;
- try
- {
- path = new URL(address).getPath();
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- if (requestURI.startsWith(path))
- {
- dest = aux;
- break;
- }
+ address = address.substring(1);
+ endpointInfo.setAddress(address);
}
- if (dest == null)
- throw new ServletException("Cannot obtain destination for: " + requestURI);
+
+ String path = address;
+ try
+ {
+ path = new URL(address).getPath();
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ if (requestURI.startsWith(path))
+ {
+ return destination;
+ }
+ }
- EndpointInfo ei = dest.getEndpointInfo();
- Bus bus = cxfServlet.getBus();
- if (null != req.getQueryString() && req.getQueryString().length() > 0 && bus.getExtension(QueryHandlerRegistry.class) != null)
+ throw new ServletException("Cannot obtain destination for: " + requestURI);
+ }
+
+ /**
+ * When request includes query it tries to lookup the query handler and tries to handle the request message
+ * @param req request
+ * @param res response
+ * @param dest destination
+ * @return true if there was a query handler that successfully handled the request, false otherwise
+ * @throws ServletException if some problem occurs
+ */
+ private boolean handleQuery(HttpServletRequest req, HttpServletResponse res, ServletDestination dest)
+ throws ServletException
+ {
+ Bus bus = cxfServlet.getBus();
+ boolean hasQuery = (null != req.getQueryString()) && (req.getQueryString().length() > 0);
+ boolean queryHandlerRegistryExists = bus.getExtension(QueryHandlerRegistry.class) != null;
+
+ if (hasQuery && queryHandlerRegistryExists)
+ {
+ String ctxUri = req.getRequestURI();
+ String baseUri = req.getRequestURL().toString() + "?" + req.getQueryString();
+ EndpointInfo endpointInfo = dest.getEndpointInfo();
+
+ for (QueryHandler queryHandler : bus.getExtension(QueryHandlerRegistry.class).getHandlers())
{
- String ctxUri = requestURI; //req.getPathInfo();
- String baseUri = req.getRequestURL().toString() + "?" + req.getQueryString();
-
- for (QueryHandler qh : bus.getExtension(QueryHandlerRegistry.class).getHandlers())
+ if (queryHandler.isRecognizedQuery(baseUri, ctxUri, endpointInfo))
{
- if (qh.isRecognizedQuery(baseUri, ctxUri, ei))
+ res.setContentType(queryHandler.getResponseContentType(baseUri, ctxUri));
+ try
{
-
- res.setContentType(qh.getResponseContentType(baseUri, ctxUri));
OutputStream out = res.getOutputStream();
- try
- {
- qh.writeResponse(baseUri, ctxUri, ei, out);
- out.flush();
- return;
- }
- catch (Exception e)
- {
- throw new ServletException(e);
- }
+ queryHandler.writeResponse(baseUri, ctxUri, endpointInfo, out);
+ out.flush();
+ return true;
}
+ catch (Exception e)
+ {
+ throw new ServletException(e);
+ }
}
}
+ }
+
+ return false;
+ }
+ public void invoke(HttpServletRequest req, HttpServletResponse res) throws ServletException
+ {
+ ServletDestination dest = findDestination(req);
+ boolean requestHandled = handleQuery(req, res, dest);
+
+ if (false == requestHandled)
+ {
invokeDestination(req, res, dest);
}
- catch (IOException e)
- {
- throw new ServletException(e);
- }
}
}
16 years, 9 months
JBossWS SVN: r6470 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP: src/main/java/org/jboss/ws/extensions/security and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-04-17 10:32:47 -0400 (Thu, 17 Apr 2008)
New Revision: 6470
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/wstools-config.xml
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/wstools-config.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxrpc.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
Log:
[JBPAPP-792] Add support for a configurable time tolerance value that handles clock skew.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxrpc.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxrpc.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxrpc.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -2398,7 +2398,35 @@
<include name="jaxrpc-mapping.xml"/>
</metainf>
</jar>
-
+
+ <!-- jaxrpc-jbws1316 -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1316.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1316/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1316/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/jbws1316/*TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxrpc/jbws1316/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="jboss-wsse-server.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${tests.output.dir}/libs/jaxrpc-jbws1316-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1316/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/jbws1316/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxrpc/jbws1316/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxrpc/jbws1316/WEB-INF">
+ <include name="wsdl/**"/>
+ <include name="jaxrpc-mapping.xml"/>
+ </metainf>
+ </jar>
+
<!-- jaxrpc-jbws1378 -->
<war warfile="${tests.output.dir}/libs/jaxrpc-jbws1378.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1378/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -34,6 +34,7 @@
import org.jboss.ws.extensions.security.element.Timestamp;
import org.jboss.ws.extensions.security.element.Token;
import org.jboss.ws.extensions.security.element.UsernameToken;
+import org.jboss.ws.metadata.wsse.TimestampVerification;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -52,15 +53,19 @@
private Document message;
private SecurityStore store;
+
+ private TimestampVerification timestampVerification;
private HashSet<String> signedIds = new HashSet<String>();
private HashSet<String> encryptedIds = new HashSet<String>();
- public SecurityDecoder(SecurityStore store)
+
+ public SecurityDecoder(SecurityStore store, TimestampVerification timestampVerification)
{
org.apache.xml.security.Init.init();
this.store = store;
+ this.timestampVerification = timestampVerification;
}
/**
@@ -70,9 +75,10 @@
* @param SecurityStore the security store that contains key and trust information
* @param now The timestamp to use as the current time when validating a message expiration
*/
- public SecurityDecoder(SecurityStore store, Calendar now)
+
+ public SecurityDecoder(SecurityStore store, Calendar now, TimestampVerification timestampVerification)
{
- this(store);
+ this(store, timestampVerification);
this.now = now;
}
@@ -99,7 +105,7 @@
if (timestamp != null)
{
TimestampVerificationOperation operation =
- (now == null) ? new TimestampVerificationOperation() : new TimestampVerificationOperation(now);
+ (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
operation.process(message, timestamp);
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -23,16 +23,22 @@
import java.util.Calendar;
+import org.jboss.logging.Logger;
import org.jboss.ws.extensions.security.element.Timestamp;
+import org.jboss.ws.metadata.wsse.TimestampVerification;
import org.w3c.dom.Document;
-
public class TimestampVerificationOperation
{
+ private static final Logger log = Logger.getLogger(TimestampVerificationOperation.class);
+
+ private TimestampVerification timestampVerification;
+
private Calendar now = null;
- public TimestampVerificationOperation()
+ public TimestampVerificationOperation(TimestampVerification timestampVerification)
{
+ this.timestampVerification = timestampVerification;
}
/**
@@ -48,14 +54,48 @@
public void process(Document message, Timestamp timestamp) throws WSSecurityException
{
- Calendar expired = timestamp.getExpires();
+ Calendar expires = timestamp.getExpires();
Calendar created = timestamp.getCreated();
+
Calendar now = (this.now == null) ? Calendar.getInstance() : this.now;
- if (created.after(now))
+ boolean rejectCreated = created.after(now);
+ if (rejectCreated && timestampVerification != null && timestampVerification.getCreatedTolerance() > 0)
+ {
+ Calendar tolerantCreatedNow = (Calendar)now.clone();
+ tolerantCreatedNow.add(Calendar.SECOND, (int)timestampVerification.getCreatedTolerance());
+
+ rejectCreated = created.after(tolerantCreatedNow);
+
+ if (rejectCreated == false && timestampVerification.isWarnCreated())
+ {
+ log.warn("Accepting Timestamp with 'Created' after now but within configured tolerance.");
+ }
+ }
+
+ if (rejectCreated)
+ {
throw new WSSecurityException("Invalid timestamp, message claimed to be created after now");
+ }
- if (expired != null && ! now.before(expired))
+ boolean rejectExpires = expires != null && !now.before(expires);
+ if (rejectExpires && timestampVerification != null && timestampVerification.getExpiresTolerance() > 0)
+ {
+ Calendar tolerantExpiresNow = (Calendar)now.clone();
+ tolerantExpiresNow.add(Calendar.SECOND, (int)timestampVerification.getExpiresTolerance() * -1);
+
+ rejectExpires = !tolerantExpiresNow.before(expires);
+
+ if (rejectExpires == false && timestampVerification.isWarnExpires())
+ {
+ log.warn("Accepting Timestamp with 'Expires' in past but within configured tolerance.");
+ }
+ }
+
+ if (rejectExpires)
+ {
throw new FailedCheckException("Expired message.");
+ }
+
}
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -142,7 +142,7 @@
{
SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(), config.getTrustStoreURL(),
config.getTrustStoreType(), config.getTrustStorePassword());
- SecurityDecoder decoder = new SecurityDecoder(securityStore);
+ SecurityDecoder decoder = new SecurityDecoder(securityStore, config.getTimestampVerification());
decoder.decode(soapMessage.getSOAPPart(), secHeaderElement);
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * Represents the "timestamp-verification" tag.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class TimestampVerification implements Serializable
+{
+
+ private static final long serialVersionUID = -1097288149565604697L;
+
+ private long createdTolerance;
+
+ private boolean warnCreated;
+
+ private long expiresTolerance;
+
+ private boolean warnExpires;
+
+ public TimestampVerification(long createdTolerance, boolean warnCreated, long expiresTolerance, boolean warnExpires)
+ {
+ this.createdTolerance = createdTolerance;
+ this.warnCreated = warnCreated;
+ this.expiresTolerance = expiresTolerance;
+ this.warnExpires = warnExpires;
+ }
+
+ public long getCreatedTolerance()
+ {
+ return createdTolerance;
+ }
+
+ public void setCreatedTolerance(long createdTolerance)
+ {
+ this.createdTolerance = createdTolerance;
+ }
+
+ public boolean isWarnCreated()
+ {
+ return warnCreated;
+ }
+
+ public void setWarnCreated(boolean warnCreated)
+ {
+ this.warnCreated = warnCreated;
+ }
+
+ public long getExpiresTolerance()
+ {
+ return expiresTolerance;
+ }
+
+ public void setExpiresTolerance(long expiresTolerance)
+ {
+ this.expiresTolerance = expiresTolerance;
+ }
+
+ public boolean isWarnExpires()
+ {
+ return warnExpires;
+ }
+
+ public void setWarnExpires(boolean warnExpires)
+ {
+ this.warnExpires = warnExpires;
+ }
+
+}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -46,6 +46,7 @@
private String trustStoreType;
private String trustStorePassword;
private HashMap<String, String> keyPasswords = new HashMap<String, String>();
+ private TimestampVerification timestampVerification;
public WSSecurityConfiguration()
{
@@ -165,4 +166,15 @@
{
this.keyPasswords = keyPasswords;
}
+
+ public TimestampVerification getTimestampVerification()
+ {
+ return timestampVerification;
+ }
+
+ public void setTimestampVerification(TimestampVerification timestampVerification)
+ {
+ this.timestampVerification = timestampVerification;
+ }
+
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -178,6 +178,34 @@
{
return new Port(attrs.getValue("", "name"));
}
+ if ("timestamp-verification".equals(localName))
+ {
+ //By default, the createdTolerance should be '0'
+ Long createdTolerance = new Long(0);
+ String createdToleranceAttr = attrs.getValue("", "createdTolerance");
+ if (createdToleranceAttr != null)
+ createdTolerance = (Long)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_LONG_NAME, createdToleranceAttr, null);
+
+ //By default, we do log warnings if the tolerance is used.
+ Boolean warnCreated = new Boolean(true);
+ String warnCreatedAttr = attrs.getValue("", "warnCreated");
+ if (warnCreatedAttr != null)
+ warnCreated = (Boolean)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, warnCreatedAttr, null);
+
+ //By default, the expiresTolerance should be '0'
+ Long expiresTolerance = new Long(0);
+ String expiresToleranceAttr = attrs.getValue("", "expiresTolerance");
+ if (expiresToleranceAttr != null)
+ expiresTolerance = (Long)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_LONG_NAME, expiresToleranceAttr, null);
+
+ //By default, we do log warnings if the tolerance is used.
+ Boolean warnExpires = new Boolean(true);
+ String warnExpiresAttr = attrs.getValue("", "warnExpires");
+ if (warnExpiresAttr != null)
+ warnExpires = (Boolean)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, warnExpiresAttr, null);
+
+ return new TimestampVerification(createdTolerance, warnCreated, expiresTolerance, warnExpires);
+ }
return null;
}
@@ -215,6 +243,16 @@
}
/**
+ * Called when parsing TimestampVerification is complete.
+ */
+ public void addChild(WSSecurityConfiguration configuration, TimestampVerification timestampVerification, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
+ {
+ log.trace("addChild: [obj=" + configuration + ",child=" + timestampVerification + "]");
+ configuration.setTimestampVerification(timestampVerification);
+ }
+
+ /**
* Called when parsing of a new element started.
*/
public Object newChild(Config config, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd 2008-04-17 14:32:47 UTC (rev 6470)
@@ -38,6 +38,11 @@
<xs:documentation>The passwords for the private keys in the keystore. Only required if the passwords are different from that of the keystore.</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="timestamp-verification" type="timestampVerificationType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The tolerances and logging required when verifying the 'created' and 'expires' value of the timestamps.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
<xs:element name="config" type="configType" minOccurs="0">
<xs:annotation>
<xs:documentation>The default security configuration that is applied to all operations on all ports. This is only used if there is no port/operation config.</xs:documentation>
@@ -72,6 +77,28 @@
</xs:annotation>
</xs:attribute>
</xs:complexType>
+ <xs:complexType name="timestampVerificationType">
+ <xs:attribute name="createdTolerance" type="xs:long" use="optional">
+ <xs:annotation>
+ <xs:documentation>The number of seconds in the future the created value on a message will be accepted.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="warnCreated" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specifies if a WARN should be logged if a message in the future is accepted within the configured 'createdTolerance'.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="expiresTolerance" type="xs:long" use="optional">
+ <xs:annotation>
+ <xs:documentation>The number of seconds tolerance when checking the expires value of the timestamp.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="warnExpires" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specifies if a WARN should be logged if an expired message is accepted that is within the 'expiresTolerance'.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
<xs:complexType name="configType" mixed="true">
<xs:all>
<xs:element name="timestamp" type="timestampType" minOccurs="0">
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316 (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,136 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.rmi.RemoteException;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-import javax.xml.rpc.Stub;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Test case to test reading the TimestampVerification configuration.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class JBWS1316CallTestCase extends JBossWSTest
-{
-
- private static final String MESSAGE = "Hello JBWS1316!!";
-
- private static TestEndpoint port;
-
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1316CallTestCase.class, "jaxrpc-jbws1316.war, jaxrpc-jbws1316-client.jar");
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
- if (port == null)
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
- }
- }
-
- /**
- * Test that a message without a wsse:Security header is rejected.
- *
- * @throws Exception
- */
- public void testCall_NoSecurity() throws Exception
- {
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, null);
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, null);
-
- try
- {
- port.echoMessage(MESSAGE);
- fail("Call should have failed due to no wsse:Security.");
- }
- catch (RemoteException e)
- {
- assertTrue(e.getMessage().contains("[InvalidSecurity]"));
- }
- }
-
- public void testCall_ValidTimestamp() throws Exception
- {
- long started = System.currentTimeMillis();
-
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(10));
-
- String response = port.echoMessage(MESSAGE);
- assertEquals("Expected Response", MESSAGE, response);
-
- long finished = System.currentTimeMillis();
- long duration = finished - started;
- assertTrue("Execution time less than 10s", duration < 10000);
- }
-
- public void testCall_FutureTimestamp() throws Exception
- {
- long started = System.currentTimeMillis();
-
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(10));
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(20));
-
- String response = port.echoMessage(MESSAGE);
- assertEquals("Expected Response", MESSAGE, response);
-
- long finished = System.currentTimeMillis();
- long duration = finished - started;
- assertTrue("Execution time less than 10s", duration < 10000);
- }
-
- public void testCall_PastExpires() throws Exception
- {
- long started = System.currentTimeMillis();
-
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(-5));
-
- String response = port.echoMessage(MESSAGE);
- assertEquals("Expected Response", MESSAGE, response);
-
- long finished = System.currentTimeMillis();
- long duration = finished - started;
- assertTrue("Execution time less than 10s", duration < 10000);
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,136 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.rmi.RemoteException;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test case to test reading the TimestampVerification configuration.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class JBWS1316CallTestCase extends JBossWSTest
+{
+
+ private static final String MESSAGE = "Hello JBWS1316!!";
+
+ private static TestEndpoint port;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1316CallTestCase.class, "jaxrpc-jbws1316.war, jaxrpc-jbws1316-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ }
+
+ /**
+ * Test that a message without a wsse:Security header is rejected.
+ *
+ * @throws Exception
+ */
+ public void testCall_NoSecurity() throws Exception
+ {
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, null);
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, null);
+
+ try
+ {
+ port.echoMessage(MESSAGE);
+ fail("Call should have failed due to no wsse:Security.");
+ }
+ catch (RemoteException e)
+ {
+ assertTrue(e.getMessage().contains("[InvalidSecurity]"));
+ }
+ }
+
+ public void testCall_ValidTimestamp() throws Exception
+ {
+ long started = System.currentTimeMillis();
+
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(10));
+
+ String response = port.echoMessage(MESSAGE);
+ assertEquals("Expected Response", MESSAGE, response);
+
+ long finished = System.currentTimeMillis();
+ long duration = finished - started;
+ assertTrue("Execution time less than 10s", duration < 10000);
+ }
+
+ public void testCall_FutureTimestamp() throws Exception
+ {
+ long started = System.currentTimeMillis();
+
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(10));
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(20));
+
+ String response = port.echoMessage(MESSAGE);
+ assertEquals("Expected Response", MESSAGE, response);
+
+ long finished = System.currentTimeMillis();
+ long duration = finished - started;
+ assertTrue("Execution time less than 10s", duration < 10000);
+ }
+
+ public void testCall_PastExpires() throws Exception
+ {
+ long started = System.currentTimeMillis();
+
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(-5));
+
+ String response = port.echoMessage(MESSAGE);
+ assertEquals("Expected Response", MESSAGE, response);
+
+ long finished = System.currentTimeMillis();
+ long duration = finished - started;
+ assertTrue("Execution time less than 10s", duration < 10000);
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,103 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.jboss.ws.metadata.wsse.TimestampVerification;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * Test case to test reading the TimestampVerification configuration.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class JBWS1316ConfigurationTestCase extends JBossWSTest
-{
-
- private WSSecurityConfiguration load(final String fileName) throws IOException
- {
- File configFile = new File("resources/jaxrpc/jbws1316/config/" + fileName);
- WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
-
- return factory.parse(configFile.toURL());
- }
-
- /**
- * Test loading a wsse configuration with no timestamp-verification
- * element.
- *
- * This test case verifies that no TimestampVerification will be set
- * and matches the scenario that would be encountered when reading
- * existing descriptors.
- */
- public void testLoadNoTimestampVerification() throws Exception
- {
- WSSecurityConfiguration config = load("jboss-wsse-no-tv.xml");
- assertNull("No TimestampVerification expected.", config.getTimestampVerification());
- }
-
- /**
- * Test loading a wsse configuration with an empty timestamp-verification
- * element.
- *
- * This test case verifies the default values that will be used when missing from
- * the timestamp-verification element.
- */
- public void testLoadEmptyTimestampVerification() throws Exception
- {
- WSSecurityConfiguration config = load("jboss-wsse-empty-tv.xml");
- assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
-
- TimestampVerification tv = config.getTimestampVerification();
- assertEquals("Expected 'createdTolerance' to be '0'", 0, tv.getCreatedTolerance());
- assertTrue("Expected 'warnCreated' to default to 'true'", tv.isWarnCreated());
- assertEquals("Expected 'expiresTolerance' to be '0'", 0, tv.getExpiresTolerance());
- assertTrue("Expected 'warnExpires' to default to 'true'", tv.isWarnExpires());
- }
-
- /**
- * Test loading a wsse configuration with a full timestamp-verification
- * element.
- *
- * This test case verifies all the values are correctly loaded from the
- * timestamp-verification element.
- */
- public void testLoadFullTimestampVerification() throws Exception
- {
- WSSecurityConfiguration config = load("jboss-wsse-full-tv.xml");
- assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
-
- TimestampVerification tv = config.getTimestampVerification();
- assertEquals("Expected 'createdTolerance' to be '5'", 5, tv.getCreatedTolerance());
- assertFalse("Expected 'warnCreated' to default to 'false'", tv.isWarnCreated());
- assertEquals("Expected 'expiresTolerance' to be '10'", 10, tv.getExpiresTolerance());
- assertFalse("Expected 'warnExpires' to default to 'false'", tv.isWarnExpires());
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.jboss.ws.metadata.wsse.TimestampVerification;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Test case to test reading the TimestampVerification configuration.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class JBWS1316ConfigurationTestCase extends JBossWSTest
+{
+
+ private WSSecurityConfiguration load(final String fileName) throws IOException
+ {
+ File configFile = new File("resources/jaxrpc/jbws1316/config/" + fileName);
+ WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
+
+ return factory.parse(configFile.toURL());
+ }
+
+ /**
+ * Test loading a wsse configuration with no timestamp-verification
+ * element.
+ *
+ * This test case verifies that no TimestampVerification will be set
+ * and matches the scenario that would be encountered when reading
+ * existing descriptors.
+ */
+ public void testLoadNoTimestampVerification() throws Exception
+ {
+ WSSecurityConfiguration config = load("jboss-wsse-no-tv.xml");
+ assertNull("No TimestampVerification expected.", config.getTimestampVerification());
+ }
+
+ /**
+ * Test loading a wsse configuration with an empty timestamp-verification
+ * element.
+ *
+ * This test case verifies the default values that will be used when missing from
+ * the timestamp-verification element.
+ */
+ public void testLoadEmptyTimestampVerification() throws Exception
+ {
+ WSSecurityConfiguration config = load("jboss-wsse-empty-tv.xml");
+ assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
+
+ TimestampVerification tv = config.getTimestampVerification();
+ assertEquals("Expected 'createdTolerance' to be '0'", 0, tv.getCreatedTolerance());
+ assertTrue("Expected 'warnCreated' to default to 'true'", tv.isWarnCreated());
+ assertEquals("Expected 'expiresTolerance' to be '0'", 0, tv.getExpiresTolerance());
+ assertTrue("Expected 'warnExpires' to default to 'true'", tv.isWarnExpires());
+ }
+
+ /**
+ * Test loading a wsse configuration with a full timestamp-verification
+ * element.
+ *
+ * This test case verifies all the values are correctly loaded from the
+ * timestamp-verification element.
+ */
+ public void testLoadFullTimestampVerification() throws Exception
+ {
+ WSSecurityConfiguration config = load("jboss-wsse-full-tv.xml");
+ assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
+
+ TimestampVerification tv = config.getTimestampVerification();
+ assertEquals("Expected 'createdTolerance' to be '5'", 5, tv.getCreatedTolerance());
+ assertFalse("Expected 'warnCreated' to default to 'false'", tv.isWarnCreated());
+ assertEquals("Expected 'expiresTolerance' to be '10'", 10, tv.getExpiresTolerance());
+ assertFalse("Expected 'warnExpires' to default to 'false'", tv.isWarnExpires());
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * Simple TestEndpoint to test the handling to WSSE timestamps.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public interface TestEndpoint extends Remote
-{
-
- public String echoMessage(final String message) throws RemoteException;
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * Simple TestEndpoint to test the handling to WSSE timestamps.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoMessage(final String message) throws RemoteException;
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-/**
- * Simple TestEndpoint to test the handling to WSSE timestamps.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class TestEndpointImpl implements TestEndpoint
-{
-
- public String echoMessage(String message)
- {
- return message;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+/**
+ * Simple TestEndpoint to test the handling to WSSE timestamps.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public String echoMessage(String message)
+ {
+ return message;
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,115 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.MessageContext;
-
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.extensions.security.Constants;
-import org.jboss.ws.extensions.security.Util;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Simple handler to add wsse:Security and Timestamp to header in controlled
- * way to test JBWS-1316 implementation.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class TestSecurityHandler extends GenericHandler
-{
-
- public static final String JBWS1316_CREATED = "jbws1316.created";
-
- public static final String JBWS1316_EXPIRES = "jbws1316.expires";
-
- @Override
- public boolean handleRequest(MessageContext msgContext)
- {
- Integer createdValue = (Integer)msgContext.getProperty(JBWS1316_CREATED);
- Integer expiresValue = (Integer)msgContext.getProperty(JBWS1316_EXPIRES);
-
- // Created is bare minimum to add the header.
- if (createdValue == null)
- {
- return super.handleRequest(msgContext);
- }
-
- Calendar baseCalendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
-
- Calendar createdCalendar = (Calendar)baseCalendar.clone();
- createdCalendar.add(Calendar.SECOND, createdValue);
-
- Calendar expiresCalendar = null;
-
- if (expiresValue != null)
- {
- expiresCalendar = (Calendar)baseCalendar.clone();
- expiresCalendar.add(Calendar.SECOND, expiresValue);
- }
-
- CommonMessageContext ctx = (CommonMessageContext)msgContext;
- SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
- Document message = soapMessage.getSOAPPart();
-
- Element soapHeader = Util.findOrCreateSoapHeader(message.getDocumentElement());
-
- Element wsseSecurityElement = message.createElementNS(Constants.WSSE_NS, Constants.WSSE_HEADER);
- Util.addNamespace(wsseSecurityElement, Constants.WSSE_PREFIX, Constants.WSSE_NS);
- Util.addNamespace(wsseSecurityElement, Constants.WSU_PREFIX, Constants.WSU_NS);
-
- Element wsseTimestampElement = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Timestamp");
- wsseTimestampElement.setAttributeNS(Constants.WSU_NS, Constants.WSU_ID, "timestamp");
- Element child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Created");
- child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(createdCalendar)));
- wsseTimestampElement.appendChild(child);
- if (expiresCalendar != null)
- {
- child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Expires");
- child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(expiresCalendar)));
- wsseTimestampElement.appendChild(child);
- }
- wsseSecurityElement.appendChild(wsseTimestampElement);
-
- soapHeader.insertBefore(wsseSecurityElement, soapHeader.getFirstChild());
-
- return true;
- }
-
- @Override
- public QName[] getHeaders()
- {
- return null;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,115 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.extensions.security.Constants;
+import org.jboss.ws.extensions.security.Util;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Simple handler to add wsse:Security and Timestamp to header in controlled
+ * way to test JBWS-1316 implementation.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class TestSecurityHandler extends GenericHandler
+{
+
+ public static final String JBWS1316_CREATED = "jbws1316.created";
+
+ public static final String JBWS1316_EXPIRES = "jbws1316.expires";
+
+ @Override
+ public boolean handleRequest(MessageContext msgContext)
+ {
+ Integer createdValue = (Integer)msgContext.getProperty(JBWS1316_CREATED);
+ Integer expiresValue = (Integer)msgContext.getProperty(JBWS1316_EXPIRES);
+
+ // Created is bare minimum to add the header.
+ if (createdValue == null)
+ {
+ return super.handleRequest(msgContext);
+ }
+
+ Calendar baseCalendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
+
+ Calendar createdCalendar = (Calendar)baseCalendar.clone();
+ createdCalendar.add(Calendar.SECOND, createdValue);
+
+ Calendar expiresCalendar = null;
+
+ if (expiresValue != null)
+ {
+ expiresCalendar = (Calendar)baseCalendar.clone();
+ expiresCalendar.add(Calendar.SECOND, expiresValue);
+ }
+
+ CommonMessageContext ctx = (CommonMessageContext)msgContext;
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
+ Document message = soapMessage.getSOAPPart();
+
+ Element soapHeader = Util.findOrCreateSoapHeader(message.getDocumentElement());
+
+ Element wsseSecurityElement = message.createElementNS(Constants.WSSE_NS, Constants.WSSE_HEADER);
+ Util.addNamespace(wsseSecurityElement, Constants.WSSE_PREFIX, Constants.WSSE_NS);
+ Util.addNamespace(wsseSecurityElement, Constants.WSU_PREFIX, Constants.WSU_NS);
+
+ Element wsseTimestampElement = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Timestamp");
+ wsseTimestampElement.setAttributeNS(Constants.WSU_NS, Constants.WSU_ID, "timestamp");
+ Element child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Created");
+ child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(createdCalendar)));
+ wsseTimestampElement.appendChild(child);
+ if (expiresCalendar != null)
+ {
+ child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Expires");
+ child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(expiresCalendar)));
+ wsseTimestampElement.appendChild(child);
+ }
+ wsseSecurityElement.appendChild(wsseTimestampElement);
+
+ soapHeader.insertBefore(wsseSecurityElement, soapHeader.getFirstChild());
+
+ return true;
+ }
+
+ @Override
+ public QName[] getHeaders()
+ {
+ return null;
+ }
+
+}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -95,7 +95,7 @@
cal.set(Calendar.MINUTE, 22);
cal.set(Calendar.SECOND, 25);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
decoder.decode(soapEnv.getOwnerDocument());
decoder.complete();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -92,7 +92,8 @@
env = soapMsg.getSOAPPart().getEnvelope();
doc = env.getOwnerDocument();
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore());
+
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), null);
decoder.decode(doc);
decoder.verify(buildRequireOperations());
decoder.complete();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2008-04-17 14:32:47 UTC (rev 6470)
@@ -72,7 +72,7 @@
cal.set(Calendar.MINUTE, 32);
cal.set(Calendar.SECOND, 25);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
decoder.decode(doc);
decoder.complete();
@@ -107,7 +107,7 @@
cal.set(Calendar.SECOND, 40);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
decoder.decode(doc);
decoder.complete();
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316 (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client 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/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>HelloService</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>ClientHandler</handler-name>
- <handler-class>org.jboss.test.ws.jaxrpc.jbws1316.TestSecurityHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client 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/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>HelloService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
+ </port-component-ref>
+ <handler>
+ <handler-name>ClientHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxrpc.jbws1316.TestSecurityHandler</handler-class>
+ </handler>
+ </service-ref>
+
+</application-client>
+
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,13 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <wsdl-override>http://@jboss.bind.address@:8080/jaxrpc-jbws1316?wsdl</wsdl-override>
- </service-ref>
-
-</jboss-client>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jboss.bind.address@:8080/jaxrpc-jbws1316?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jaxrpc.jbws1316</package-type>
- <namespaceURI>http://ws.test.jboss.org/jbws1316/types</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestService</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://ws.test.jboss.org/jbws1316'>serviceNS:TestService</wsdl-service-name>
- <port-mapping>
- <port-name>TestEndpointPort</port-name>
- <java-port-name>TestEndpointPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://ws.test.jboss.org/jbws1316'>portTypeNS:TestEndpoint</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://ws.test.jboss.org/jbws1316'>bindingNS:TestEndpointBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>echoMessage</java-method-name>
- <wsdl-operation>echoMessage</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1316</package-type>
+ <namespaceURI>http://ws.test.jboss.org/jbws1316/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://ws.test.jboss.org/jbws1316'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://ws.test.jboss.org/jbws1316'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://ws.test.jboss.org/jbws1316'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
-
- <timestamp-verification createdTolerance="10" expiresTolerance="10" />
-
- <config>
- <requires>
- <timestamp ttl="30" />
- </requires>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+
+ <timestamp-verification createdTolerance="10" expiresTolerance="10" />
+
+ <config>
+ <requires>
+ <timestamp ttl="30" />
+ </requires>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,23 +0,0 @@
-<?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">
-
- <context-param>
- <param-name>jbossws-config-name</param-name>
- <param-value>Standard WSSecurity Endpoint</param-value>
- </context-param>
-
- <servlet>
- <servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app>
-
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,23 @@
+<?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">
+
+ <context-param>
+ <param-name>jbossws-config-name</param-name>
+ <param-value>Standard WSSecurity Endpoint</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,15 +0,0 @@
-<webservices version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
- <webservice-description>
- <webservice-description-name>TestService</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component>
- <port-component-name>TestEndpointPort</port-component-name>
- <wsdl-port xmlns:portNS='http://ws.test.jboss.org/jbws1316'>portNS:TestEndpointPort</wsdl-port>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
- <service-impl-bean>
- <servlet-link>TestEndpoint</servlet-link>
- </service-impl-bean>
- </port-component>
- </webservice-description>
-</webservices>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,15 @@
+<webservices version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port xmlns:portNS='http://ws.test.jboss.org/jbws1316'>portNS:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='TestService' targetNamespace='http://ws.test.jboss.org/jbws1316' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://ws.test.jboss.org/jbws1316/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://ws.test.jboss.org/jbws1316' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types/>
- <message name='TestEndpoint_echoMessage'>
- <part name='String_1' type='xsd:string'/>
- </message>
- <message name='TestEndpoint_echoMessageResponse'>
- <part name='result' type='xsd:string'/>
- </message>
- <portType name='TestEndpoint'>
- <operation name='echoMessage' parameterOrder='String_1'>
- <input message='tns:TestEndpoint_echoMessage'/>
- <output message='tns:TestEndpoint_echoMessageResponse'/>
- </operation>
- </portType>
- <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='echoMessage'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='TestService'>
- <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://ws.test.jboss.org/jbws1316' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://ws.test.jboss.org/jbws1316/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://ws.test.jboss.org/jbws1316' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoMessage'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,5 +0,0 @@
-<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
- <timestamp-verification/>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,5 @@
+<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+ <timestamp-verification/>
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,5 +0,0 @@
-<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
- <timestamp-verification createdTolerance="5" warnCreated="false" expiresTolerance="10" warnExpires="false" />
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,5 @@
+<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+ <timestamp-verification createdTolerance="5" warnCreated="false" expiresTolerance="10" warnExpires="false" />
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,6 +0,0 @@
-<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
-
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,6 @@
+<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/wstools-config.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml 2008-04-17 12:31:12 UTC (rev 6469)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/wstools-config.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools.sh -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
--->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
- <java-wsdl>
- <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint" style="rpc">
- </service>
- <namespaces target-namespace="http://ws.test.jboss.org/jbws1316" type-namespace="http://ws.test.jboss.org/jbws1316/types"/>
- <mapping file="jaxrpc-mapping.xml"/>
- <webservices servlet-link="TestEndpoint"/>
- </java-wsdl>
-</configuration>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/wstools-config.xml (from rev 6469, stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/wstools-config.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxrpc/jbws1316/wstools-config.xml 2008-04-17 14:32:47 UTC (rev 6470)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools.sh -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://ws.test.jboss.org/jbws1316" type-namespace="http://ws.test.jboss.org/jbws1316/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+</configuration>
16 years, 9 months
JBossWS SVN: r6469 - in stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790: src/main/java/org/jboss/ws/extensions/security and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-04-17 08:31:12 -0400 (Thu, 17 Apr 2008)
New Revision: 6469
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/ant-import-tests/build-jars-jaxrpc.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/resources/schema/jboss-ws-security_1_0.xsd
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
Log:
[JBPAPP-790] Add support for a configurable time tolerance value that handles clock skew.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/ant-import-tests/build-jars-jaxrpc.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/ant-import-tests/build-jars-jaxrpc.xml 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/ant-import-tests/build-jars-jaxrpc.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -2398,7 +2398,35 @@
<include name="jaxrpc-mapping.xml"/>
</metainf>
</jar>
-
+
+ <!-- jaxrpc-jbws1316 -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1316.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1316/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1316/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/jbws1316/*TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxrpc/jbws1316/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="jboss-wsse-server.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${tests.output.dir}/libs/jaxrpc-jbws1316-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1316/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/jbws1316/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxrpc/jbws1316/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxrpc/jbws1316/WEB-INF">
+ <include name="wsdl/**"/>
+ <include name="jaxrpc-mapping.xml"/>
+ </metainf>
+ </jar>
+
<!-- jaxrpc-jbws1378 -->
<war warfile="${tests.output.dir}/libs/jaxrpc-jbws1378.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1378/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -34,6 +34,7 @@
import org.jboss.ws.extensions.security.element.Timestamp;
import org.jboss.ws.extensions.security.element.Token;
import org.jboss.ws.extensions.security.element.UsernameToken;
+import org.jboss.ws.metadata.wsse.TimestampVerification;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -52,15 +53,19 @@
private Document message;
private SecurityStore store;
+
+ private TimestampVerification timestampVerification;
private HashSet<String> signedIds = new HashSet<String>();
private HashSet<String> encryptedIds = new HashSet<String>();
- public SecurityDecoder(SecurityStore store)
+
+ public SecurityDecoder(SecurityStore store, TimestampVerification timestampVerification)
{
org.apache.xml.security.Init.init();
this.store = store;
+ this.timestampVerification = timestampVerification;
}
/**
@@ -70,9 +75,10 @@
* @param SecurityStore the security store that contains key and trust information
* @param now The timestamp to use as the current time when validating a message expiration
*/
- public SecurityDecoder(SecurityStore store, Calendar now)
+
+ public SecurityDecoder(SecurityStore store, Calendar now, TimestampVerification timestampVerification)
{
- this(store);
+ this(store, timestampVerification);
this.now = now;
}
@@ -99,7 +105,7 @@
if (timestamp != null)
{
TimestampVerificationOperation operation =
- (now == null) ? new TimestampVerificationOperation() : new TimestampVerificationOperation(now);
+ (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
operation.process(message, timestamp);
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/TimestampVerificationOperation.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -23,16 +23,22 @@
import java.util.Calendar;
+import org.jboss.logging.Logger;
import org.jboss.ws.extensions.security.element.Timestamp;
+import org.jboss.ws.metadata.wsse.TimestampVerification;
import org.w3c.dom.Document;
-
public class TimestampVerificationOperation
{
+ private static final Logger log = Logger.getLogger(TimestampVerificationOperation.class);
+
+ private TimestampVerification timestampVerification;
+
private Calendar now = null;
- public TimestampVerificationOperation()
+ public TimestampVerificationOperation(TimestampVerification timestampVerification)
{
+ this.timestampVerification = timestampVerification;
}
/**
@@ -48,14 +54,48 @@
public void process(Document message, Timestamp timestamp) throws WSSecurityException
{
- Calendar expired = timestamp.getExpires();
+ Calendar expires = timestamp.getExpires();
Calendar created = timestamp.getCreated();
+
Calendar now = (this.now == null) ? Calendar.getInstance() : this.now;
- if (created.after(now))
+ boolean rejectCreated = created.after(now);
+ if (rejectCreated && timestampVerification != null && timestampVerification.getCreatedTolerance() > 0)
+ {
+ Calendar tolerantCreatedNow = (Calendar)now.clone();
+ tolerantCreatedNow.add(Calendar.SECOND, (int)timestampVerification.getCreatedTolerance());
+
+ rejectCreated = created.after(tolerantCreatedNow);
+
+ if (rejectCreated == false && timestampVerification.isWarnCreated())
+ {
+ log.warn("Accepting Timestamp with 'Created' after now but within configured tolerance.");
+ }
+ }
+
+ if (rejectCreated)
+ {
throw new WSSecurityException("Invalid timestamp, message claimed to be created after now");
+ }
- if (expired != null && ! now.before(expired))
+ boolean rejectExpires = expires != null && !now.before(expires);
+ if (rejectExpires && timestampVerification != null && timestampVerification.getExpiresTolerance() > 0)
+ {
+ Calendar tolerantExpiresNow = (Calendar)now.clone();
+ tolerantExpiresNow.add(Calendar.SECOND, (int)timestampVerification.getExpiresTolerance() * -1);
+
+ rejectExpires = !tolerantExpiresNow.before(expires);
+
+ if (rejectExpires == false && timestampVerification.isWarnExpires())
+ {
+ log.warn("Accepting Timestamp with 'Expires' in past but within configured tolerance.");
+ }
+ }
+
+ if (rejectExpires)
+ {
throw new FailedCheckException("Expired message.");
+ }
+
}
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -142,7 +142,7 @@
{
SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(), config.getTrustStoreURL(),
config.getTrustStoreType(), config.getTrustStorePassword());
- SecurityDecoder decoder = new SecurityDecoder(securityStore);
+ SecurityDecoder decoder = new SecurityDecoder(securityStore, config.getTimestampVerification());
decoder.decode(soapMessage.getSOAPPart(), secHeaderElement);
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java (from rev 6437, stack/native/trunk/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/TimestampVerification.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * Represents the "timestamp-verification" tag.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class TimestampVerification implements Serializable
+{
+
+ private static final long serialVersionUID = -1097288149565604697L;
+
+ private long createdTolerance;
+
+ private boolean warnCreated;
+
+ private long expiresTolerance;
+
+ private boolean warnExpires;
+
+ public TimestampVerification(long createdTolerance, boolean warnCreated, long expiresTolerance, boolean warnExpires)
+ {
+ this.createdTolerance = createdTolerance;
+ this.warnCreated = warnCreated;
+ this.expiresTolerance = expiresTolerance;
+ this.warnExpires = warnExpires;
+ }
+
+ public long getCreatedTolerance()
+ {
+ return createdTolerance;
+ }
+
+ public void setCreatedTolerance(long createdTolerance)
+ {
+ this.createdTolerance = createdTolerance;
+ }
+
+ public boolean isWarnCreated()
+ {
+ return warnCreated;
+ }
+
+ public void setWarnCreated(boolean warnCreated)
+ {
+ this.warnCreated = warnCreated;
+ }
+
+ public long getExpiresTolerance()
+ {
+ return expiresTolerance;
+ }
+
+ public void setExpiresTolerance(long expiresTolerance)
+ {
+ this.expiresTolerance = expiresTolerance;
+ }
+
+ public boolean isWarnExpires()
+ {
+ return warnExpires;
+ }
+
+ public void setWarnExpires(boolean warnExpires)
+ {
+ this.warnExpires = warnExpires;
+ }
+
+}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -46,6 +46,7 @@
private String trustStoreType;
private String trustStorePassword;
private HashMap<String, String> keyPasswords = new HashMap<String, String>();
+ private TimestampVerification timestampVerification;
public WSSecurityConfiguration()
{
@@ -165,4 +166,15 @@
{
this.keyPasswords = keyPasswords;
}
+
+ public TimestampVerification getTimestampVerification()
+ {
+ return timestampVerification;
+ }
+
+ public void setTimestampVerification(TimestampVerification timestampVerification)
+ {
+ this.timestampVerification = timestampVerification;
+ }
+
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -178,6 +178,34 @@
{
return new Port(attrs.getValue("", "name"));
}
+ if ("timestamp-verification".equals(localName))
+ {
+ //By default, the createdTolerance should be '0'
+ Long createdTolerance = new Long(0);
+ String createdToleranceAttr = attrs.getValue("", "createdTolerance");
+ if (createdToleranceAttr != null)
+ createdTolerance = (Long)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_LONG_NAME, createdToleranceAttr, null);
+
+ //By default, we do log warnings if the tolerance is used.
+ Boolean warnCreated = new Boolean(true);
+ String warnCreatedAttr = attrs.getValue("", "warnCreated");
+ if (warnCreatedAttr != null)
+ warnCreated = (Boolean)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, warnCreatedAttr, null);
+
+ //By default, the expiresTolerance should be '0'
+ Long expiresTolerance = new Long(0);
+ String expiresToleranceAttr = attrs.getValue("", "expiresTolerance");
+ if (expiresToleranceAttr != null)
+ expiresTolerance = (Long)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_LONG_NAME, expiresToleranceAttr, null);
+
+ //By default, we do log warnings if the tolerance is used.
+ Boolean warnExpires = new Boolean(true);
+ String warnExpiresAttr = attrs.getValue("", "warnExpires");
+ if (warnExpiresAttr != null)
+ warnExpires = (Boolean)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, warnExpiresAttr, null);
+
+ return new TimestampVerification(createdTolerance, warnCreated, expiresTolerance, warnExpires);
+ }
return null;
}
@@ -215,6 +243,16 @@
}
/**
+ * Called when parsing TimestampVerification is complete.
+ */
+ public void addChild(WSSecurityConfiguration configuration, TimestampVerification timestampVerification, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
+ {
+ log.trace("addChild: [obj=" + configuration + ",child=" + timestampVerification + "]");
+ configuration.setTimestampVerification(timestampVerification);
+ }
+
+ /**
* Called when parsing of a new element started.
*/
public Object newChild(Config config, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/resources/schema/jboss-ws-security_1_0.xsd 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/main/resources/schema/jboss-ws-security_1_0.xsd 2008-04-17 12:31:12 UTC (rev 6469)
@@ -38,6 +38,11 @@
<xs:documentation>The passwords for the private keys in the keystore. Only required if the passwords are different from that of the keystore.</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="timestamp-verification" type="timestampVerificationType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The tolerances and logging required when verifying the 'created' and 'expires' value of the timestamps.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
<xs:element name="config" type="configType" minOccurs="0">
<xs:annotation>
<xs:documentation>The default security configuration that is applied to all operations on all ports. This is only used if there is no port/operation config.</xs:documentation>
@@ -72,6 +77,28 @@
</xs:annotation>
</xs:attribute>
</xs:complexType>
+ <xs:complexType name="timestampVerificationType">
+ <xs:attribute name="createdTolerance" type="xs:long" use="optional">
+ <xs:annotation>
+ <xs:documentation>The number of seconds in the future the created value on a message will be accepted.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="warnCreated" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specifies if a WARN should be logged if a message in the future is accepted within the configured 'createdTolerance'.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="expiresTolerance" type="xs:long" use="optional">
+ <xs:annotation>
+ <xs:documentation>The number of seconds tolerance when checking the expires value of the timestamp.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="warnExpires" type="xs:boolean" use="optional">
+ <xs:annotation>
+ <xs:documentation>Specifies if a WARN should be logged if an expired message is accepted that is within the 'expiresTolerance'.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
<xs:complexType name="configType" mixed="true">
<xs:all>
<xs:element name="timestamp" type="timestampType" minOccurs="0">
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316 (from rev 6437, stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,136 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.rmi.RemoteException;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-import javax.xml.rpc.Stub;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Test case to test reading the TimestampVerification configuration.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class JBWS1316CallTestCase extends JBossWSTest
-{
-
- private static final String MESSAGE = "Hello JBWS1316!!";
-
- private static TestEndpoint port;
-
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1316CallTestCase.class, "jaxrpc-jbws1316.war, jaxrpc-jbws1316-client.jar");
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
- if (port == null)
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
- }
- }
-
- /**
- * Test that a message without a wsse:Security header is rejected.
- *
- * @throws Exception
- */
- public void testCall_NoSecurity() throws Exception
- {
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, null);
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, null);
-
- try
- {
- port.echoMessage(MESSAGE);
- fail("Call should have failed due to no wsse:Security.");
- }
- catch (RemoteException e)
- {
- assertTrue(e.getMessage().contains("[InvalidSecurity]"));
- }
- }
-
- public void testCall_ValidTimestamp() throws Exception
- {
- long started = System.currentTimeMillis();
-
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(10));
-
- String response = port.echoMessage(MESSAGE);
- assertEquals("Expected Response", MESSAGE, response);
-
- long finished = System.currentTimeMillis();
- long duration = finished - started;
- assertTrue("Execution time less than 10s", duration < 10000);
- }
-
- public void testCall_FutureTimestamp() throws Exception
- {
- long started = System.currentTimeMillis();
-
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(10));
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(20));
-
- String response = port.echoMessage(MESSAGE);
- assertEquals("Expected Response", MESSAGE, response);
-
- long finished = System.currentTimeMillis();
- long duration = finished - started;
- assertTrue("Execution time less than 10s", duration < 10000);
- }
-
- public void testCall_PastExpires() throws Exception
- {
- long started = System.currentTimeMillis();
-
- Stub stub = (Stub)port;
- stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
- stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(-5));
-
- String response = port.echoMessage(MESSAGE);
- assertEquals("Expected Response", MESSAGE, response);
-
- long finished = System.currentTimeMillis();
- long duration = finished - started;
- assertTrue("Execution time less than 10s", duration < 10000);
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java (from rev 6437, stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316CallTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,136 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.rmi.RemoteException;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test case to test reading the TimestampVerification configuration.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class JBWS1316CallTestCase extends JBossWSTest
+{
+
+ private static final String MESSAGE = "Hello JBWS1316!!";
+
+ private static TestEndpoint port;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1316CallTestCase.class, "jaxrpc-jbws1316.war, jaxrpc-jbws1316-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ }
+
+ /**
+ * Test that a message without a wsse:Security header is rejected.
+ *
+ * @throws Exception
+ */
+ public void testCall_NoSecurity() throws Exception
+ {
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, null);
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, null);
+
+ try
+ {
+ port.echoMessage(MESSAGE);
+ fail("Call should have failed due to no wsse:Security.");
+ }
+ catch (RemoteException e)
+ {
+ assertTrue(e.getMessage().contains("[InvalidSecurity]"));
+ }
+ }
+
+ public void testCall_ValidTimestamp() throws Exception
+ {
+ long started = System.currentTimeMillis();
+
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(10));
+
+ String response = port.echoMessage(MESSAGE);
+ assertEquals("Expected Response", MESSAGE, response);
+
+ long finished = System.currentTimeMillis();
+ long duration = finished - started;
+ assertTrue("Execution time less than 10s", duration < 10000);
+ }
+
+ public void testCall_FutureTimestamp() throws Exception
+ {
+ long started = System.currentTimeMillis();
+
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(10));
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(20));
+
+ String response = port.echoMessage(MESSAGE);
+ assertEquals("Expected Response", MESSAGE, response);
+
+ long finished = System.currentTimeMillis();
+ long duration = finished - started;
+ assertTrue("Execution time less than 10s", duration < 10000);
+ }
+
+ public void testCall_PastExpires() throws Exception
+ {
+ long started = System.currentTimeMillis();
+
+ Stub stub = (Stub)port;
+ stub._setProperty(TestSecurityHandler.JBWS1316_CREATED, Integer.valueOf(0));
+ stub._setProperty(TestSecurityHandler.JBWS1316_EXPIRES, Integer.valueOf(-5));
+
+ String response = port.echoMessage(MESSAGE);
+ assertEquals("Expected Response", MESSAGE, response);
+
+ long finished = System.currentTimeMillis();
+ long duration = finished - started;
+ assertTrue("Execution time less than 10s", duration < 10000);
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,103 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.jboss.ws.metadata.wsse.TimestampVerification;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * Test case to test reading the TimestampVerification configuration.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class JBWS1316ConfigurationTestCase extends JBossWSTest
-{
-
- private WSSecurityConfiguration load(final String fileName) throws IOException
- {
- File configFile = new File("resources/jaxrpc/jbws1316/config/" + fileName);
- WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
-
- return factory.parse(configFile.toURL());
- }
-
- /**
- * Test loading a wsse configuration with no timestamp-verification
- * element.
- *
- * This test case verifies that no TimestampVerification will be set
- * and matches the scenario that would be encountered when reading
- * existing descriptors.
- */
- public void testLoadNoTimestampVerification() throws Exception
- {
- WSSecurityConfiguration config = load("jboss-wsse-no-tv.xml");
- assertNull("No TimestampVerification expected.", config.getTimestampVerification());
- }
-
- /**
- * Test loading a wsse configuration with an empty timestamp-verification
- * element.
- *
- * This test case verifies the default values that will be used when missing from
- * the timestamp-verification element.
- */
- public void testLoadEmptyTimestampVerification() throws Exception
- {
- WSSecurityConfiguration config = load("jboss-wsse-empty-tv.xml");
- assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
-
- TimestampVerification tv = config.getTimestampVerification();
- assertEquals("Expected 'createdTolerance' to be '0'", 0, tv.getCreatedTolerance());
- assertTrue("Expected 'warnCreated' to default to 'true'", tv.isWarnCreated());
- assertEquals("Expected 'expiresTolerance' to be '0'", 0, tv.getExpiresTolerance());
- assertTrue("Expected 'warnExpires' to default to 'true'", tv.isWarnExpires());
- }
-
- /**
- * Test loading a wsse configuration with a full timestamp-verification
- * element.
- *
- * This test case verifies all the values are correctly loaded from the
- * timestamp-verification element.
- */
- public void testLoadFullTimestampVerification() throws Exception
- {
- WSSecurityConfiguration config = load("jboss-wsse-full-tv.xml");
- assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
-
- TimestampVerification tv = config.getTimestampVerification();
- assertEquals("Expected 'createdTolerance' to be '5'", 5, tv.getCreatedTolerance());
- assertFalse("Expected 'warnCreated' to default to 'false'", tv.isWarnCreated());
- assertEquals("Expected 'expiresTolerance' to be '10'", 10, tv.getExpiresTolerance());
- assertFalse("Expected 'warnExpires' to default to 'false'", tv.isWarnExpires());
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java (from rev 6437, stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.jboss.ws.metadata.wsse.TimestampVerification;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Test case to test reading the TimestampVerification configuration.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class JBWS1316ConfigurationTestCase extends JBossWSTest
+{
+
+ private WSSecurityConfiguration load(final String fileName) throws IOException
+ {
+ File configFile = new File("resources/jaxrpc/jbws1316/config/" + fileName);
+ WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
+
+ return factory.parse(configFile.toURL());
+ }
+
+ /**
+ * Test loading a wsse configuration with no timestamp-verification
+ * element.
+ *
+ * This test case verifies that no TimestampVerification will be set
+ * and matches the scenario that would be encountered when reading
+ * existing descriptors.
+ */
+ public void testLoadNoTimestampVerification() throws Exception
+ {
+ WSSecurityConfiguration config = load("jboss-wsse-no-tv.xml");
+ assertNull("No TimestampVerification expected.", config.getTimestampVerification());
+ }
+
+ /**
+ * Test loading a wsse configuration with an empty timestamp-verification
+ * element.
+ *
+ * This test case verifies the default values that will be used when missing from
+ * the timestamp-verification element.
+ */
+ public void testLoadEmptyTimestampVerification() throws Exception
+ {
+ WSSecurityConfiguration config = load("jboss-wsse-empty-tv.xml");
+ assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
+
+ TimestampVerification tv = config.getTimestampVerification();
+ assertEquals("Expected 'createdTolerance' to be '0'", 0, tv.getCreatedTolerance());
+ assertTrue("Expected 'warnCreated' to default to 'true'", tv.isWarnCreated());
+ assertEquals("Expected 'expiresTolerance' to be '0'", 0, tv.getExpiresTolerance());
+ assertTrue("Expected 'warnExpires' to default to 'true'", tv.isWarnExpires());
+ }
+
+ /**
+ * Test loading a wsse configuration with a full timestamp-verification
+ * element.
+ *
+ * This test case verifies all the values are correctly loaded from the
+ * timestamp-verification element.
+ */
+ public void testLoadFullTimestampVerification() throws Exception
+ {
+ WSSecurityConfiguration config = load("jboss-wsse-full-tv.xml");
+ assertNotNull("TimestampVerification Missing", config.getTimestampVerification());
+
+ TimestampVerification tv = config.getTimestampVerification();
+ assertEquals("Expected 'createdTolerance' to be '5'", 5, tv.getCreatedTolerance());
+ assertFalse("Expected 'warnCreated' to default to 'false'", tv.isWarnCreated());
+ assertEquals("Expected 'expiresTolerance' to be '10'", 10, tv.getExpiresTolerance());
+ assertFalse("Expected 'warnExpires' to default to 'false'", tv.isWarnExpires());
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * Simple TestEndpoint to test the handling to WSSE timestamps.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public interface TestEndpoint extends Remote
-{
-
- public String echoMessage(final String message) throws RemoteException;
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java (from rev 6437, stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * Simple TestEndpoint to test the handling to WSSE timestamps.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoMessage(final String message) throws RemoteException;
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-/**
- * Simple TestEndpoint to test the handling to WSSE timestamps.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class TestEndpointImpl implements TestEndpoint
-{
-
- public String echoMessage(String message)
- {
- return message;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java (from rev 6437, stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpointImpl.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+/**
+ * Simple TestEndpoint to test the handling to WSSE timestamps.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public String echoMessage(String message)
+ {
+ return message;
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,115 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, 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.jaxrpc.jbws1316;
-
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.MessageContext;
-
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.extensions.security.Constants;
-import org.jboss.ws.extensions.security.Util;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Simple handler to add wsse:Security and Timestamp to header in controlled
- * way to test JBWS-1316 implementation.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @version $Revision$
- * @since Aril 14 2008
- */
-public class TestSecurityHandler extends GenericHandler
-{
-
- public static final String JBWS1316_CREATED = "jbws1316.created";
-
- public static final String JBWS1316_EXPIRES = "jbws1316.expires";
-
- @Override
- public boolean handleRequest(MessageContext msgContext)
- {
- Integer createdValue = (Integer)msgContext.getProperty(JBWS1316_CREATED);
- Integer expiresValue = (Integer)msgContext.getProperty(JBWS1316_EXPIRES);
-
- // Created is bare minimum to add the header.
- if (createdValue == null)
- {
- return super.handleRequest(msgContext);
- }
-
- Calendar baseCalendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
-
- Calendar createdCalendar = (Calendar)baseCalendar.clone();
- createdCalendar.add(Calendar.SECOND, createdValue);
-
- Calendar expiresCalendar = null;
-
- if (expiresValue != null)
- {
- expiresCalendar = (Calendar)baseCalendar.clone();
- expiresCalendar.add(Calendar.SECOND, expiresValue);
- }
-
- CommonMessageContext ctx = (CommonMessageContext)msgContext;
- SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
- Document message = soapMessage.getSOAPPart();
-
- Element soapHeader = Util.findOrCreateSoapHeader(message.getDocumentElement());
-
- Element wsseSecurityElement = message.createElementNS(Constants.WSSE_NS, Constants.WSSE_HEADER);
- Util.addNamespace(wsseSecurityElement, Constants.WSSE_PREFIX, Constants.WSSE_NS);
- Util.addNamespace(wsseSecurityElement, Constants.WSU_PREFIX, Constants.WSU_NS);
-
- Element wsseTimestampElement = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Timestamp");
- wsseTimestampElement.setAttributeNS(Constants.WSU_NS, Constants.WSU_ID, "timestamp");
- Element child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Created");
- child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(createdCalendar)));
- wsseTimestampElement.appendChild(child);
- if (expiresCalendar != null)
- {
- child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Expires");
- child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(expiresCalendar)));
- wsseTimestampElement.appendChild(child);
- }
- wsseSecurityElement.appendChild(wsseTimestampElement);
-
- soapHeader.insertBefore(wsseSecurityElement, soapHeader.getFirstChild());
-
- return true;
- }
-
- @Override
- public QName[] getHeaders()
- {
- return null;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java (from rev 6437, stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestSecurityHandler.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,115 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, 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.jaxrpc.jbws1316;
+
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.extensions.security.Constants;
+import org.jboss.ws.extensions.security.Util;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Simple handler to add wsse:Security and Timestamp to header in controlled
+ * way to test JBWS-1316 implementation.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @version $Revision$
+ * @since Aril 14 2008
+ */
+public class TestSecurityHandler extends GenericHandler
+{
+
+ public static final String JBWS1316_CREATED = "jbws1316.created";
+
+ public static final String JBWS1316_EXPIRES = "jbws1316.expires";
+
+ @Override
+ public boolean handleRequest(MessageContext msgContext)
+ {
+ Integer createdValue = (Integer)msgContext.getProperty(JBWS1316_CREATED);
+ Integer expiresValue = (Integer)msgContext.getProperty(JBWS1316_EXPIRES);
+
+ // Created is bare minimum to add the header.
+ if (createdValue == null)
+ {
+ return super.handleRequest(msgContext);
+ }
+
+ Calendar baseCalendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
+
+ Calendar createdCalendar = (Calendar)baseCalendar.clone();
+ createdCalendar.add(Calendar.SECOND, createdValue);
+
+ Calendar expiresCalendar = null;
+
+ if (expiresValue != null)
+ {
+ expiresCalendar = (Calendar)baseCalendar.clone();
+ expiresCalendar.add(Calendar.SECOND, expiresValue);
+ }
+
+ CommonMessageContext ctx = (CommonMessageContext)msgContext;
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
+ Document message = soapMessage.getSOAPPart();
+
+ Element soapHeader = Util.findOrCreateSoapHeader(message.getDocumentElement());
+
+ Element wsseSecurityElement = message.createElementNS(Constants.WSSE_NS, Constants.WSSE_HEADER);
+ Util.addNamespace(wsseSecurityElement, Constants.WSSE_PREFIX, Constants.WSSE_NS);
+ Util.addNamespace(wsseSecurityElement, Constants.WSU_PREFIX, Constants.WSU_NS);
+
+ Element wsseTimestampElement = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Timestamp");
+ wsseTimestampElement.setAttributeNS(Constants.WSU_NS, Constants.WSU_ID, "timestamp");
+ Element child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Created");
+ child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(createdCalendar)));
+ wsseTimestampElement.appendChild(child);
+ if (expiresCalendar != null)
+ {
+ child = message.createElementNS(Constants.WSU_NS, Constants.WSU_PREFIX + ":" + "Expires");
+ child.appendChild(message.createTextNode(SimpleTypeBindings.marshalDateTime(expiresCalendar)));
+ wsseTimestampElement.appendChild(child);
+ }
+ wsseSecurityElement.appendChild(wsseTimestampElement);
+
+ soapHeader.insertBefore(wsseSecurityElement, soapHeader.getFirstChild());
+
+ return true;
+ }
+
+ @Override
+ public QName[] getHeaders()
+ {
+ return null;
+ }
+
+}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -95,7 +95,7 @@
cal.set(Calendar.MINUTE, 22);
cal.set(Calendar.SECOND, 25);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
decoder.decode(soapEnv.getOwnerDocument());
decoder.complete();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -92,7 +92,8 @@
env = soapMsg.getSOAPPart().getEnvelope();
doc = env.getOwnerDocument();
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore());
+
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), null);
decoder.decode(doc);
decoder.verify(buildRequireOperations());
decoder.complete();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2008-04-17 12:17:25 UTC (rev 6468)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2008-04-17 12:31:12 UTC (rev 6469)
@@ -72,7 +72,7 @@
cal.set(Calendar.MINUTE, 32);
cal.set(Calendar.SECOND, 25);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
decoder.decode(doc);
decoder.complete();
@@ -107,7 +107,7 @@
cal.set(Calendar.SECOND, 40);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
decoder.decode(doc);
decoder.complete();
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316 (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/META-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client 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/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>HelloService</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>ClientHandler</handler-name>
- <handler-class>org.jboss.test.ws.jaxrpc.jbws1316.TestSecurityHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/application-client.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client 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/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>HelloService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
+ </port-component-ref>
+ <handler>
+ <handler-name>ClientHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxrpc.jbws1316.TestSecurityHandler</handler-class>
+ </handler>
+ </service-ref>
+
+</application-client>
+
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,13 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <wsdl-override>http://@jboss.bind.address@:8080/jaxrpc-jbws1316?wsdl</wsdl-override>
- </service-ref>
-
-</jboss-client>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/META-INF/jboss-client.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jboss.bind.address@:8080/jaxrpc-jbws1316?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jaxrpc.jbws1316</package-type>
- <namespaceURI>http://ws.test.jboss.org/jbws1316/types</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestService</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://ws.test.jboss.org/jbws1316'>serviceNS:TestService</wsdl-service-name>
- <port-mapping>
- <port-name>TestEndpointPort</port-name>
- <java-port-name>TestEndpointPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://ws.test.jboss.org/jbws1316'>portTypeNS:TestEndpoint</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://ws.test.jboss.org/jbws1316'>bindingNS:TestEndpointBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>echoMessage</java-method-name>
- <wsdl-operation>echoMessage</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jaxrpc-mapping.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1316</package-type>
+ <namespaceURI>http://ws.test.jboss.org/jbws1316/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://ws.test.jboss.org/jbws1316'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://ws.test.jboss.org/jbws1316'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://ws.test.jboss.org/jbws1316'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://ws.test.jboss.org/jbws1316'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
-
- <timestamp-verification createdTolerance="10" expiresTolerance="10" />
-
- <config>
- <requires>
- <timestamp ttl="30" />
- </requires>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/jboss-wsse-server.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+
+ <timestamp-verification createdTolerance="10" expiresTolerance="10" />
+
+ <config>
+ <requires>
+ <timestamp ttl="30" />
+ </requires>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,23 +0,0 @@
-<?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">
-
- <context-param>
- <param-name>jbossws-config-name</param-name>
- <param-value>Standard WSSecurity Endpoint</param-value>
- </context-param>
-
- <servlet>
- <servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app>
-
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/web.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,23 @@
+<?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">
+
+ <context-param>
+ <param-name>jbossws-config-name</param-name>
+ <param-value>Standard WSSecurity Endpoint</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,15 +0,0 @@
-<webservices version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
- <webservice-description>
- <webservice-description-name>TestService</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component>
- <port-component-name>TestEndpointPort</port-component-name>
- <wsdl-port xmlns:portNS='http://ws.test.jboss.org/jbws1316'>portNS:TestEndpointPort</wsdl-port>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
- <service-impl-bean>
- <servlet-link>TestEndpoint</servlet-link>
- </service-impl-bean>
- </port-component>
- </webservice-description>
-</webservices>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/webservices.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,15 @@
+<webservices version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port xmlns:portNS='http://ws.test.jboss.org/jbws1316'>portNS:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='TestService' targetNamespace='http://ws.test.jboss.org/jbws1316' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://ws.test.jboss.org/jbws1316/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://ws.test.jboss.org/jbws1316' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types/>
- <message name='TestEndpoint_echoMessage'>
- <part name='String_1' type='xsd:string'/>
- </message>
- <message name='TestEndpoint_echoMessageResponse'>
- <part name='result' type='xsd:string'/>
- </message>
- <portType name='TestEndpoint'>
- <operation name='echoMessage' parameterOrder='String_1'>
- <input message='tns:TestEndpoint_echoMessage'/>
- <output message='tns:TestEndpoint_echoMessageResponse'/>
- </operation>
- </portType>
- <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='echoMessage'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='TestService'>
- <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/WEB-INF/wsdl/TestService.wsdl 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://ws.test.jboss.org/jbws1316' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://ws.test.jboss.org/jbws1316/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://ws.test.jboss.org/jbws1316' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoMessage'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://ws.test.jboss.org/jbws1316' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/config)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,5 +0,0 @@
-<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
- <timestamp-verification/>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-empty-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,5 @@
+<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+ <timestamp-verification/>
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,5 +0,0 @@
-<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
- <timestamp-verification createdTolerance="5" warnCreated="false" expiresTolerance="10" warnExpires="false" />
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-full-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,5 @@
+<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+ <timestamp-verification createdTolerance="5" warnCreated="false" expiresTolerance="10" warnExpires="false" />
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,6 +0,0 @@
-<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
-
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/config/jboss-wsse-no-tv.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,6 @@
+<jboss-ws-security xmlns='http://www.jboss.com/ws-security/config'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxrpc/jbws1316/wstools-config.xml 2008-04-15 11:15:58 UTC (rev 6437)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools.sh -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
--->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
- <java-wsdl>
- <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint" style="rpc">
- </service>
- <namespaces target-namespace="http://ws.test.jboss.org/jbws1316" type-namespace="http://ws.test.jboss.org/jbws1316/types"/>
- <mapping file="jaxrpc-mapping.xml"/>
- <webservices servlet-link="TestEndpoint"/>
- </java-wsdl>
-</configuration>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml (from rev 6437, stack/native/trunk/src/test/resources/jaxrpc/jbws1316/wstools-config.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/src/test/resources/jaxrpc/jbws1316/wstools-config.xml 2008-04-17 12:31:12 UTC (rev 6469)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools.sh -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1316.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://ws.test.jboss.org/jbws1316" type-namespace="http://ws.test.jboss.org/jbws1316/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+</configuration>
16 years, 9 months
JBossWS SVN: r6468 - stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-04-17 08:17:25 -0400 (Thu, 17 Apr 2008)
New Revision: 6468
Modified:
stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java
Log:
refactoring - no functional change
Modified: stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java 2008-04-17 11:42:18 UTC (rev 6467)
+++ stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/DescriptorDeploymentAspect.java 2008-04-17 12:17:25 UTC (rev 6468)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.stack.cxf;
-//$Id: XFireServicesDeployer.java 3802 2007-07-05 16:44:32Z thomas.diesler(a)jboss.com $
+//$Id: DescriptorDeploymentAspect.java 3802 2007-07-05 16:44:32Z thomas.diesler(a)jboss.com $
import java.io.IOException;
import java.net.URL;
@@ -39,7 +39,7 @@
import org.jboss.wsf.stack.cxf.metadata.services.DDEndpoint;
/**
- * A deployer that generates cxf.xml
+ * A deployer that locates or generates cxf.xml
*
* @author Thomas.Diesler(a)jboss.org
* @since 10-May-2007
@@ -61,90 +61,153 @@
{
this.invokerJSE = invokerJSE;
}
-
+
+ @Override
public void create(Deployment dep, WSFRuntime runtime)
{
- // Look for cxf.xml descriptor
+ URL cxfURL = getCXFConfigFromClassLoader(dep);
+ if (cxfURL == null)
+ {
+ cxfURL = getCXFConfigFromDeployment(dep);
+ if (cxfURL == null)
+ {
+ cxfURL = generateCXFConfigFromDeployment(dep);
+ }
+ putCXFConfigToDeployment(dep, cxfURL);
+ }
+ }
+
+ @Override
+ public void destroy(Deployment dep, WSFRuntime runtime)
+ {
+ DDBeans dd = dep.getAttachment(DDBeans.class);
+ if (dd != null)
+ {
+ dd.destroyFileURL();
+ }
+ }
+
+ /**
+ * Looks for <b>cxf.xml</b> in classloader
+ * @param dep deployment which initial classloader will be used
+ * @return <b>cxf.xml URL</b> or <b>null</b> if not found
+ */
+ private static URL getCXFConfigFromClassLoader(Deployment dep)
+ {
ClassLoader initCL = dep.getInitialClassLoader();
URL cxfURL = initCL.getResource("cxf.xml");
if (cxfURL != null)
{
log.info("CXF configuration found: " + cxfURL);
}
+ return cxfURL;
+ }
+
+ /**
+ * Looks for <b>jbossws-cxf.xml</b> in:
+ * <ul>
+ * <li><b>META-INF</b> resource directory for EJB3 deployment</li>
+ * <li><b>WEB-INF</b> resource directory for POJO deployment</li>
+ * </ul>
+ * @param dep deployment where to look for resources
+ * @return <b>jbossws-cxf.xml URL</b> or <b>null</b> if not found
+ */
+ private static URL getCXFConfigFromDeployment(Deployment dep)
+ {
+ DeploymentType depType = dep.getType();
+
+ String metadir;
+ if (depType == DeploymentType.JAXWS_EJB3)
+ {
+ // expected resource location for EJB3 deployments
+ metadir = "META-INF";
+ }
+ else if (depType == DeploymentType.JAXWS_JSE)
+ {
+ // expected resource location for POJO deployments
+ metadir = "WEB-INF";
+ }
else
{
- // Look for jbossws-cxf.xml descriptor
- DeploymentType depType = dep.getType();
-
- String metadir;
+ // only POJO and EJB3 deployments are supported
+ throw new IllegalStateException("Unsupported deployment type: " + depType);
+ }
+
+ URL cxfURL = null;
+ try
+ {
+ // get resource URL
+ ArchiveDeployment archDep = (ArchiveDeployment)dep;
+ cxfURL = archDep.getMetaDataFileURL(metadir + "/jbossws-cxf.xml");
+ log.info("JBossWS-CXF configuration found: " + cxfURL);
+ }
+ catch (IOException ignore)
+ {
+ // resource not found
+ }
+
+ return cxfURL;
+ }
+
+ /**
+ * Generated CXF descriptor from deployment
+ * @param dep deployment
+ * @return CXF descriptor URL
+ */
+ private URL generateCXFConfigFromDeployment(Deployment dep)
+ {
+ // Generate the jbossws-cxf.xml descriptor
+ DeploymentType depType = dep.getType();
+
+ DDBeans dd = new DDBeans();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String id = ep.getShortName();
+ String address = ep.getAddress();
+ String implementor = ep.getTargetBeanName();
+
+ DDEndpoint ddep = new DDEndpoint(id, address, implementor);
+
if (depType == DeploymentType.JAXWS_EJB3)
- metadir = "META-INF";
- else if (depType == DeploymentType.JAXWS_JSE)
- metadir = "WEB-INF";
- else
- throw new IllegalStateException("Unsupported deployment type: " + depType);
-
- try
{
- ArchiveDeployment archdep = (ArchiveDeployment)dep;
- cxfURL = archdep.getMetaDataFileURL(metadir + "/jbossws-cxf.xml");
- log.info("JBossWS-CXF configuration found: " + cxfURL);
+ ddep.setInvoker(invokerEJB3);
}
- catch (IOException ex)
+
+ if (depType == DeploymentType.JAXWS_JSE)
{
- // ignore, jbossws-cxf.xml not found
+ ddep.setInvoker(invokerJSE);
}
-
- // Generate the jbossws-cxf.xml descriptor
- if (cxfURL == null)
- {
- DDBeans dd = new DDBeans();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String id = ep.getShortName();
- String address = ep.getAddress();
- String implementor = ep.getTargetBeanName();
- DDEndpoint ddep = new DDEndpoint(id, address, implementor);
+ log.info("Add " + ddep);
+ dd.addEndpoint(ddep);
+ }
- if (depType == DeploymentType.JAXWS_EJB3)
- {
- ddep.setInvoker(invokerEJB3);
- }
+ URL cxfURL = dd.createFileURL();
+ log.info("JBossWS-CXF configuration generated: " + cxfURL);
- if (depType == DeploymentType.JAXWS_JSE)
- {
- ddep.setInvoker(invokerJSE);
- }
+ dep.addAttachment(DDBeans.class, dd);
- log.info("Add " + ddep);
- dd.addEndpoint(ddep);
- }
-
- cxfURL = dd.createFileURL();
- log.info("JBossWS-CXF configuration generated: " + cxfURL);
-
- dep.addAttachment(DDBeans.class, dd);
- }
-
- String propKey = "org.jboss.ws.webapp.ContextParameterMap";
- Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
- if (contextParams == null)
- {
- contextParams = new HashMap<String, String>();
- dep.setProperty(propKey, contextParams);
- }
-
- contextParams.put(CXFServletExt.PARAM_CXF_BEANS_URL, cxfURL.toExternalForm());
- }
+ return cxfURL;
}
- public void destroy(Deployment dep, WSFRuntime runtime)
+ /**
+ * Puts CXF config file to deployment property <b>org.jboss.ws.webapp.ContextParameterMap</b> map
+ * @param dep deployment where to put
+ * @param cxfURL to be put
+ */
+ private static void putCXFConfigToDeployment(Deployment dep, URL cxfURL)
{
- DDBeans dd = dep.getAttachment(DDBeans.class);
- if (dd != null)
+ // get property map
+ String propKey = "org.jboss.ws.webapp.ContextParameterMap";
+ Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
+ if (contextParams == null)
{
- dd.destroyFileURL();
+ // if there's no associated map with the property create it now
+ contextParams = new HashMap<String, String>();
+ dep.setProperty(propKey, contextParams);
}
+ // put cxf config URL to the property map
+ contextParams.put(CXFServletExt.PARAM_CXF_BEANS_URL, cxfURL.toExternalForm());
}
-}
\ No newline at end of file
+
+}
16 years, 9 months
JBossWS SVN: r6467 - stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-04-17 07:42:18 -0400 (Thu, 17 Apr 2008)
New Revision: 6467
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/version.properties
Log:
[JBPAPP-790] Set patch version.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/version.properties 2008-04-17 11:29:20 UTC (rev 6466)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/version.properties 2008-04-17 11:42:18 UTC (rev 6467)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=2.0.1.SP2
-repository.id=2.0.1.SP2
+version.id=2.0.1.SP2_JBPAPP-790
+repository.id=2.0.1.SP2_JBPAPP-790
implementation.title=JBoss Web Services - Native
implementation.url=http://www.jboss.org/products/jbossws
16 years, 9 months
JBossWS SVN: r6466 - stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-04-17 07:29:20 -0400 (Thu, 17 Apr 2008)
New Revision: 6466
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/.classpath
Log:
[JBPAPP-790] Set patch version.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/.classpath
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/.classpath 2008-04-17 10:57:02 UTC (rev 6465)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/.classpath 2008-04-17 11:29:20 UTC (rev 6466)
@@ -11,6 +11,7 @@
<classpathentry kind="lib" path="thirdparty/jaxb-impl.jar"/>
<classpathentry kind="lib" path="thirdparty/jaxb-xjc.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-dependency.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss-javaee.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-j2ee.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-logging-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
16 years, 9 months
JBossWS SVN: r6465 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-04-17 06:57:02 -0400 (Thu, 17 Apr 2008)
New Revision: 6465
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790/
Log:
Branch for [JBPAPP-790]
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-790 (from rev 6464, stack/native/tags/jbossws-native-2.0.1.SP2)
16 years, 9 months