Author: jim.ma
Date: 2014-02-18 01:58:33 -0500 (Tue, 18 Feb 2014)
New Revision: 18388
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceEndpointImpl.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/jboss-webservices.xml
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/web.xml
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService.wsdl
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService_schema1.xsd
Removed:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jboss-webservices.xml
Modified:
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/JaspiAuthenticationTestCase.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/web.xml
Log:
Clean up log message;add test case to demonstrate enable jaspi authentication with
jboss-webservices.xml
Modified:
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java
===================================================================
---
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -224,16 +224,8 @@
@LogMessage(level = WARN)
@Message(id = 24100, value = "Could not delete wsdl directory %s")
void couldNotDeleteWsdlDirectory(String filename);
-
- @LogMessage(level = WARN)
- @Message(id = 24102, value = "No application policy found for security domain
'%s'")
- void noApplicationPolicy(String securityDomain);
-
- @LogMessage(level = WARN)
- @Message(id = 24103, value = "No JASPIAuthenticationInfo found for security
domain '%s'")
- void noJaspiApplicationPolicy(String securityDomain);
-
- @LogMessage(level = WARN)
- @Message(id = 24104, value = "Can not create Jaspi ServerAuthContext for
security domain '%s'")
- void cannotCreateServerAuthContext(String securityDomain, @Cause Throwable cause);
+
+ @LogMessage(level = INFO)
+ @Message(id = 24102, value = "jaspi authentication isn't enabled, can not
find jaspi modules and classes")
+ void cannotFindJaspiClasses();
}
Modified:
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java
===================================================================
---
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -34,6 +34,7 @@
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.metadata.config.ClientConfig;
import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
+import org.jboss.wsf.stack.cxf.Loggers;
/**
* CXF extension of common ClientConfigurer
@@ -74,7 +75,7 @@
}
catch (WSFException e)
{
- // ignore
+ Loggers.DEPLOYMENT_LOGGER.cannotFindJaspiClasses();
}
}
Modified:
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java
===================================================================
---
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -105,7 +105,7 @@
}
catch (Exception e)
{
- //ignore
+ Loggers.DEPLOYMENT_LOGGER.cannotCreateServerAuthContext(securityDomain, e);
}
return false;
Modified:
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java
===================================================================
---
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -42,18 +42,18 @@
Loggers DEPLOYMENT_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class,
"org.jboss.ws.cxf.deployment");
@LogMessage(level = WARN)
- @Message(id = 24102, value = "No application policy found for security domain
'%s'")
+ @Message(id = 24201, value = "No application policy found for security domain
'%s'")
void noApplicationPolicy(String securityDomain);
@LogMessage(level = WARN)
- @Message(id = 24103, value = "No JASPIAuthenticationInfo found for security
domain '%s'")
+ @Message(id = 24202, value = "No JASPIAuthenticationInfo found for security
domain '%s'")
void noJaspiApplicationPolicy(String securityDomain);
@LogMessage(level = WARN)
- @Message(id = 24104, value = "Can not create Jaspi ServerAuthContext for
security domain '%s'")
+ @Message(id = 24203, value = "Can not create Jaspi ServerAuthContext for
security domain '%s'")
void cannotCreateServerAuthContext(String securityDomain, @Cause Throwable cause);
@LogMessage(level = WARN)
- @Message(id = 24105, value = "Can not enable Jaspi authentication for
'%s' instance")
+ @Message(id = 24204, value = "Can not enable Jaspi authentication for
'%s' instance")
void cannotEnableJASPIAuthentication(String classname);
}
Modified:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
---
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -59,6 +59,7 @@
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
+import org.jboss.wsf.stack.cxf.Loggers;
import org.jboss.wsf.stack.cxf.client.Constants;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
import org.jboss.wsf.stack.cxf.extensions.policy.PolicySetsAnnotationListener;
@@ -118,21 +119,22 @@
Map<String, String> props = (wsmd == null) ? null : wsmd.getProperties();
setInterceptors(bus, props);
+ dep.addAttachment(Bus.class, bus);
try
{
final JASPIAuthenticationProvider jaspiProvider =
SPIProvider.getInstance().getSPI(
JASPIAuthenticationProvider.class,
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
- if (jaspiProvider != null)
+
+ if (jaspiProvider != null &&
jaspiProvider.enableServerAuthentication(dep, wsmd))
{
- jaspiProvider.enableServerAuthentication(dep, wsmd);
bus.getInInterceptors().add(new
AutenticationMgrSubjectCreatingInterceptor());
}
}
catch (WSFException e)
{
- // ignore
+ Loggers.DEPLOYMENT_LOGGER.cannotFindJaspiClasses();
}
setResourceResolver(bus, resolver);
Modified:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
===================================================================
---
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -38,6 +38,7 @@
import org.jboss.wsf.spi.metadata.config.ConfigRoot;
import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
import org.jboss.wsf.stack.cxf.JBossWSInvoker;
+import org.jboss.wsf.stack.cxf.Loggers;
import org.jboss.wsf.stack.cxf.Messages;
import org.jboss.wsf.stack.cxf.client.configuration.BeanCustomizer;
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
@@ -166,15 +167,14 @@
{
final JASPIAuthenticationProvider jaspiProvider =
SPIProvider.getInstance().getSPI(JASPIAuthenticationProvider.class,
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
- if (jaspiProvider != null)
+ if (jaspiProvider != null &&
jaspiProvider.enableServerAuthentication(endpoint, depEndpoints.get(0)))
{
- jaspiProvider.enableServerAuthentication(endpoint, depEndpoints.get(0));
endpoint.getInInterceptors().add(new
AutenticationMgrSubjectCreatingInterceptor());
}
}
catch (WSFException e)
{
- //ignore
+ Loggers.DEPLOYMENT_LOGGER.cannotFindJaspiClasses();
}
}
}
Modified:
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
---
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -137,7 +137,6 @@
holder.configure(resolver, configurer, wsmd, dep);
dep.addAttachment(BusHolder.class, holder);
- dep.addAttachment(Bus.class, holder.getBus());
if (holder instanceof SpringBusHolder)
{
for (Endpoint endpoint : dep.getService().getEndpoints())
Modified:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2014-02-18
06:58:33 UTC (rev 18388)
@@ -631,14 +631,14 @@
<!-- jaxws-samples-wsse-policy-username-jaspi -->
<war
-
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-username-jaspi.war"
+
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-username-endpoint-jaspi.war"
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/Service*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceIface.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceEndpointImpl.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
</classes>
<webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaspi/WEB-INF">
- <!--include name="jboss-*.xml"/-->
<include name="jaxws-*.xml"/>
<include name="wsdl/*"/>
</webinf>
@@ -646,6 +646,24 @@
<attribute name="Dependencies"
value="org.jboss.ws.cxf.jbossws-cxf-client,org.apache.cxf.impl"/> <!-- cxf
impl required due to custom interceptor in deployment -->
</manifest>
</war>
+
+ <!-- jaxws-samples-wsse-policy-username-jaspi-jbossws -->
+ <war
+
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-username-jbws-jaspi.war"
+
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceIface.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2">
+ <include name="jboss-*.xml"/>
+ <include name="wsdl/*"/>
+ </webinf>
+ <manifest>
+ <attribute name="Dependencies"
value="org.jboss.ws.cxf.jbossws-cxf-client,org.apache.cxf.impl"/> <!-- cxf
impl required due to custom interceptor in deployment -->
+ </manifest>
+ </war>
<!-- jaxws-samples-wsse-policy-username-jaspi-client -->
<war
Modified:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/JaspiAuthenticationTestCase.java
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/JaspiAuthenticationTestCase.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/JaspiAuthenticationTestCase.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -40,15 +40,19 @@
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
-
-//TODO: reuse jaas test
+/**
+ * TestCase to demonstrate jaspi authentication
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
public final class JaspiAuthenticationTestCase extends JBossWSTest
{
- private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-username-jaspi";
+ private final String serviceEndpointURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-username-endpoint-jaspi";
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-username-jbws-jaspi";
public static Test suite()
{
- TestSetup testSetup = new JBossWSCXFTestSetup(JaspiAuthenticationTestCase.class,
"jaxws-samples-wsse-policy-username-jaspi.war,
jaxws-samples-wsse-policy-username-jaspi-client.war") {
+ TestSetup testSetup = new JBossWSCXFTestSetup(JaspiAuthenticationTestCase.class,
"jaxws-samples-wsse-policy-username-endpoint-jaspi.war, " +
+ "jaxws-samples-wsse-policy-username-jbws-jaspi.war ,
jaxws-samples-wsse-policy-username-jaspi-client.war") {
public void setUp() throws Exception
{
@@ -68,7 +72,7 @@
JBossWSTestHelper.addJaspiSecurityDomain("jaspi",
"jaas-lm-stack", loginModuleOptions,
"org.jboss.wsf.stack.cxf.jaspi.module.UsernameTokenServerAuthModule",
authModuleOptions);
JBossWSTestHelper.addJaspiSecurityDomain("clientJaspi",
"jaas-lm-stack", loginModuleOptions,
"org.jboss.wsf.stack.cxf.jaspi.client.module.SOAPClientAuthModule",
- authModuleOptions);
+ authModuleOptions);
super.setUp();
}
@@ -83,7 +87,9 @@
return testSetup;
}
- public void testAuthenticated() throws Exception
+
+
+ public void testWebserviceMDEnableAuthenticated() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
@@ -92,11 +98,22 @@
setupWsse(proxy, "kermit");
assertEquals("Secure Hello World!", proxy.sayHello());
}
-
+
+
+ public void testEndpointEnableAuthenticated() throws Exception
+ {
+ QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
+ URL wsdlURL = new URL(serviceEndpointURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ setupWsse(proxy, "kermit");
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+
public void testUnauthenticated() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
+ URL wsdlURL = new URL(serviceEndpointURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "snoopy");
@@ -121,7 +138,7 @@
xli.loadConfig();
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"SecurityService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
+ URL wsdlURL = new URL(serviceEndpointURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy, "kermit");
@@ -132,7 +149,7 @@
public void testInContainerClientAuthModule() throws Exception
{
Helper helper = new Helper();
- helper.setTargetEndpoint("http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-username-jaspi");
+ helper.setTargetEndpoint("http://" + getServerHost() +
":8080/jaxws-samples-wsse-policy-username-endpoint-jaspi");
assertEquals("1", runTestInContainer("testJaspiClient"));
}
@@ -140,7 +157,7 @@
private String runTestInContainer(String test) throws Exception
{
URL url = new URL("http://" + getServerHost()
- +
":8080/jaxws-samples-wsse-policy-username-jaspi-client?path=/jaxws-samples-wsse-policy-username-jaspi&method="
+ test
+ +
":8080/jaxws-samples-wsse-policy-username-jaspi-client?path=/jaxws-samples-wsse-policy-username-endpoint-jaspi&method="
+ test
+ "&helper=" + Helper.class.getName());
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
return br.readLine();
@@ -153,4 +170,5 @@
((BindingProvider)proxy).getRequestContext()
.put(SecurityConstants.CALLBACK_HANDLER,
"org.jboss.test.ws.jaxws.samples.wsse.policy.jaspi.UsernamePasswordCallback");
}
+
}
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceEndpointImpl.java
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceEndpointImpl.java
(rev 0)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceEndpointImpl.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.samples.wsse.policy.jaspi;
+
+import javax.jws.WebService;
+
+import org.jboss.ws.api.annotation.EndpointConfig;
+
+@WebService
+(
+ portName = "SecurityServicePort",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService.wsdl",
+ targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
+ endpointInterface =
"org.jboss.test.ws.jaxws.samples.wsse.policy.jaspi.ServiceIface"
+)
+@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName =
"jaspiSecurityDomain")
+
+public class ServiceEndpointImpl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Secure Hello World!";
+ }
+
+ public String greetMe()
+ {
+ return "Greetings!";
+ }
+}
Property changes on:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceEndpointImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/ServiceImpl.java 2014-02-18
06:58:33 UTC (rev 18388)
@@ -23,8 +23,6 @@
import javax.jws.WebService;
-import org.jboss.ws.api.annotation.EndpointConfig;
-
@WebService
(
portName = "SecurityServicePort",
@@ -33,8 +31,6 @@
targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
endpointInterface =
"org.jboss.test.ws.jaxws.samples.wsse.policy.jaspi.ServiceIface"
)
-@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName =
"jaspiSecurityDomain")
-
public class ServiceImpl implements ServiceIface
{
public String sayHello()
Deleted:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jboss-webservices.xml
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jboss-webservices.xml 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/jboss-webservices.xml 2014-02-18
06:58:33 UTC (rev 18388)
@@ -1,13 +0,0 @@
-<?xml version="1.1" encoding="UTF-8"?>
-<webservices
-
xmlns="http://www.jboss.com/xml/ns/javaee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- version="1.2"
-
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee">
-
- <property>
- <name>jaspi.security.domain</name>
- <value>jaspi</value>
- </property>
-
-</webservices>
\ No newline at end of file
Modified:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/web.xml
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/web.xml 2014-02-17
15:10:33 UTC (rev 18387)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF/web.xml 2014-02-18
06:58:33 UTC (rev 18388)
@@ -6,7 +6,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>TestService</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.jaspi.ServiceImpl</servlet-class>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.jaspi.ServiceEndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestService</servlet-name>
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/jboss-webservices.xml
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/jboss-webservices.xml
(rev 0)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/jboss-webservices.xml 2014-02-18
06:58:33 UTC (rev 18388)
@@ -0,0 +1,13 @@
+<?xml version="1.1" encoding="UTF-8"?>
+<webservices
+
xmlns="http://www.jboss.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee">
+
+ <property>
+ <name>jaspi.security.domain</name>
+ <value>jaspi</value>
+ </property>
+
+</webservices>
\ No newline at end of file
Property changes on:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/jboss-webservices.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/web.xml
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/web.xml
(rev 0)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/web.xml 2014-02-18
06:58:33 UTC (rev 18388)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
+ version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.jaspi.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService.wsdl
(rev 0)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService.wsdl 2014-02-18
06:58:33 UTC (rev 18388)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypoli...
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:wsaws="http://www.w3.org/2005/08/addressing">
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypoli...
schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <message name="greetMe">
+ <part name="parameters" element="tns:greetMe"/>
+ </message>
+ <message name="greetMeResponse">
+ <part name="parameters" element="tns:greetMeResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ <operation name="greetMe">
+ <input message="tns:greetMe"/>
+ <output message="tns:greetMeResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <wsp:PolicyReference
URI="#SecurityServiceUsernameUnsecureTransportPolicy"/>
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="greetMe">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-jaas"/>
+ </port>
+ </service>
+
+ <wsp:Policy wsu:Id="SecurityServiceUsernameUnsecureTransportPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SupportingTokens
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&...
+ <wsp:Policy>
+ <sp:UsernameToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/...
+ <wsp:Policy>
+ <sp:WssUsernameToken10/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</definitions>
Property changes on:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService.wsdl
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService_schema1.xsd
===================================================================
---
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService_schema1.xsd
(rev 0)
+++
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService_schema1.xsd 2014-02-18
06:58:33 UTC (rev 18388)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<xs:schema version="1.0"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypoli...
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse"
type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="greetMe" type="tns:greetMe"/>
+
+ <xs:element name="greetMeResponse"
type="tns:greetMeResponse"/>
+
+ <xs:complexType name="greetMe">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="greetMeResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on:
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaspi/WEB-INF2/wsdl/SecurityService_schema1.xsd
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native