JBossWS SVN: r9102 - framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-23 05:23:47 -0500 (Fri, 23 Jan 2009)
New Revision: 9102
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
Log:
[JBWS-2479] skipping @XmlJavaTypeAdapter whit Metro
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2009-01-22 19:15:07 UTC (rev 9101)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2009-01-23 10:23:47 UTC (rev 9102)
@@ -42,7 +42,7 @@
private static final String EXT = ":".equals( PS ) ? ".sh" : ".bat";
private String WSDL_LOCATION = "jaxws" + FS + "smoke" + FS + "tools" + FS + "wsdl" + FS + "TestServiceCatalog.wsdl";
- private String ENDPOINT_CLASS = "org.jboss.test.ws.jaxws.smoke.tools.CalculatorBean";
+ private String ENDPOINT_CLASS;
private String JBOSS_HOME;
private String CLASSES_DIR;
@@ -56,6 +56,8 @@
JBOSS_HOME = System.getProperty("jboss.home");
CLASSES_DIR = System.getProperty("test.classes.directory");
+ //JBWS-2479
+ ENDPOINT_CLASS = isIntegrationMetro() ? "org.jboss.test.ws.jaxws.smoke.tools.CalculatorBeanMetro" : "org.jboss.test.ws.jaxws.smoke.tools.CalculatorBean";
TEST_DIR = createResourceFile("..").getAbsolutePath();
origJavaHome = System.getProperty("java.home");
15 years, 11 months
JBossWS SVN: r9101 - stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-22 14:15:07 -0500 (Thu, 22 Jan 2009)
New Revision: 9101
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
[JBWS-2450] default 2.0
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-22 19:14:50 UTC (rev 9100)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2009-01-22 19:15:07 UTC (rev 9101)
@@ -51,7 +51,7 @@
private PrintStream messageStream;
private String wsdlLocation;
private List<String> additionalCompilerClassPath = new ArrayList<String>();
- private String target = "2.1";
+ private String target = "2.0";
@Override
public void setBindingFiles(List<File> bindingFiles)
15 years, 11 months
JBossWS SVN: r9100 - in framework/branches/jaxws21/testsuite/test: resources/jaxws/smoke/tools/wsdl and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-22 14:14:50 -0500 (Thu, 22 Jan 2009)
New Revision: 9100
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
framework/branches/jaxws21/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl
Log:
[JBWS-2482][JBWS-2464][JBWS-2450] Updating target 2.1 testcase + checking @XmlSeeAlso conformance requirement
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-22 17:20:44 UTC (rev 9099)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-22 19:14:50 UTC (rev 9100)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
+import java.rmi.RemoteException;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
@@ -46,7 +47,7 @@
}
@WebMethod
- public Set<Integer> getKeys(HashMap<Integer, String> map)
+ public Set<Integer> getKeys(HashMap<Integer, String> map) throws RuntimeException, RemoteException
{
if (map != null)
return map.keySet();
Modified: framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
===================================================================
--- framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2009-01-22 17:20:44 UTC (rev 9099)
+++ framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2009-01-22 19:14:50 UTC (rev 9100)
@@ -24,6 +24,7 @@
import org.jboss.wsf.spi.tools.WSContractConsumer;
import org.jboss.wsf.test.JBossWSTest;
+import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.WebServiceFeature;
import java.io.*;
import java.lang.reflect.Method;
@@ -263,41 +264,39 @@
consumer.setTargetPackage("org.jboss.test.ws.tools.testTarget");
consumer.setGenerateSource(true);
consumer.setTarget("2.1");
+ consumer.setNoCompile(false);
- try
+ if (isIntegrationNative())
{
- consumeWSDL();
- fail("Target 2.1 should not be supported");
+ System.out.println("FIXME [JBWS-] Fix WSConsumerPlugin.testTarget() classloading issue");
}
- catch (Exception e)
+ else
{
- File outputDir = new File(outputDirectory, "org/jboss/test/ws/tools/testTarget");
- outputDir.deleteOnExit();
- return;
- }
-
- URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL() });
- String seiClassName = "org.jboss.test.ws.tools.testTarget.TestService";
- Class sei = loader.loadClass(seiClassName);
-
- boolean featureSig = false;
- for (Method m : sei.getDeclaredMethods())
- {
- if (m.getName().equals("getEndpointInterfacePort"))
+ consumeWSDL();
+ ClassLoader loader = getArtefactClassLoader();
+ Class<?> service = loader.loadClass("org.jboss.test.ws.tools.testTarget.TestService");
+
+ boolean featureSig = false;
+ for (Method m : service.getDeclaredMethods())
{
- for (Class c : m.getParameterTypes())
+ if (m.getName().equals("getEndpointInterfacePort"))
{
- if (c.isArray() && c.getComponentType().equals(WebServiceFeature.class))
+ for (Class<?> c : m.getParameterTypes())
{
- featureSig = true;
- break;
+ if (c.isArray() && c.getComponentType().equals(WebServiceFeature.class))
+ {
+ featureSig = true;
+ break;
+ }
}
}
}
+
+ assertTrue("JAX-WS 2.1 extensions not generated with 'target=2.1'", featureSig);
+
+ Class<?> sei = loader.loadClass("org.jboss.test.ws.tools.testTarget.EndpointInterface");
+ assertTrue("@XmlSeeAlso expected on SEI (types not referenced by the Port in the wsdl)", sei.isAnnotationPresent(XmlSeeAlso.class));
}
-
- assertTrue("JAX-WS 2.1 extensions not generated with 'target=2.1'", featureSig);
-
}
/**
@@ -332,4 +331,13 @@
if(!sei.exists()) throw new IllegalStateException(sei.getAbsolutePath() + " doesn't exist!");
return sei;
}
+
+ private ClassLoader getArtefactClassLoader() throws Exception {
+ URLClassLoader loader = new URLClassLoader(
+ new URL[] { outputDirectory.toURL() },
+ Thread.currentThread().getContextClassLoader()
+ );
+
+ return loader;
+ }
}
Modified: framework/branches/jaxws21/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl
===================================================================
--- framework/branches/jaxws21/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl 2009-01-22 17:20:44 UTC (rev 9099)
+++ framework/branches/jaxws21/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl 2009-01-22 19:14:50 UTC (rev 9100)
@@ -6,7 +6,16 @@
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
- <types/>
+ <types>
+ <xs:schema targetNamespace='http://foo.bar.com/test' version='1.0' xmlns:tns='http://foo.bar.com/test' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:complexType name="foo">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
<message name="EndpointInterface_echo">
<part name="String_1" type="xsd:string"/>
</message>
15 years, 11 months
JBossWS SVN: r9099 - stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-22 12:20:44 -0500 (Thu, 22 Jan 2009)
New Revision: 9099
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
Log:
[JBWS-2467] RuntimeException is not mapped to wsdl
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2009-01-22 16:36:24 UTC (rev 9098)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2009-01-22 17:20:44 UTC (rev 9099)
@@ -811,8 +811,15 @@
// Add faults
for (Class<?> exClass : method.getExceptionTypes())
- if (!RemoteException.class.isAssignableFrom(exClass))
+ {
+ // Conformance 3.25 (java.lang.RuntimeExceptions and java.rmi.RemoteExceptions):
+ // java.lang.RuntimeException and java.rmi.RemoteException and their subclasses
+ // MUST NOT be treated as service specific exceptions and MUST NOT be mapped to WSDL.
+ if (!RemoteException.class.isAssignableFrom(exClass) && !RuntimeException.class.isAssignableFrom(exClass))
+ {
addFault(opMetaData, exClass);
+ }
+ }
// process operation meta data extension
processMetaExtensions(method, epMetaData, opMetaData);
15 years, 11 months
JBossWS SVN: r9098 - in stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws: core/jaxws/client and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-22 11:36:24 -0500 (Thu, 22 Jan 2009)
New Revision: 9098
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/FastInfoset.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/JsonEncoding.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
Log:
[JBWS-2446] Adding @WebServiceFeature meta-annotation to JsonEncoding and FastInfoset feature annotation + rejecting unsupported features
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/FastInfoset.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/FastInfoset.java 2009-01-22 15:14:24 UTC (rev 9097)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/FastInfoset.java 2009-01-22 16:36:24 UTC (rev 9098)
@@ -26,6 +26,8 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.xml.ws.spi.WebServiceFeatureAnnotation;
+
import org.jboss.ws.feature.FastInfosetFeature;
/**
@@ -37,6 +39,7 @@
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE })
@EndpointFeature( id = FastInfosetFeature.ID)
+@WebServiceFeatureAnnotation(id = FastInfosetFeature.ID, bean = FastInfosetFeature.class)
public @interface FastInfoset {
/**
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/JsonEncoding.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/JsonEncoding.java 2009-01-22 15:14:24 UTC (rev 9097)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/annotation/JsonEncoding.java 2009-01-22 16:36:24 UTC (rev 9098)
@@ -26,6 +26,8 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.xml.ws.spi.WebServiceFeatureAnnotation;
+
import org.jboss.ws.feature.JsonEncodingFeature;
/**
@@ -37,6 +39,7 @@
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE })
@EndpointFeature(id = JsonEncodingFeature.ID)
+@WebServiceFeatureAnnotation(id = JsonEncodingFeature.ID, bean = JsonEncodingFeature.class)
public @interface JsonEncoding {
/**
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2009-01-22 15:14:24 UTC (rev 9097)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2009-01-22 16:36:24 UTC (rev 9098)
@@ -35,6 +35,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxws.binding.BindingExt;
import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+import org.jboss.ws.feature.FastInfosetFeature;
+import org.jboss.ws.feature.JsonEncodingFeature;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.wsdl.Extendable;
@@ -59,14 +61,31 @@
public static <T> void processFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
{
+ boolean supportedFeature = false;
+ if (feature instanceof FastInfosetFeature || feature instanceof JsonEncodingFeature)
+ supportedFeature = true;
+ supportedFeature = supportedFeature || processAddressingFeature(feature, epMetaData, stub);
+ supportedFeature = supportedFeature || processMTOMFeature(feature, epMetaData, stub);
+ supportedFeature = supportedFeature || processRespectBindingFeature(feature, epMetaData, stub);
+ if (!supportedFeature)
+ {
+ throw new IllegalArgumentException("Unsupported feature: " + feature);
+ }
epMetaData.addFeature(feature);
- processAddressingFeature(feature, epMetaData, stub);
- processMTOMFeature(feature, epMetaData, stub);
- processRespectBindingFeature(feature, epMetaData, stub);
}
+ /**
+ * Returns true or false depending on the provided WebServiceFeature being an AddressingFeature or not.
+ * In the former case, addressing is setup.
+ *
+ * @param <T>
+ * @param feature
+ * @param epMetaData
+ * @param stub
+ * @return
+ */
@SuppressWarnings("unchecked")
- private static <T> void processAddressingFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
+ private static <T> boolean processAddressingFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
{
if (feature instanceof AddressingFeature && feature.isEnabled())
{
@@ -74,19 +93,43 @@
List<Handler> handlers = bindingExt.getHandlerChain(HandlerType.POST);
handlers.add(new WSAddressingClientHandler());
bindingExt.setHandlerChain(handlers, HandlerType.POST);
+ return true;
}
+ return false;
}
- private static <T> void processMTOMFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
+ /**
+ * Returns true or false depending on the provided WebServiceFeature being an MTOMFeature or not.
+ * In the former case, mtom is setup.
+ *
+ * @param <T>
+ * @param feature
+ * @param epMetaData
+ * @param stub
+ * @return
+ */
+ private static <T> boolean processMTOMFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
{
if (feature instanceof MTOMFeature)
{
SOAPBinding binding = (SOAPBinding)((BindingProvider)stub).getBinding();
binding.setMTOMEnabled(feature.isEnabled());
+ return true;
}
+ return false;
}
- private static <T> void processRespectBindingFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
+ /**
+ * Returns true or false depending on the provided WebServiceFeature being an RespectBindingFeature or not.
+ * In the former case, the respect binding checks are performed.
+ *
+ * @param <T>
+ * @param feature
+ * @param epMetaData
+ * @param stub
+ * @return
+ */
+ private static <T> boolean processRespectBindingFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
{
if (feature instanceof RespectBindingFeature && feature.isEnabled())
{
@@ -113,7 +156,9 @@
log.warn("Cannot find port " + epMetaData.getPortName());
}
}
+ return true;
}
+ return false;
}
private static void checkNotUnderstoodExtElements(Extendable extendable, EndpointMetaData epMetaData)
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2009-01-22 15:14:24 UTC (rev 9097)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2009-01-22 16:36:24 UTC (rev 9098)
@@ -34,6 +34,7 @@
import javax.xml.ws.soap.MTOM;
import javax.xml.ws.soap.MTOMFeature;
import javax.xml.ws.soap.SOAPBinding;
+import javax.xml.ws.spi.WebServiceFeatureAnnotation;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
@@ -74,40 +75,48 @@
{
for (Annotation an : sepClass.getAnnotations())
{
- if (an.annotationType() == Addressing.class)
+ WebServiceFeatureAnnotation wsfa = an.annotationType().getAnnotation(WebServiceFeatureAnnotation.class);
+ if (wsfa != null)
{
- Addressing anFeature = sepClass.getAnnotation(Addressing.class);
- AddressingFeature feature = new AddressingFeature(anFeature.enabled(), anFeature.required());
- sepMetaData.addFeature(feature);
+ if (an.annotationType() == Addressing.class)
+ {
+ Addressing anFeature = sepClass.getAnnotation(Addressing.class);
+ AddressingFeature feature = new AddressingFeature(anFeature.enabled(), anFeature.required());
+ sepMetaData.addFeature(feature);
+ }
+ else if (an.annotationType() == MTOM.class)
+ {
+ MTOM anFeature = sepClass.getAnnotation(MTOM.class);
+ MTOMFeature feature = new MTOMFeature(anFeature.enabled(), anFeature.threshold());
+ sepMetaData.addFeature(feature);
+ }
+ else if (an.annotationType() == SchemaValidation.class)
+ {
+ processSchemaValidation(dep, sepMetaData, sepClass);
+ }
+ else if (an.annotationType() == FastInfoset.class)
+ {
+ FastInfoset anFeature = sepClass.getAnnotation(FastInfoset.class);
+ FastInfosetFeature feature = new FastInfosetFeature(anFeature.enabled());
+ sepMetaData.addFeature(feature);
+ }
+ else if (an.annotationType() == JsonEncoding.class)
+ {
+ JsonEncoding anFeature = sepClass.getAnnotation(JsonEncoding.class);
+ JsonEncodingFeature feature = new JsonEncodingFeature(anFeature.enabled());
+ sepMetaData.addFeature(feature);
+ }
+ else if (an.annotationType() == RespectBinding.class)
+ {
+ RespectBinding anFeature = sepClass.getAnnotation(RespectBinding.class);
+ RespectBindingFeature feature = new RespectBindingFeature(anFeature.enabled());
+ sepMetaData.addFeature(feature);
+ }
+ else
+ {
+ throw new WebServiceException("Unsupported feature: " + wsfa.bean());
+ }
}
- else if (an.annotationType() == MTOM.class)
- {
- MTOM anFeature = sepClass.getAnnotation(MTOM.class);
- MTOMFeature feature = new MTOMFeature(anFeature.enabled(), anFeature.threshold());
- sepMetaData.addFeature(feature);
- }
- else if (an.annotationType() == SchemaValidation.class)
- {
- processSchemaValidation(dep, sepMetaData, sepClass);
- }
- else if (an.annotationType() == FastInfoset.class)
- {
- FastInfoset anFeature = sepClass.getAnnotation(FastInfoset.class);
- FastInfosetFeature feature = new FastInfosetFeature(anFeature.enabled());
- sepMetaData.addFeature(feature);
- }
- else if (an.annotationType() == JsonEncoding.class)
- {
- JsonEncoding anFeature = sepClass.getAnnotation(JsonEncoding.class);
- JsonEncodingFeature feature = new JsonEncodingFeature(anFeature.enabled());
- sepMetaData.addFeature(feature);
- }
- else if (an.annotationType() == RespectBinding.class)
- {
- RespectBinding anFeature = sepClass.getAnnotation(RespectBinding.class);
- RespectBindingFeature feature = new RespectBindingFeature(anFeature.enabled());
- sepMetaData.addFeature(feature);
- }
}
}
15 years, 11 months
JBossWS SVN: r9097 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-01-22 10:14:24 -0500 (Thu, 22 Jan 2009)
New Revision: 9097
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/SOAPMessageContextJAXWS.java
Log:
[JBWS-2432] fix NPE
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/SOAPMessageContextJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/SOAPMessageContextJAXWS.java 2009-01-22 15:06:00 UTC (rev 9096)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/SOAPMessageContextJAXWS.java 2009-01-22 15:14:24 UTC (rev 9097)
@@ -98,14 +98,14 @@
Name hName = hElement.getElementName();
if (qname.equals(new QName(hName.getURI(), hName.getLocalName())))
{
- URI actor = new URI(hElement.getActor());
+ URI actor = null;
+ if (hElement.getActor() != null)
+ {
+ actor = new URI(hElement.getActor());
+ }
if (roles.contains(actor) || allRoles)
{
headers.add(hElement);
-
- // FIXME
- // SOAPMessageContext.getHeaders should return unmarshalled objects
- // http://jira.jboss.org/jira/browse/JBWS-1105
}
}
}
15 years, 11 months
JBossWS SVN: r9096 - in stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws: metadata/builder/jaxws and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-22 10:06:00 -0500 (Thu, 22 Jan 2009)
New Revision: 9096
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
Log:
[JBWS-2472] Adding comment
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2009-01-22 14:50:23 UTC (rev 9095)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2009-01-22 15:06:00 UTC (rev 9096)
@@ -99,6 +99,11 @@
WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(epMetaData.getPortName());
if (wsdlEndpoint != null)
{
+ // Conformance 6.11 (javax.xml.ws.RespectBindingFeature): When the javax.xml.ws.RespectBindingFeature
+ // is enabled, a JAX-WS implementation MUST inspect the wsdl:binding at runtime to determine
+ // result and parameter bindings as well as any wsdl:extensions that have the required=true attribute.
+ // All required wsdl:extensions MUST be supported and honored by a JAX-WS implementation unless a
+ // specific wsdl:extension has be explicitly disabled via a WebServiceFeature.
checkNotUnderstoodExtElements(wsdlEndpoint, epMetaData);
WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(wsdlEndpoint.getBinding());
checkNotUnderstoodExtElements(wsdlBinding, epMetaData);
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2009-01-22 14:50:23 UTC (rev 9095)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2009-01-22 15:06:00 UTC (rev 9096)
@@ -167,6 +167,11 @@
WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(sepMetaData.getPortName());
if (wsdlEndpoint != null)
{
+ // Conformance 6.11 (javax.xml.ws.RespectBindingFeature): When the javax.xml.ws.RespectBindingFeature
+ // is enabled, a JAX-WS implementation MUST inspect the wsdl:binding at runtime to determine
+ // result and parameter bindings as well as any wsdl:extensions that have the required=true attribute.
+ // All required wsdl:extensions MUST be supported and honored by a JAX-WS implementation unless a
+ // specific wsdl:extension has be explicitly disabled via a WebServiceFeature.
checkNotUnderstoodExtElements(wsdlEndpoint, sepMetaData);
WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(wsdlEndpoint.getBinding());
checkNotUnderstoodExtElements(wsdlBinding, sepMetaData);
15 years, 11 months
JBossWS SVN: r9095 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-01-22 09:50:23 -0500 (Thu, 22 Jan 2009)
New Revision: 9095
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
Log:
[JBWS-2114] fixing issue
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2009-01-22 14:44:06 UTC (rev 9094)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2009-01-22 14:50:23 UTC (rev 9095)
@@ -63,6 +63,8 @@
*/
public abstract class AbstractInvoker implements Invoker
{
+ private static final Object[] NO_ARGS = new Object[]{};
+
public Object invoke(Exchange exchange, Object o)
{
// set up the webservice request context
@@ -90,16 +92,19 @@
MethodDispatcher md = (MethodDispatcher)exchange.get(Service.class).get(MethodDispatcher.class.getName());
Method m = md.getMethod(bop);
- Object[] params;
- if (o instanceof List<?>)
+ Object[] params = NO_ARGS;
+ if (m.getParameterTypes().length != 0)
{
- List<Object> paramList = CastUtils.cast((List<?>)o);
- params = paramList.toArray();
+ if (o instanceof List<?>)
+ {
+ List<Object> paramList = CastUtils.cast((List<?>)o);
+ params = paramList.toArray();
+ }
+ else
+ {
+ params = new Object[]{o};
+ }
}
- else
- {
- params = new Object[]{o};
- }
Endpoint ep = EndpointAssociation.getEndpoint();
InvocationHandler invHandler = ep.getInvocationHandler();
15 years, 11 months
JBossWS SVN: r9094 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640: ant-import-tests and 12 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-01-22 09:44:06 -0500 (Thu, 22 Jan 2009)
New Revision: 9094
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Role.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Config.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/resources/schema/jboss-ws-security_1_0.xsd
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/version.properties
Log:
[JBPAPP-1640] WS-Security Usename Token Profile JAAS Implementation for JSE based WebServices.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/ant-import-tests/build-jars-jaxws.xml 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/ant-import-tests/build-jars-jaxws.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -497,6 +497,17 @@
<include name="wsdl/**"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws1999 -->
+ <war warfile="${tests.output.dir}/libs/jaxws-jbws1999.war" webxml="${tests.output.dir}/resources/jaxws/jbws1999/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1999/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws1999/*TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/jbws1999/WEB-INF">
+ <include name="*"/>
+ </webinf>
+ </war>
<!-- jaxws-jbws2009 -->
<war warfile="${tests.output.dir}/libs/jaxws-jbws2009.war" webxml="${tests.output.dir}/resources/jaxws/jbws2009/WEB-INF/web.xml">
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -144,7 +144,7 @@
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
BindingExt binding = (BindingExt)getBindingProvider().getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, binding.getHandlerChain(type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, binding.getHandlerChain(type), false);
executorMap.put(type, executor);
MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -63,10 +63,14 @@
protected int falseIndex = -1;
// True if the current direction is outbound
protected Boolean isOutbound;
+ // True if this is for the server/endpoint side, used to determine client side specific
+ // conformance requirements.
+ private boolean serverSide;
- public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler> unsortedChain)
+ public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler> unsortedChain, boolean serverSide)
{
this.epMetaData = epMetaData;
+ this.serverSide = serverSide;
// Sort handler logical handlers first
List<Handler> sortedChain = new ArrayList<Handler>();
@@ -266,9 +270,17 @@
// the client MUST be passed on to the application. If the exception in question is a subclass of WebService-
// Exception then an implementation MUST rethrow it as-is, without any additional wrapping, otherwise it
// MUST throw a WebServiceException whose cause is set to the exception that was thrown during handler processing.
- private void processHandlerFailure(Exception ex)
+ private void processHandlerFailure(RuntimeException ex)
{
log.error("Exception during handler processing", ex);
+
+ // If this call is server side then the conformance requirement specific to
+ // clients can be avoided.
+ if (serverSide == true)
+ {
+ throw ex;
+ }
+
if (ex instanceof WebServiceException)
{
throw (WebServiceException)ex;
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -142,7 +142,8 @@
if (type == HandlerType.ALL)
throw new IllegalArgumentException("Invalid handler type: " + type);
- HandlerChainExecutor executor = new HandlerChainExecutor(sepMetaData, getHandlerChain(sepMetaData, type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(sepMetaData, getHandlerChain(sepMetaData, type), true);
+
if (type == HandlerType.PRE)
preExecutor.set(executor);
else if (type == HandlerType.ENDPOINT)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java (from rev 9013, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/AuthorizeOperation.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,157 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.extensions.security;
+
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.security.auth.Subject;
+
+import org.jboss.logging.Logger;
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.RealmMapping;
+import org.jboss.security.SimplePrincipal;
+import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.wsse.Authorize;
+import org.jboss.ws.metadata.wsse.Role;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+
+/**
+ * Operation to authenticate and check the authorisation of the
+ * current user.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @since December 23rd 2008
+ */
+public class AuthorizeOperation
+{
+
+ private static final Logger log = Logger.getLogger(AuthorizeOperation.class);
+
+ private Authorize authorize;
+
+ private AuthenticationManager am;
+
+ private RealmMapping rm;
+
+ private SecurityAdaptorFactory secAdapterfactory;
+
+ public AuthorizeOperation(Authorize authorize)
+ {
+ this.authorize = authorize;
+
+ try
+ {
+ Context ctx = new InitialContext();
+ Object obj = ctx.lookup("java:comp/env/security/securityMgr");
+ am = (AuthenticationManager)obj;
+ rm = (RealmMapping)am;
+ }
+ catch (NamingException ne)
+ {
+ throw new WSException("Unable to lookup AuthenticationManager", ne);
+ }
+
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ secAdapterfactory = spiProvider.getSPI(SecurityAdaptorFactory.class);
+ }
+
+ public void process() throws WSSecurityException
+ {
+ boolean TRACE = log.isTraceEnabled();
+
+ if (TRACE)
+ log.trace("About to check authorization, using security domain '" + am.getSecurityDomain() + "'");
+
+ // Step 1 - Authenticate using currently associated principals.
+ SecurityAdaptor securityAdaptor = secAdapterfactory.newSecurityAdapter();
+ Principal principal = securityAdaptor.getPrincipal();
+ Object credential = securityAdaptor.getCredential();
+
+ Subject subject = new Subject();
+
+ if (am.isValid(principal, credential, subject) == false)
+ {
+ String msg = "Authentication failed, principal=" + principal;
+ log.error(msg);
+ SecurityException e = new SecurityException(msg);
+ throw new FailedAuthenticationException(e);
+ }
+
+ securityAdaptor.pushSubjectContext(subject, principal, credential);
+
+ if (TRACE)
+ log.trace("Authenticated, principal=" + principal);
+
+ // Step 2 - If unchecked all ok so return.
+ if (authorize.isUnchecked())
+ {
+ if (TRACE)
+ log.trace("authorize.isUnchecked()==true skipping roles check.");
+
+ return;
+ }
+
+ // Step 3 - If roles specified check user in role.
+ Set<Principal> expectedRoles = expectedRoles();
+ if (TRACE)
+ log.trace("expectedRoles=" + expectedRoles);
+
+ if (rm.doesUserHaveRole(principal, expectedRoles) == false)
+ {
+ Set<Principal> userRoles = rm.getUserRoles(principal);
+ String msg = "Insufficient method permissions, principal=" + principal + ", requiredRoles=" + expectedRoles + ", principalRoles=" + userRoles;
+ log.error(msg);
+ SecurityException e = new SecurityException(msg);
+ throw new FailedAuthenticationException(e);
+ }
+
+ if (TRACE)
+ log.trace("Roles check complete, principal=" + principal + ", requiredRoles=" + expectedRoles);
+ }
+
+ private Set<Principal> expectedRoles()
+ {
+ List<Role> roles = authorize.getRoles();
+ int rolesCount = (roles != null) ? roles.size() : 0;
+ Set<Principal> expectedRoles = new HashSet<Principal>(rolesCount);
+
+ if (roles != null)
+ {
+ for (Role current : roles)
+ {
+ expectedRoles.add(new SimplePrincipal(current.getName()));
+ }
+ }
+
+ return expectedRoles;
+ }
+
+}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -52,6 +52,7 @@
{
UsernameToken user = (UsernameToken)token;
SecurityAdaptor securityAdaptor = secAdapterfactory.newSecurityAdapter();
+
securityAdaptor.setPrincipal(new SimplePrincipal(user.getUsername()));
securityAdaptor.setCredential(user.getPassword());
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -38,6 +38,8 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+
+
/**
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
* @version $Revision$
@@ -54,7 +56,7 @@
private SecurityStore store;
- private TimestampVerification timestampVerification;
+ private TimestampVerification timestampVerification;
private HashSet<String> signedIds = new HashSet<String>();
@@ -136,7 +138,8 @@
if (ids != null)
encryptedIds.addAll(ids);
}
- }
+ }
+
}
public void verify(List<OperationDescription<RequireOperation>> requireOperations) throws WSSecurityException
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -41,6 +41,7 @@
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.wsse.Authorize;
import org.jboss.ws.metadata.wsse.Config;
import org.jboss.ws.metadata.wsse.Encrypt;
import org.jboss.ws.metadata.wsse.Operation;
@@ -112,8 +113,8 @@
SOAPHeader soapHeader = soapMessage.getSOAPHeader();
QName secQName = new QName(Constants.WSSE_NS, "Security");
- Element secHeaderElement = (soapHeader != null) ? Util.findElement(soapHeader, secQName) : null;
-
+ Element secHeaderElement = (soapHeader != null) ? Util.findElement(soapHeader, secQName) : null;
+
if (secHeaderElement == null)
{
// This is ok, we always allow faults to be received because WS-Security does not encrypt faults
@@ -134,20 +135,39 @@
if (hasRequirements(config, operation, port))
throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."));
-
- return;
}
try
{
- SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(), config.getTrustStoreURL(),
- config.getTrustStoreType(), config.getTrustStorePassword());
- SecurityDecoder decoder = new SecurityDecoder(securityStore, config.getTimestampVerification());
+ if (secHeaderElement != null)
+ {
+ decodeHeader(ctx, config, soapMessage, secHeaderElement);
+ }
- decoder.decode(soapMessage.getSOAPPart(), secHeaderElement);
+ Config operationConfig = getConfig(ctx, config, soapMessage);
+ authorize(operationConfig);
+ }
+ catch (WSSecurityException e)
+ {
+ if (e.isInternalError())
+ log.error("Internal error occured handling inbound message:", e);
+ else if(log.isDebugEnabled()) log.debug("Returning error to sender: " + e.getMessage());
+
+ throw convertToFault(e);
+ }
+ }
+
+
+ private static void decodeHeader(CommonMessageContext ctx, WSSecurityConfiguration configuration, SOAPMessageImpl message, Element secHeaderElement) throws WSSecurityException, SOAPException
+ {
+ SecurityStore securityStore = new SecurityStore(configuration.getKeyStoreURL(), configuration.getKeyStoreType(), configuration.getKeyStorePassword(), configuration.getKeyPasswords(), configuration.getTrustStoreURL(),
+ configuration.getTrustStoreType(), configuration.getTrustStorePassword());
+ SecurityDecoder decoder = new SecurityDecoder(securityStore, configuration.getTimestampVerification());
+
+ decoder.decode(message.getSOAPPart(), secHeaderElement);
if (log.isTraceEnabled())
- log.trace("Decoded Message:\n" + DOMWriter.printNode(soapMessage.getSOAPPart(), true));
+ log.trace("Decoded Message:\n" + DOMWriter.printNode(message.getSOAPPart(), true));
OperationMetaData opMetaData = ctx.getOperationMetaData();
if (opMetaData == null)
@@ -155,29 +175,52 @@
// Get the operation meta data from the soap message
// for the server side inbound message.
EndpointMetaData epMetaData = ctx.getEndpointMetaData();
- opMetaData = soapMessage.getOperationMetaData(epMetaData);
+ opMetaData = message.getOperationMetaData(epMetaData);
}
String operation = opMetaData.getQName().toString();
String port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();
- List<OperationDescription<RequireOperation>> operations = buildRequireOperations(config, operation, port);
+ List<OperationDescription<RequireOperation>> operations = buildRequireOperations(configuration, operation, port);
decoder.verify(operations);
if(log.isDebugEnabled()) log.debug("Verification is successful");
decoder.complete();
+ }
+
+ private static void authorize(Config config) throws WSSecurityException
+ {
+ if (config != null)
+ {
+ Authorize authorize = config.getAuthorize();
+ if (authorize != null)
+ {
+ AuthorizeOperation authorizeOp = new AuthorizeOperation(authorize);
+ authorizeOp.process();
+ }
}
- catch (WSSecurityException e)
+ }
+
+
+ private static Config getConfig(CommonMessageContext ctx, WSSecurityConfiguration configuration, SOAPMessageImpl message) throws SOAPException
+ {
+ OperationMetaData opMetaData = ctx.getOperationMetaData();
+ if (opMetaData == null)
{
- if (e.isInternalError())
- log.error("Internal error occured handling inbound message:", e);
- else if(log.isDebugEnabled()) log.debug("Returning error to sender: " + e.getMessage());
-
- throw convertToFault(e);
+ // Get the operation meta data from the soap message
+ // for the server side inbound message.
+ EndpointMetaData epMetaData = ctx.getEndpointMetaData();
+ opMetaData = message.getOperationMetaData(epMetaData);
}
- }
+ String operation = opMetaData.getQName().toString();
+ String port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();
+
+ return getConfig(configuration, port, operation);
+ }
+
+
private static WSSecurityConfiguration getSecurityConfig(CommonMessageContext ctx)
{
WSSecurityConfiguration config = ctx.getEndpointMetaData().getServiceMetaData().getSecurityConfiguration();
@@ -194,8 +237,8 @@
}
private static List<OperationDescription<RequireOperation>> buildRequireOperations(WSSecurityConfiguration config, String operation, String port)
- {
- Config operationConfig = getConfig(config, port, operation);
+ {
+ Config operationConfig = getConfig(config, port, operation);
if (operationConfig == null)
return null;
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java (from rev 9013, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.metadata.wsse;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <code>Authorize</code> specifies that the users credentials should be
+ * checked to ensure the user is authorized to call the endpoint.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class Authorize implements Serializable
+{
+
+ private Unchecked unchecked;
+
+ private List<Role> roles = new ArrayList<Role>();
+
+ public List<Role> getRoles()
+ {
+ return Collections.unmodifiableList(roles);
+ }
+
+ public void addRole(final Role role)
+ {
+ if (isUnchecked())
+ {
+ throw new IllegalStateException("Can not add role after setting 'Unchecked'");
+ }
+ roles.add(role);
+ }
+
+ public boolean isUnchecked()
+ {
+ return unchecked != null;
+ }
+
+ void setUnchecked(Unchecked unchecked)
+ {
+ if (roles.isEmpty() == false)
+ {
+ throw new IllegalStateException("Can not set 'Unchecked' with role(s) defined.");
+ }
+ this.unchecked = unchecked;
+ }
+
+}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Config.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -38,6 +38,7 @@
private Sign sign;
private Encrypt encrypt;
private Requires requires;
+ private Authorize authorize;
public Encrypt getEncrypt()
{
@@ -88,4 +89,14 @@
{
this.requires = requires;
}
+
+ public Authorize getAuthorize()
+ {
+ return this.authorize;
+ }
+
+ public void setAuthorize(Authorize authorize)
+ {
+ this.authorize = authorize;
+ }
}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Role.java (from rev 9013, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Role.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Role.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Role.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * <code>Role</code> representation of a role authorized to call an endpoint.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class Role implements Serializable
+{
+
+ private String name;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.name;
+ }
+
+}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java (from rev 9013, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * <code>Unchecked</code> used when all authenticated users are authorized.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class Unchecked implements Serializable
+{
+
+}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -284,6 +284,10 @@
{
return new Username();
}
+ else if ("authorize".equals(localName))
+ {
+ return new Authorize();
+ }
return null;
}
@@ -332,7 +336,34 @@
log.trace("addChild: [obj=" + config + ",child=" + requires + "]");
config.setRequires(requires);
}
-
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Config config, Authorize authorize, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + config + ",child=" + authorize + "]");
+ config.setAuthorize(authorize);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Authorize authorize, Unchecked unchecked, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + authorize + ",child=" + unchecked + "]");
+ authorize.setUnchecked(unchecked);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Authorize authorize, Role role, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + authorize + ",child=" + role + "]");
+ authorize.addRole(role);
+ }
+
private Object handleTargets(Object object, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
log.trace("newChild: " + localName);
@@ -385,9 +416,28 @@
return null;
}
+
/**
* Called when parsing of a new element started.
*/
+ public Object newChild(Authorize authorize, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("unchecked".equals(localName))
+ {
+ return new Unchecked();
+ }
+ else if ("role".equals(localName))
+ {
+ return new Role();
+ }
+
+ return null;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
public Object newChild(RequireSignature requireSignature, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
return handleTargets(requireSignature, navigator, namespaceURI, localName, attrs);
@@ -407,7 +457,14 @@
target.setValue(value);
}
+
+ public void setValue(Role role, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + role + ",value=" + value + "]");
+ role.setName(value);
+ }
+
/**
* Called when parsing character is complete.
*/
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/resources/schema/jboss-ws-security_1_0.xsd 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/resources/schema/jboss-ws-security_1_0.xsd 2009-01-22 14:44:06 UTC (rev 9094)
@@ -126,6 +126,16 @@
<xs:documentation>Specifies the security requirements that should be applied when receiving a response from the communicating party. If this is not specified, all messages will be allowed through.</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="authorize" type="authorizeType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Specifies that authentication is required and either provides a list of roles authorized to access the endpoint or unchecked if any
+ authenticated user can access the endpoint.
+
+ This should only be used for POJO endpoints, EJB3 endpoints should configure security as for any other EJB3 session bean.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="requireTimestampType">
@@ -277,4 +287,19 @@
</xs:element>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="authorizeType">
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="role" type="xs:string" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Specifies a role that is allowed to call the endpoint.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="unchecked" type="uncheckedType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that any authenticated user can call the endpoint.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="uncheckedType"/>
</xs:schema>
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -30,7 +30,7 @@
*
* @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
* @version $Revision$
- * @since Aril 14 2008
+ * @since April 14 2008
*/
public interface TestEndpoint extends Remote
{
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999 (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import javax.jws.WebService;
-
-/**
- * Test Endpoint to test UsernameToken authorization / authentication
- * for POJO endpoints.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 12th January 2008
- * @see https://jira.jboss.org/jira/browse/JBWS-1999
- */
-@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws1999")
-public interface Endpoint
-{
-
- public String echoUnchecked(final String message);
-
- public String echoFriendRequired(final String message);
-
- public String echoEnemyRequired(final String message);
-
- public String echoNoSecurity(final String message);
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import javax.jws.WebService;
+
+/**
+ * Test Endpoint to test UsernameToken authorization / authentication
+ * for POJO endpoints.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 12th January 2008
+ * @see https://jira.jboss.org/jira/browse/JBWS-1999
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws1999")
+public interface Endpoint
+{
+
+ public String echoUnchecked(final String message);
+
+ public String echoFriendRequired(final String message);
+
+ public String echoEnemyRequired(final String message);
+
+ public String echoNoSecurity(final String message);
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import javax.jws.WebService;
-
-import org.jboss.ws.annotation.EndpointConfig;
-
-/**
- * Test Endpoint to test UsernameToken authorization / authentication
- * for POJO endpoints.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 12th January 2008
- * @see https://jira.jboss.org/jira/browse/JBWS-1999
- */
-@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://ws.jboss.org/jbws1999", endpointInterface = "org.jboss.test.ws.jaxws.jbws1999.Endpoint")
-@EndpointConfig(configName = "Standard WSSecurity Endpoint")
-public class EndpointImpl implements Endpoint
-{
-
- public String echoEnemyRequired(final String message)
- {
- return message;
- }
-
- public String echoFriendRequired(final String message)
- {
- return message;
- }
-
- public String echoNoSecurity(final String message)
- {
- return message;
- }
-
- public String echoUnchecked(final String message)
- {
- return message;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import javax.jws.WebService;
+
+import org.jboss.ws.annotation.EndpointConfig;
+
+/**
+ * Test Endpoint to test UsernameToken authorization / authentication
+ * for POJO endpoints.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 12th January 2008
+ * @see https://jira.jboss.org/jira/browse/JBWS-1999
+ */
+@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://ws.jboss.org/jbws1999", endpointInterface = "org.jboss.test.ws.jaxws.jbws1999.Endpoint")
+@EndpointConfig(configName = "Standard WSSecurity Endpoint")
+public class EndpointImpl implements Endpoint
+{
+
+ public String echoEnemyRequired(final String message)
+ {
+ return message;
+ }
+
+ public String echoFriendRequired(final String message)
+ {
+ return message;
+ }
+
+ public String echoNoSecurity(final String message)
+ {
+ return message;
+ }
+
+ public String echoUnchecked(final String message)
+ {
+ return message;
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,211 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.metadata.wsse.Authorize;
-import org.jboss.ws.metadata.wsse.Config;
-import org.jboss.ws.metadata.wsse.Port;
-import org.jboss.ws.metadata.wsse.Role;
-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 'authorize' configuration.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
- * @since December 18th 2008
- */
-public class JBWS1999ConfigurationTestCase extends JBossWSTest
-{
-
- private WSSecurityConfiguration load(final String fileName) throws IOException
- {
- File configFile = getResourceFile("jaxws/jbws1999/config/" + fileName);
- WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
-
- return factory.parse(configFile.toURL());
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * which contains two roles.
- */
- public void testDefaultRoles() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-default-roles.xml");
-
- Config config = wsConfig.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 2 roles", 2, roles.size());
-
- List<String> roleNames = new ArrayList<String>(roles.size());
- for (Role current : roles)
- {
- roleNames.add(current.getName());
- }
- assertTrue("Expected 'Trader' role.", roleNames.contains("Trader"));
- assertTrue("Expected 'Banker' role.", roleNames.contains("Banker"));
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * which contains two roles.
- */
- public void testPortRoles() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-port-roles.xml");
-
- Port port = wsConfig.getPorts().get("TestPort");
- Config config = port.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 2 roles", 2, roles.size());
-
- List<String> roleNames = new ArrayList<String>(roles.size());
- for (Role current : roles)
- {
- roleNames.add(current.getName());
- }
- assertTrue("Expected 'Trader' role.", roleNames.contains("Trader"));
- assertTrue("Expected 'Banker' role.", roleNames.contains("Banker"));
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * which contains one role.
- */
- public void testDefaultRole() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role.xml");
-
- Config config = wsConfig.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 1 roles", 1, roles.size());
-
- Role role = roles.get(0);
- assertEquals("Expected 'Trader' role.", "Trader", role.getName());
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * which contains one role.
- */
- public void testPortRole() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role.xml");
-
- Port port = wsConfig.getPorts().get("TestPort");
- Config config = port.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 1 roles", 1, roles.size());
-
- Role role = roles.get(0);
- assertEquals("Expected 'Trader' role.", "Trader", role.getName());
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * with unchecked.
- */
- public void testDefaultUnchecked() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-default-unchecked.xml");
-
- Config config = wsConfig.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertTrue("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 0 roles", 0, roles.size());
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * with unchecked.
- */
- public void testPortUnchecked() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-port-unchecked.xml");
-
- Port port = wsConfig.getPorts().get("TestPort");
- Config config = port.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertTrue("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 0 roles", 0, roles.size());
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * with unchecked and a role defined, parsing should fail.
- */
- public void testDefaultRoleUnchecked() throws Exception
- {
- try
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role-unchecked.xml");
- fail("Expected exception not thrown.");
- }
- catch (IOException expected)
- {
- Throwable cause = expected.getCause();
- assertEquals(IllegalStateException.class, cause.getClass());
- }
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * with unchecked and a role defined, parsing should fail.
- */
- public void testPortRoleUnchecked() throws Exception
- {
- try
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role-unchecked.xml");
- fail("Expected exception not thrown.");
- }
- catch (IOException expected)
- {
- Throwable cause = expected.getCause();
- assertEquals(IllegalStateException.class, cause.getClass());
- }
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,211 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.metadata.wsse.Authorize;
+import org.jboss.ws.metadata.wsse.Config;
+import org.jboss.ws.metadata.wsse.Port;
+import org.jboss.ws.metadata.wsse.Role;
+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 'authorize' configuration.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class JBWS1999ConfigurationTestCase extends JBossWSTest
+{
+
+ private WSSecurityConfiguration load(final String fileName) throws IOException
+ {
+ File configFile = new File("resources/jaxws/jbws1999/config/" + fileName);
+ WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
+
+ return factory.parse(configFile.toURL());
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * which contains two roles.
+ */
+ public void testDefaultRoles() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-default-roles.xml");
+
+ Config config = wsConfig.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 2 roles", 2, roles.size());
+
+ List<String> roleNames = new ArrayList<String>(roles.size());
+ for (Role current : roles)
+ {
+ roleNames.add(current.getName());
+ }
+ assertTrue("Expected 'Trader' role.", roleNames.contains("Trader"));
+ assertTrue("Expected 'Banker' role.", roleNames.contains("Banker"));
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * which contains two roles.
+ */
+ public void testPortRoles() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-port-roles.xml");
+
+ Port port = wsConfig.getPorts().get("TestPort");
+ Config config = port.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 2 roles", 2, roles.size());
+
+ List<String> roleNames = new ArrayList<String>(roles.size());
+ for (Role current : roles)
+ {
+ roleNames.add(current.getName());
+ }
+ assertTrue("Expected 'Trader' role.", roleNames.contains("Trader"));
+ assertTrue("Expected 'Banker' role.", roleNames.contains("Banker"));
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * which contains one role.
+ */
+ public void testDefaultRole() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role.xml");
+
+ Config config = wsConfig.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 1 roles", 1, roles.size());
+
+ Role role = roles.get(0);
+ assertEquals("Expected 'Trader' role.", "Trader", role.getName());
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * which contains one role.
+ */
+ public void testPortRole() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role.xml");
+
+ Port port = wsConfig.getPorts().get("TestPort");
+ Config config = port.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 1 roles", 1, roles.size());
+
+ Role role = roles.get(0);
+ assertEquals("Expected 'Trader' role.", "Trader", role.getName());
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * with unchecked.
+ */
+ public void testDefaultUnchecked() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-default-unchecked.xml");
+
+ Config config = wsConfig.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertTrue("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 0 roles", 0, roles.size());
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * with unchecked.
+ */
+ public void testPortUnchecked() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-port-unchecked.xml");
+
+ Port port = wsConfig.getPorts().get("TestPort");
+ Config config = port.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertTrue("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 0 roles", 0, roles.size());
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * with unchecked and a role defined, parsing should fail.
+ */
+ public void testDefaultRoleUnchecked() throws Exception
+ {
+ try
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role-unchecked.xml");
+ fail("Expected exception not thrown.");
+ }
+ catch (IOException expected)
+ {
+ Throwable cause = expected.getCause();
+ assertEquals(IllegalStateException.class, cause.getClass());
+ }
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * with unchecked and a role defined, parsing should fail.
+ */
+ public void testPortRoleUnchecked() throws Exception
+ {
+ try
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role-unchecked.xml");
+ fail("Expected exception not thrown.");
+ }
+ catch (IOException expected)
+ {
+ Throwable cause = expected.getCause();
+ assertEquals(IllegalStateException.class, cause.getClass());
+ }
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,196 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import java.net.URL;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.soap.SOAPFaultException;
-
-import junit.framework.Test;
-
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.extensions.security.exception.FailedAuthenticationException;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Test case to test UsernameToken authorization / authentication
- * for POJO endpoints.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 12th January 2008
- * @see https://jira.jboss.org/jira/browse/JBWS-1999
- */
-public class JBWS1999TestCase extends JBossWSTest
-{
-
- private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1999";
-
- private static final String FAULT_CODE = "wsse:FailedAuthentication";
-
- private static final String FAULT_STRING = FailedAuthenticationException.faultString;
-
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS1999TestCase.class, "jaxws-jbws1999.war");
- }
-
- public void testNoSecurity() throws Exception
- {
- Endpoint endpoint = getPort(false);
-
- String message = "NoSecurity Message";
-
- String response = endpoint.echoNoSecurity(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testUnchecked_Default() throws Exception
- {
- Endpoint endpoint = getPort(false);
-
- String message = "UncheckedDefault Message";
-
- String response = endpoint.echoUnchecked(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testUnchecked() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
-
- String message = "Unchecked Message";
-
- String response = endpoint.echoUnchecked(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testUnchecked_WrongPassword() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
-
- String message = "Unchecked_WrongPassword Message";
-
- try
- {
- endpoint.echoUnchecked(message);
- fail("Expected SOAPFaultException not thrown!!");
- }
- catch (SOAPFaultException sfe)
- {
- SOAPFault fault = sfe.getFault();
- String faultCode = fault.getFaultCode();
- assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault String", FAULT_STRING, faultString);
- }
-
- }
-
- public void testFriendRequired() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
-
- String message = "FriendRequired Message";
-
- String response = endpoint.echoFriendRequired(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testFriendRequired_WrongPassword() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
-
- String message = "FriendRequired Message";
-
- try
- {
- endpoint.echoFriendRequired(message);
- fail("Expected SOAPFaultException not thrown!!");
- }
- catch (SOAPFaultException sfe)
- {
- SOAPFault fault = sfe.getFault();
- String faultCode = fault.getFaultCode();
- assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
- }
- }
-
- public void testEnemyRequired() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
-
- String message = "EnemyRequired Message";
-
- try
- {
- endpoint.echoEnemyRequired(message);
- fail("Expected SOAPFaultException not thrown!!");
- }
- catch (SOAPFaultException sfe)
- {
- SOAPFault fault = sfe.getFault();
- String faultCode = fault.getFaultCode();
- System.out.println(faultCode);
- assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
- }
- }
-
- private Endpoint getPort(boolean enableSecurity) throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://ws.jboss.org/jbws1999", "EndpointService");
- Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
- if (enableSecurity == true)
- {
- URL securityURL = getResourceURL("jaxws/jbws1999/jboss-wsse-client.xml");
- ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
- ((StubExt)port).setConfigName("Standard WSSecurity Client");
- }
-
- return port;
- }
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,195 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPFault;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test case to test UsernameToken authorization / authentication
+ * for POJO endpoints.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 12th January 2008
+ * @see https://jira.jboss.org/jira/browse/JBWS-1999
+ */
+public class JBWS1999TestCase extends JBossWSTest
+{
+
+ private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1999";
+
+ private static final String FAULT_CODE = "wsse:FailedAuthentication";
+
+ private static final String FAULT_STRING = "The security token could not be authenticated or authorized.";
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS1999TestCase.class, "jaxws-jbws1999.war");
+ }
+
+ public void testNoSecurity() throws Exception
+ {
+ Endpoint endpoint = getPort(false);
+
+ String message = "NoSecurity Message";
+
+ String response = endpoint.echoNoSecurity(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testUnchecked_Default() throws Exception
+ {
+ Endpoint endpoint = getPort(false);
+
+ String message = "UncheckedDefault Message";
+
+ String response = endpoint.echoUnchecked(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testUnchecked() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String message = "Unchecked Message";
+
+ String response = endpoint.echoUnchecked(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testUnchecked_WrongPassword() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
+
+ String message = "Unchecked_WrongPassword Message";
+
+ try
+ {
+ endpoint.echoUnchecked(message);
+ fail("Expected SOAPFaultException not thrown!!");
+ }
+ catch (SOAPFaultException sfe)
+ {
+ SOAPFault fault = sfe.getFault();
+ String faultCode = fault.getFaultCode();
+ assertEquals("Fault Code", FAULT_CODE, faultCode);
+ String faultString = fault.getFaultString();
+ assertEquals("Fault String", FAULT_STRING, faultString);
+ }
+
+ }
+
+ public void testFriendRequired() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String message = "FriendRequired Message";
+
+ String response = endpoint.echoFriendRequired(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testFriendRequired_WrongPassword() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
+
+ String message = "FriendRequired Message";
+
+ try
+ {
+ endpoint.echoFriendRequired(message);
+ fail("Expected SOAPFaultException not thrown!!");
+ }
+ catch (SOAPFaultException sfe)
+ {
+ SOAPFault fault = sfe.getFault();
+ String faultCode = fault.getFaultCode();
+ assertEquals("Fault Code", FAULT_CODE, faultCode);
+ String faultString = fault.getFaultString();
+ assertEquals("Fault Message", FAULT_STRING, faultString);
+ }
+ }
+
+ public void testEnemyRequired() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext = ((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String message = "EnemyRequired Message";
+
+ try
+ {
+ endpoint.echoEnemyRequired(message);
+ fail("Expected SOAPFaultException not thrown!!");
+ }
+ catch (SOAPFaultException sfe)
+ {
+ SOAPFault fault = sfe.getFault();
+ String faultCode = fault.getFaultCode();
+ assertEquals("Fault Code", FAULT_CODE, faultCode);
+ String faultString = fault.getFaultString();
+ assertEquals("Fault Message", FAULT_STRING, faultString);
+ }
+ }
+
+ private Endpoint getPort(boolean enableSecurity) throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org/jbws1999", "EndpointService");
+ Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
+ if (enableSecurity == true)
+ {
+ URL securityURL = new File("resources/jaxws/jbws1999/jboss-wsse-client.xml").toURL();
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+ }
+
+ return port;
+ }
+}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999 (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/WEB-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
- <security-domain>java:/jaas/JBossWS</security-domain>
-
- <context-root>/jaxws-jbws1999</context-root>
-</jboss-web>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <security-domain>java:/jaas/JBossWS</security-domain>
+
+ <context-root>/jaxws-jbws1999</context-root>
+</jboss-web>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,34 +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">
-
- <port name="EndpointPort">
- <operation name="{http://ws.jboss.org/jbws1999}echoUnchecked">
- <config>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
- </operation>
-
- <operation name="{http://ws.jboss.org/jbws1999}echoFriendRequired">
- <config>
- <authorize>
- <role>friend</role>
- </authorize>
- </config>
- </operation>
-
- <operation name="{http://ws.jboss.org/jbws1999}echoEnemyRequired">
- <config>
- <authorize>
- <role>enemy</role>
- </authorize>
- </config>
- </operation>
- </port>
-
-
-
-</jboss-ws-security>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,34 @@
+<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">
+
+ <port name="EndpointPort">
+ <operation name="{http://ws.jboss.org/jbws1999}echoUnchecked">
+ <config>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+ </operation>
+
+ <operation name="{http://ws.jboss.org/jbws1999}echoFriendRequired">
+ <config>
+ <authorize>
+ <role>friend</role>
+ </authorize>
+ </config>
+ </operation>
+
+ <operation name="{http://ws.jboss.org/jbws1999}echoEnemyRequired">
+ <config>
+ <authorize>
+ <role>enemy</role>
+ </authorize>
+ </config>
+ </operation>
+ </port>
+
+
+
+</jboss-ws-security>
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" 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">
-
- <servlet>
- <servlet-name>Endpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws1999.EndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Endpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" 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">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1999.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,12 +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'>
-
- <config>
- <authorize>
- <role>Trader</role>
- <unchecked/>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,12 @@
+<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'>
+
+ <config>
+ <authorize>
+ <role>Trader</role>
+ <unchecked/>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,11 +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'>
-
- <config>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,11 @@
+<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'>
+
+ <config>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,12 +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'>
-
- <config>
- <authorize>
- <role>Banker</role>
- <role>Trader</role>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,12 @@
+<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'>
+
+ <config>
+ <authorize>
+ <role>Banker</role>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,11 +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'>
-
- <config>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,11 @@
+<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'>
+
+ <config>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,20 +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'>
-
- <config>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <role>Trader</role>
- <unchecked/>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,20 @@
+<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'>
+
+ <config>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <role>Trader</role>
+ <unchecked/>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,19 +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'>
-
- <config>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,19 @@
+<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'>
+
+ <config>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,20 +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'>
-
- <config>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <role>Banker</role>
- <role>Trader</role>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,20 @@
+<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'>
+
+ <config>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <role>Banker</role>
+ <role>Trader</role>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,19 +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'>
-
- <config>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,19 @@
+<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'>
+
+ <config>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml 2009-01-12 17:15:52 UTC (rev 9013)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -1,10 +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">
-
- <config>
- <username/>
-
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml (from rev 9013, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml 2009-01-22 14:44:06 UTC (rev 9094)
@@ -0,0 +1,10 @@
+<?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">
+
+ <config>
+ <username/>
+
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/version.properties 2009-01-22 14:43:14 UTC (rev 9093)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/version.properties 2009-01-22 14:44:06 UTC (rev 9094)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=2.0.1.SP2_CP04
-repository.id=2.0.1.SP2_CP04
+version.id=2.0.1.SP2_CP04_JBPAPP-1640
+repository.id=2.0.1.SP2_CP04_JBPAPP-1640
implementation.title=JBoss Web Services - Native
implementation.url=http://www.jboss.org/products/jbossws
@@ -24,7 +24,7 @@
wscommons-policy=1.0
# Dependend integration projects
-jbossws-spi=1.0.0.GA_CP01-brew
+jbossws-spi=1.0.0.GA_CP01_JBPAPP-1640
jbossws-common=1.0.0.GA_CP02-brew
jbossws-framework=2.0.1.GA_CP02-brew
jbossws-jboss40=2.0.1.GA
15 years, 11 months
JBossWS SVN: r9093 - stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-22 09:43:14 -0500 (Thu, 22 Jan 2009)
New Revision: 9093
Modified:
stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
Log:
[JBWS-2468] Adding comment
Modified: stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2009-01-22 14:41:38 UTC (rev 9092)
+++ stack/native/branches/jaxws21/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2009-01-22 14:43:14 UTC (rev 9093)
@@ -118,6 +118,12 @@
public <T extends EndpointReference> T getEndpointReference(Class<T> clazz)
{
+ // Conformance 4.5 (javax.xml.ws.BindingProvider.getEndpointReference): An implementation
+ // MUST be able to return an javax.xml.ws.EndpointReference for the target endpoint if a SOAP binding
+ // is being used. If the BindingProvider instance has a binding that is either SOAP 1.1/HTTP or
+ // SOAP 1.2/HTTP, then a W3CEndpointReference MUST be returned. If the binding is XML/HTTP an
+ // java.lang.UnsupportedOperationExceptionMUST be thrown.
+
if (binding instanceof HTTPBinding )
{
throw new UnsupportedOperationException("Cannot get epr for BindingProvider instances using the XML/HTTP binding");
15 years, 11 months