Author: mwringe
Date: 2011-04-18 17:47:36 -0400 (Mon, 18 Apr 2011)
New Revision: 6272
Added:
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/gatein/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/gatein/wsrp/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/gatein/wsrp/endpoints/
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java
components/wsrp/trunk/ws-security/pom.xml
components/wsrp/trunk/wsrp-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml
Log:
GTNWSRP-219: separate out some of the wss implementation to be separate so we can have it
disabled on AS6. Create JB5 specific producer which has wss handlers configured.
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-04-18
16:43:05 UTC (rev 6271)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-04-18
21:47:36 UTC (rev 6272)
@@ -720,6 +720,11 @@
{
return consumer.getProducerInfo().getEndpointConfigurationInfo().getWSSEnabled();
}
+
+ public boolean isWssAvailable()
+ {
+ return consumer.getProducerInfo().getEndpointConfigurationInfo().isWSSAvailable();
+ }
public void setWssEnabled(boolean enable)
{
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2011-04-18
16:43:05 UTC (rev 6271)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2011-04-18
21:47:36 UTC (rev 6272)
@@ -64,6 +64,7 @@
<h:message styleClass="portlet-msg-error" for="wsdl"/>
</td>
</tr>
+<c:if test="#{consumer.wssAvailable}">
<tr>
<th>#{i18n.edit_enable_ws_security}</th>
<td>
@@ -71,6 +72,7 @@
<h:message styleClass="portlet-msg-error" for="wsdl"/>
</td>
</tr>
+</c:if>
<c:if test="#{consumer.localInfoPresent}">
<tr>
<th>#{i18n.edit_consumer_registration}</th>
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java 2011-04-18
16:43:05 UTC (rev 6271)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java 2011-04-18
21:47:36 UTC (rev 6272)
@@ -247,4 +247,9 @@
{
serviceFactory.enableWSS(enable);
}
+
+ public boolean isWSSAvailable()
+ {
+ return serviceFactory.isWSSAvailable();
+ }
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2011-04-18
16:43:05 UTC (rev 6271)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2011-04-18
21:47:36 UTC (rev 6272)
@@ -519,6 +519,19 @@
return this.wssEnabled;
}
+ public boolean isWSSAvailable()
+ {
+ WebServiceSecurityFactory wssFactory = WebServiceSecurityFactory.getInstance();
+ if (wssFactory != null && wssFactory.getHandlers() != null &&
!wssFactory.getHandlers().isEmpty())
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
protected void addWSSHandlers(List<Handler> handlerChain)
{
if (wssEnabled)
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java 2011-04-18
16:43:05 UTC (rev 6271)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java 2011-04-18
21:47:36 UTC (rev 6272)
@@ -94,4 +94,5 @@
void enableWSS(boolean enable);
boolean isWSSEnabled();
+ boolean isWSSAvailable();
}
Modified: components/wsrp/trunk/ws-security/pom.xml
===================================================================
--- components/wsrp/trunk/ws-security/pom.xml 2011-04-18 16:43:05 UTC (rev 6271)
+++ components/wsrp/trunk/ws-security/pom.xml 2011-04-18 21:47:36 UTC (rev 6272)
@@ -38,5 +38,6 @@
<modules>
<module>wss</module>
<module>jboss5</module>
+ <module>wsrp-producer-jb5wss-producer-war</module>
</modules>
-</project>
\ No newline at end of file
+</project>
Added: components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml
(rev 0)
+++ components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml 2011-04-18
21:47:36 UTC (rev 6272)
@@ -0,0 +1,72 @@
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-wss-parent</artifactId>
+ <version>2.1.0-Beta02-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>wsrp-producer-jb5wss</artifactId>
+ <packaging>war</packaging>
+ <name>GateIn WSRP Producer WAR configured for JBoss AS5 Web Service
Security</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-producer</artifactId>
+ <type>war</type>
+ </dependency>
+ </dependencies>
+
+ <!-- Ignore all classes in the org.gatein.wsrp.test packages as they are not tests
-->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org/gatein/wsrp/test/**</exclude>
+ </excludes>
+ <!--<parallel>classes</parallel>
+ <threadCount>2</threadCount>-->
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <overlays>
+ <overlay>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-producer</artifactId>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml
===================================================================
---
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml
(rev 0)
+++
components/wsrp/trunk/ws-security/wsrp-producer-jb5wss-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml 2011-04-18
21:47:36 UTC (rev 6272)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<handler-chains
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
javaee_web_services_1_2.xsd"> <handler-chain>
+ <handler>
+
<handler-name>ProducerSecurityCredentialHandler</handler-name>
+
<handler-class>org.wsrp.wss.jboss5.handlers.producer.WSSecurityCredentialHandler</handler-class>
+ </handler>
+ <handler>
+ <handler-name>ProducerWSSecurityHandler</handler-name>
+ <handler-class>org.wsrp.wss.jboss5.handlers.producer.JBWSSecurityHandlerWrapper</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
+
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml 2011-04-18
16:43:05 UTC (rev 6271)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml 2011-04-18
21:47:36 UTC (rev 6272)
@@ -1,15 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<handler-chains
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
javaee_web_services_1_2.xsd"> <handler-chain>
- <handler>
-
<handler-name>ProducerSecurityCredentialHandler</handler-name>
-
<handler-class>org.wsrp.wss.jboss5.handlers.producer.WSSecurityCredentialHandler</handler-class>
- </handler>
- <handler>
- <handler-name>ProducerWSSecurityHandler</handler-name>
- <handler-class>org.wsrp.wss.jboss5.handlers.producer.JBWSSecurityHandlerWrapper</handler-class>
- </handler>
- </handler-chain>
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
javaee_web_services_1_2.xsd">
</handler-chains>