Author: mwringe
Date: 2011-03-08 13:14:47 -0500 (Tue, 08 Mar 2011)
New Revision: 5980
Added:
components/wsrp/trunk/wsrp-producer-war/src/main/webapp/WEB-INF/conf/gatein-wsse-producer.xml
Removed:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/interfaces/
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/interfaces/
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
components/wsrp/trunk/consumer/pom.xml
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/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/services/SOAPServiceFactoryTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/PortletManagementBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/RegistrationBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/ServiceDescriptionBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/TestWSRPProducerImpl.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/RegistrationBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/ServiceDescriptionBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/TestWSRPProducerImpl.java
components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java
components/wsrp/trunk/wsrp-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml
Log:
GTNWSRP-123: Update wss work. Allow for option in wsrp-admin to enable or disable wss on
consumer side. Remove xml handler configuration files for the consumer and dynamically add
them in the java code. Update to use JBWS wsse configuration files.
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-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -704,6 +704,16 @@
{
return consumer.getMigrationService().isAvailableExportInfosEmpty();
}
+
+ public boolean isWssEnabled()
+ {
+ return consumer.getProducerInfo().getEndpointConfigurationInfo().getWSSEnabled();
+ }
+
+ public void setWssEnabled(boolean enable)
+ {
+ consumer.getProducerInfo().getEndpointConfigurationInfo().setWSSEnabled(enable);
+ }
public static class SelectablePortletHandle implements
Comparable<SelectablePortletHandle>
{
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2011-03-08
18:14:47 UTC (rev 5980)
@@ -140,6 +140,7 @@
edit_consumer_import_title = Importing portlets
edit_consumer_export = Export portlets
edit_consumer_export_title = Exporting portlets
+edit_enable_ws_security= Enable WS Security:
# Confirm registration property deletion screen
confirm_delete_reg_property_title = Delete ''{0}'' registration property
description?
@@ -221,4 +222,4 @@
INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty
or contain '/', '.', '\\', '<', '>',
'(', ')', '=' or '%5c'
DUPLICATE_ERROR=A {1} named ''{0}'' already exists!
-unavailable_service = WSRP service is unavailble. Please activate it before using this
portlet.
\ No newline at end of file
+unavailable_service = WSRP service is unavailble. Please activate it before using this
portlet.
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-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2011-03-08
18:14:47 UTC (rev 5980)
@@ -64,6 +64,13 @@
<h:message styleClass="portlet-msg-error" for="wsdl"/>
</td>
</tr>
+<tr>
+ <th>#{i18n.edit_enable_ws_security}</th>
+ <td>
+ <h:selectBooleanCheckbox value="#{consumer.wssEnabled}"/>
+ <h:message styleClass="portlet-msg-error" for="wsdl"/>
+ </td>
+</tr>
<c:if test="#{consumer.localInfoPresent}">
<tr>
<th>#{i18n.edit_consumer_registration}</th>
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2011-03-08 13:38:01 UTC (rev 5979)
+++ components/wsrp/trunk/consumer/pom.xml 2011-03-08 18:14:47 UTC (rev 5980)
@@ -46,6 +46,10 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-wsrp2-ws</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-wss</artifactId>
+ </dependency>
<dependency>
<groupId>org.gatein.common</groupId>
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-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -237,4 +237,14 @@
{
return serviceFactory.getWSRPVersion();
}
+
+ public boolean getWSSEnabled()
+ {
+ return serviceFactory.isWSSEnabled();
+ }
+
+ public void setWSSEnabled(boolean enable)
+ {
+ serviceFactory.enableWSS(enable);
+ }
}
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-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -30,18 +30,19 @@
import org.gatein.wsrp.services.v1.V1PortletManagementService;
import org.gatein.wsrp.services.v1.V1RegistrationService;
import org.gatein.wsrp.services.v1.V1ServiceDescriptionService;
-import org.gatein.wsrp.services.v1.interfaces.V1MarkupPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1PortletManagementPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1RegistrationPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1ServiceDescriptionPortType;
import org.gatein.wsrp.services.v2.V2MarkupService;
import org.gatein.wsrp.services.v2.V2PortletManagementService;
import org.gatein.wsrp.services.v2.V2RegistrationService;
import org.gatein.wsrp.services.v2.V2ServiceDescriptionService;
-import org.gatein.wsrp.services.v2.interfaces.V2MarkupPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2PortletManagementPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2RegistrationPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2ServiceDescriptionPortType;
+import org.gatein.wsrp.wss.WebServiceSecurityFactory;
+import org.oasis.wsrp.v1.WSRPV1MarkupPortType;
+import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
+import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
+import org.oasis.wsrp.v1.WSRPV1ServiceDescriptionPortType;
+import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
+import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
+import org.oasis.wsrp.v2.WSRPV2RegistrationPortType;
+import org.oasis.wsrp.v2.WSRPV2ServiceDescriptionPortType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,6 +56,9 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
@@ -96,6 +100,8 @@
private boolean failed;
private boolean available;
private int msBeforeTimeOut = DEFAULT_TIMEOUT_MS;
+
+ private boolean wssEnabled;
private void setTimeout(Map<String, Object> requestContext)
{
@@ -132,12 +138,16 @@
{
handlerChain.add(REQUEST_HEADER_CLIENT_HANDLER);
}
+
+ addWSSHandlers(handlerChain);
}
else
{
// otherwise, create a handler chain and add our handler to it
handlerChain = new ArrayList<Handler>(1);
handlerChain.add(REQUEST_HEADER_CLIENT_HANDLER);
+
+ addWSSHandlers(handlerChain);
}
binding.setHandlerChain(handlerChain);
@@ -168,25 +178,25 @@
//
String portAddress = null;
boolean isMandatoryInterface = false;
- if (V2ServiceDescriptionPortType.class.isAssignableFrom(clazz)
- || V1ServiceDescriptionPortType.class.isAssignableFrom(clazz))
+ if (WSRPV2ServiceDescriptionPortType.class.isAssignableFrom(clazz)
+ || WSRPV1ServiceDescriptionPortType.class.isAssignableFrom(clazz))
{
portAddress = serviceDescriptionURL;
isMandatoryInterface = true;
}
- else if (V2MarkupPortType.class.isAssignableFrom(clazz)
- || V1MarkupPortType.class.isAssignableFrom(clazz))
+ else if (WSRPV2MarkupPortType.class.isAssignableFrom(clazz)
+ || WSRPV1MarkupPortType.class.isAssignableFrom(clazz))
{
portAddress = markupURL;
isMandatoryInterface = true;
}
- else if (V2RegistrationPortType.class.isAssignableFrom(clazz)
- || V1RegistrationPortType.class.isAssignableFrom(clazz))
+ else if (WSRPV2RegistrationPortType.class.isAssignableFrom(clazz)
+ || WSRPV1RegistrationPortType.class.isAssignableFrom(clazz))
{
portAddress = registrationURL;
}
- else if (V2PortletManagementPortType.class.isAssignableFrom(clazz)
- || V1PortletManagementPortType.class.isAssignableFrom(clazz))
+ else if (WSRPV2PortletManagementPortType.class.isAssignableFrom(clazz)
+ || WSRPV1PortletManagementPortType.class.isAssignableFrom(clazz))
{
portAddress = portletManagementURL;
}
@@ -304,12 +314,12 @@
Class portTypeClass = null;
try
{
- portTypeClass = V2MarkupPortType.class;
- V2MarkupPortType markupPortType =
wsService.getPort(V2MarkupPortType.class);
+ portTypeClass = WSRPV2MarkupPortType.class;
+ WSRPV2MarkupPortType markupPortType =
wsService.getPort(WSRPV2MarkupPortType.class);
markupURL =
(String)((BindingProvider)markupPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- portTypeClass = V2ServiceDescriptionPortType.class;
- V2ServiceDescriptionPortType sdPort =
wsService.getPort(V2ServiceDescriptionPortType.class);
+ portTypeClass = WSRPV2ServiceDescriptionPortType.class;
+ WSRPV2ServiceDescriptionPortType sdPort =
wsService.getPort(WSRPV2ServiceDescriptionPortType.class);
serviceDescriptionURL =
(String)((BindingProvider)sdPort).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
}
catch (Exception e)
@@ -321,7 +331,7 @@
try
{
- V2PortletManagementPortType managementPortType =
wsService.getPort(V2PortletManagementPortType.class);
+ WSRPV2PortletManagementPortType managementPortType =
wsService.getPort(WSRPV2PortletManagementPortType.class);
portletManagementURL =
(String)((BindingProvider)managementPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
}
catch (Exception e)
@@ -332,7 +342,7 @@
try
{
- V2RegistrationPortType registrationPortType =
wsService.getPort(V2RegistrationPortType.class);
+ WSRPV2RegistrationPortType registrationPortType =
wsService.getPort(WSRPV2RegistrationPortType.class);
registrationURL =
(String)((BindingProvider)registrationPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
}
catch (Exception e)
@@ -352,12 +362,12 @@
Class portTypeClass = null;
try
{
- portTypeClass = V1MarkupPortType.class;
- V1MarkupPortType markupPortType =
wsService.getPort(V1MarkupPortType.class);
+ portTypeClass = WSRPV1MarkupPortType.class;
+ WSRPV1MarkupPortType markupPortType =
wsService.getPort(WSRPV1MarkupPortType.class);
markupURL =
(String)((BindingProvider)markupPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- portTypeClass = V1ServiceDescriptionPortType.class;
- V1ServiceDescriptionPortType sdPort =
wsService.getPort(V1ServiceDescriptionPortType.class);
+ portTypeClass = WSRPV1ServiceDescriptionPortType.class;
+ WSRPV1ServiceDescriptionPortType sdPort =
wsService.getPort(WSRPV1ServiceDescriptionPortType.class);
serviceDescriptionURL =
(String)((BindingProvider)sdPort).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
}
catch (Exception e)
@@ -368,7 +378,7 @@
try
{
- V1PortletManagementPortType managementPortType =
wsService.getPort(V1PortletManagementPortType.class);
+ WSRPV1PortletManagementPortType managementPortType =
wsService.getPort(WSRPV1PortletManagementPortType.class);
portletManagementURL =
(String)((BindingProvider)managementPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
}
catch (Exception e)
@@ -379,7 +389,7 @@
try
{
- V1RegistrationPortType registrationPortType =
wsService.getPort(V1RegistrationPortType.class);
+ WSRPV1RegistrationPortType registrationPortType =
wsService.getPort(WSRPV1RegistrationPortType.class);
registrationURL =
(String)((BindingProvider)registrationPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
}
catch (Exception e)
@@ -415,12 +425,12 @@
{
if (isV2)
{
- V2ServiceDescriptionPortType port =
getService(V2ServiceDescriptionPortType.class);
+ WSRPV2ServiceDescriptionPortType port =
getService(WSRPV2ServiceDescriptionPortType.class);
return new V2ServiceDescriptionService(port);
}
else
{
- V1ServiceDescriptionPortType port =
getService(V1ServiceDescriptionPortType.class);
+ WSRPV1ServiceDescriptionPortType port =
getService(WSRPV1ServiceDescriptionPortType.class);
return new V1ServiceDescriptionService(port);
}
}
@@ -429,12 +439,12 @@
{
if (isV2)
{
- V2MarkupPortType port = getService(V2MarkupPortType.class);
+ WSRPV2MarkupPortType port = getService(WSRPV2MarkupPortType.class);
return new V2MarkupService(port);
}
else
{
- V1MarkupPortType port = getService(V1MarkupPortType.class);
+ WSRPV1MarkupPortType port = getService(WSRPV1MarkupPortType.class);
return new V1MarkupService(port);
}
}
@@ -443,12 +453,12 @@
{
if (isV2)
{
- V2PortletManagementPortType port =
getService(V2PortletManagementPortType.class);
+ WSRPV2PortletManagementPortType port =
getService(WSRPV2PortletManagementPortType.class);
return new V2PortletManagementService(port);
}
else
{
- V1PortletManagementPortType port =
getService(V1PortletManagementPortType.class);
+ WSRPV1PortletManagementPortType port =
getService(WSRPV1PortletManagementPortType.class);
return new V1PortletManagementService(port);
}
}
@@ -457,12 +467,12 @@
{
if (isV2)
{
- V2RegistrationPortType port = getService(V2RegistrationPortType.class);
+ WSRPV2RegistrationPortType port = getService(WSRPV2RegistrationPortType.class);
return new V2RegistrationService(port);
}
else
{
- V1RegistrationPortType port = getService(V1RegistrationPortType.class);
+ WSRPV1RegistrationPortType port = getService(WSRPV1RegistrationPortType.class);
return new V1RegistrationService(port);
}
}
@@ -499,6 +509,42 @@
return false;
}
+ public void enableWSS(boolean enable)
+ {
+ this.wssEnabled = enable;
+ }
+
+ public boolean isWSSEnabled()
+ {
+ return this.wssEnabled;
+ }
+
+ protected void addWSSHandlers(List<Handler> handlerChain)
+ {
+ if (wssEnabled)
+ {
+ WebServiceSecurityFactory wssFactory = WebServiceSecurityFactory.getInstance();
+ if (wssFactory.getHandlers() != null)
+ {
+ for (SOAPHandler<SOAPMessageContext> wssHandler :
wssFactory.getHandlers())
+ {
+ if (!handlerChain.contains(wssHandler))
+ {
+ handlerChain.add(wssHandler);
+ }
+ }
+ }
+ else
+ {
+ log.debug("WSS enabled, but no handlers provided. WSS will not be able
to work properly.");
+ }
+ }
+ else
+ {
+ log.debug("WSS disabled.");
+ }
+ }
+
protected class WSDLInfo
{
private final QName wsrp2ServiceQName;
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-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -91,4 +91,7 @@
Version getWSRPVersion();
boolean refresh(boolean force) throws Exception;
+
+ void enableWSS(boolean enable);
+ boolean isWSSEnabled();
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -26,7 +26,6 @@
import org.gatein.wsrp.WSRPExceptionFactory;
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.services.MarkupService;
-import org.gatein.wsrp.services.v1.interfaces.V1MarkupPortType;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
import org.oasis.wsrp.v1.V1AccessDenied;
@@ -47,6 +46,7 @@
import org.oasis.wsrp.v1.V1UnsupportedMode;
import org.oasis.wsrp.v1.V1UnsupportedWindowState;
import org.oasis.wsrp.v1.V1UpdateResponse;
+import org.oasis.wsrp.v1.WSRPV1MarkupPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.EventParams;
import org.oasis.wsrp.v2.Extension;
@@ -86,9 +86,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V1MarkupService extends MarkupService<V1MarkupPortType>
+public class V1MarkupService extends MarkupService<WSRPV1MarkupPortType>
{
- public V1MarkupService(V1MarkupPortType port)
+ public V1MarkupService(WSRPV1MarkupPortType port)
{
super(port);
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -27,7 +27,6 @@
import org.gatein.wsrp.WSRPExceptionFactory;
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.services.PortletManagementService;
-import org.gatein.wsrp.services.v1.interfaces.V1PortletManagementPortType;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
import org.oasis.wsrp.v1.V1AccessDenied;
@@ -44,6 +43,7 @@
import org.oasis.wsrp.v1.V1Property;
import org.oasis.wsrp.v1.V1ResetProperty;
import org.oasis.wsrp.v1.V1ResourceList;
+import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.CopiedPortlet;
import org.oasis.wsrp.v2.ExportByValueNotSupported;
@@ -83,9 +83,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V1PortletManagementService extends
PortletManagementService<V1PortletManagementPortType>
+public class V1PortletManagementService extends
PortletManagementService<WSRPV1PortletManagementPortType>
{
- public V1PortletManagementService(V1PortletManagementPortType port)
+ public V1PortletManagementService(WSRPV1PortletManagementPortType port)
{
super(port);
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -26,13 +26,13 @@
import org.gatein.wsrp.WSRPExceptionFactory;
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.services.RegistrationService;
-import org.gatein.wsrp.services.v1.interfaces.V1RegistrationPortType;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
import org.oasis.wsrp.v1.V1Extension;
import org.oasis.wsrp.v1.V1InvalidRegistration;
import org.oasis.wsrp.v1.V1MissingParameters;
import org.oasis.wsrp.v1.V1OperationFailed;
+import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetRegistrationLifetime;
@@ -56,9 +56,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V1RegistrationService extends
RegistrationService<V1RegistrationPortType>
+public class V1RegistrationService extends
RegistrationService<WSRPV1RegistrationPortType>
{
- public V1RegistrationService(V1RegistrationPortType service)
+ public V1RegistrationService(WSRPV1RegistrationPortType service)
{
super(service);
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -25,7 +25,6 @@
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.services.ServiceDescriptionService;
-import org.gatein.wsrp.services.v1.interfaces.V1ServiceDescriptionPortType;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
import org.oasis.wsrp.v1.V1CookieProtocol;
@@ -37,6 +36,7 @@
import org.oasis.wsrp.v1.V1PortletDescription;
import org.oasis.wsrp.v1.V1RegistrationContext;
import org.oasis.wsrp.v1.V1ResourceList;
+import org.oasis.wsrp.v1.WSRPV1ServiceDescriptionPortType;
import org.oasis.wsrp.v2.CookieProtocol;
import org.oasis.wsrp.v2.EventDescription;
import org.oasis.wsrp.v2.ExportDescription;
@@ -61,9 +61,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V1ServiceDescriptionService extends
ServiceDescriptionService<V1ServiceDescriptionPortType>
+public class V1ServiceDescriptionService extends
ServiceDescriptionService<WSRPV1ServiceDescriptionPortType>
{
- public V1ServiceDescriptionService(V1ServiceDescriptionPortType port)
+ public V1ServiceDescriptionService(WSRPV1ServiceDescriptionPortType port)
{
super(port);
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -24,7 +24,6 @@
package org.gatein.wsrp.services.v2;
import org.gatein.wsrp.services.MarkupService;
-import org.gatein.wsrp.services.v2.interfaces.V2MarkupPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.EventParams;
import org.oasis.wsrp.v2.Extension;
@@ -56,6 +55,7 @@
import org.oasis.wsrp.v2.UnsupportedWindowState;
import org.oasis.wsrp.v2.UpdateResponse;
import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
import javax.xml.ws.Holder;
import java.util.List;
@@ -64,9 +64,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V2MarkupService extends MarkupService<V2MarkupPortType>
+public class V2MarkupService extends MarkupService<WSRPV2MarkupPortType>
{
- public V2MarkupService(V2MarkupPortType port)
+ public V2MarkupService(WSRPV2MarkupPortType port)
{
super(port);
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -23,7 +23,6 @@
package org.gatein.wsrp.services.v2;
import org.gatein.wsrp.services.PortletManagementService;
-import org.gatein.wsrp.services.v2.interfaces.V2PortletManagementPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.CopiedPortlet;
import org.oasis.wsrp.v2.ExportByValueNotSupported;
@@ -55,6 +54,7 @@
import org.oasis.wsrp.v2.ResourceSuspended;
import org.oasis.wsrp.v2.SetExportLifetime;
import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
import javax.xml.ws.Holder;
import java.util.List;
@@ -63,9 +63,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V2PortletManagementService extends
PortletManagementService<V2PortletManagementPortType>
+public class V2PortletManagementService extends
PortletManagementService<WSRPV2PortletManagementPortType>
{
- public V2PortletManagementService(V2PortletManagementPortType port)
+ public V2PortletManagementService(WSRPV2PortletManagementPortType port)
{
super(port);
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -23,7 +23,6 @@
package org.gatein.wsrp.services.v2;
import org.gatein.wsrp.services.RegistrationService;
-import org.gatein.wsrp.services.v2.interfaces.V2RegistrationPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetRegistrationLifetime;
@@ -39,6 +38,7 @@
import org.oasis.wsrp.v2.ResourceSuspended;
import org.oasis.wsrp.v2.SetRegistrationLifetime;
import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2RegistrationPortType;
import javax.xml.ws.Holder;
import java.util.List;
@@ -47,9 +47,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V2RegistrationService extends
RegistrationService<V2RegistrationPortType>
+public class V2RegistrationService extends
RegistrationService<WSRPV2RegistrationPortType>
{
- public V2RegistrationService(V2RegistrationPortType service)
+ public V2RegistrationService(WSRPV2RegistrationPortType service)
{
super(service);
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -23,7 +23,6 @@
package org.gatein.wsrp.services.v2;
import org.gatein.wsrp.services.ServiceDescriptionService;
-import org.gatein.wsrp.services.v2.interfaces.V2ServiceDescriptionPortType;
import org.oasis.wsrp.v2.CookieProtocol;
import org.oasis.wsrp.v2.EventDescription;
import org.oasis.wsrp.v2.ExportDescription;
@@ -40,6 +39,7 @@
import org.oasis.wsrp.v2.ResourceList;
import org.oasis.wsrp.v2.ResourceSuspended;
import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2ServiceDescriptionPortType;
import javax.xml.ws.Holder;
import java.util.List;
@@ -48,9 +48,9 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
*/
-public class V2ServiceDescriptionService extends
ServiceDescriptionService<V2ServiceDescriptionPortType> implements
V2ServiceDescriptionPortType
+public class V2ServiceDescriptionService extends
ServiceDescriptionService<WSRPV2ServiceDescriptionPortType> implements
WSRPV2ServiceDescriptionPortType
{
- public V2ServiceDescriptionService(V2ServiceDescriptionPortType service)
+ public V2ServiceDescriptionService(WSRPV2ServiceDescriptionPortType service)
{
super(service);
}
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/services/SOAPServiceFactoryTestCase.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/services/SOAPServiceFactoryTestCase.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/services/SOAPServiceFactoryTestCase.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -25,14 +25,6 @@
import junit.framework.TestCase;
import org.gatein.wsrp.services.SOAPServiceFactory;
-import org.gatein.wsrp.services.v1.interfaces.V1MarkupPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1PortletManagementPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1RegistrationPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1ServiceDescriptionPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2MarkupPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2PortletManagementPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2RegistrationPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2ServiceDescriptionPortType;
import org.oasis.wsrp.v1.WSRPV1MarkupPortType;
import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
@@ -52,8 +44,8 @@
public class SOAPServiceFactoryTestCase extends TestCase
{
private SOAPServiceFactory factory;
- public static final Class[] WSRP2_PORT_TYPES = new Class[]{V2MarkupPortType.class,
V2ServiceDescriptionPortType.class, V2PortletManagementPortType.class,
V2RegistrationPortType.class};
- public static final Class[] WSRP1_PORT_TYPES = new Class[]{V1MarkupPortType.class,
V1ServiceDescriptionPortType.class, V1PortletManagementPortType.class,
V1RegistrationPortType.class};
+ public static final Class[] WSRP2_PORT_TYPES = new Class[]{WSRPV2MarkupPortType.class,
WSRPV2ServiceDescriptionPortType.class, WSRPV2PortletManagementPortType.class,
WSRPV2RegistrationPortType.class};
+ public static final Class[] WSRP1_PORT_TYPES = new Class[]{WSRPV1MarkupPortType.class,
WSRPV1ServiceDescriptionPortType.class, WSRPV1PortletManagementPortType.class,
WSRPV1RegistrationPortType.class};
@Override
protected void setUp() throws Exception
@@ -92,7 +84,7 @@
factory.setWsdlDefinitionURL(getWSDLURL("wsdl/missing-registration-non-std-ns.wsdl"));
// missing-registration-non-std-ns.wsdl doesn't contain registration port
- checkPorts(V2MarkupPortType.class, V2ServiceDescriptionPortType.class,
V2PortletManagementPortType.class);
+ checkPorts(WSRPV2MarkupPortType.class, WSRPV2ServiceDescriptionPortType.class,
WSRPV2PortletManagementPortType.class);
}
public void testSimpleV2Service() throws Exception
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -36,10 +36,6 @@
import org.gatein.wsrp.services.v1.V1PortletManagementService;
import org.gatein.wsrp.services.v1.V1RegistrationService;
import org.gatein.wsrp.services.v1.V1ServiceDescriptionService;
-import org.gatein.wsrp.services.v1.interfaces.V1MarkupPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1PortletManagementPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1RegistrationPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1ServiceDescriptionPortType;
import org.gatein.wsrp.test.support.RequestedMarkupBehavior;
import org.oasis.wsrp.v1.V1AccessDenied;
import org.oasis.wsrp.v1.V1GetMarkup;
@@ -160,22 +156,22 @@
public ServiceDescriptionService getServiceDescriptionService() throws Exception
{
- return new
V1ServiceDescriptionService(getService(V1ServiceDescriptionPortType.class));
+ return new
V1ServiceDescriptionService(getService(WSRPV1ServiceDescriptionPortType.class));
}
public MarkupService getMarkupService() throws Exception
{
- return new V1MarkupService(getService(V1MarkupPortType.class));
+ return new V1MarkupService(getService(WSRPV1MarkupPortType.class));
}
public PortletManagementService getPortletManagementService() throws Exception
{
- return new
V1PortletManagementService(getService(V1PortletManagementPortType.class));
+ return new
V1PortletManagementService(getService(WSRPV1PortletManagementPortType.class));
}
public RegistrationService getRegistrationService() throws Exception
{
- return new V1RegistrationService(getService(V1RegistrationPortType.class));
+ return new V1RegistrationService(getService(WSRPV1RegistrationPortType.class));
}
public Version getWSRPVersion()
@@ -242,4 +238,16 @@
return MARKUP;
}
}
+
+ public void enableWSS(boolean enable)
+ {
+ // FIXME enableWSS
+
+ }
+
+ public boolean isWSSEnabled()
+ {
+ // FIXME isWSSEnabled
+ return false;
+ }
}
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/MarkupBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -27,7 +27,6 @@
import org.gatein.pc.api.Mode;
import org.gatein.pc.api.WindowState;
import org.gatein.wsrp.WSRPUtils;
-import org.gatein.wsrp.services.v1.interfaces.V1MarkupPortType;
import org.gatein.wsrp.spec.v1.WSRP1TypeFactory;
import org.oasis.wsrp.v1.V1AccessDenied;
import org.oasis.wsrp.v1.V1Extension;
@@ -70,7 +69,7 @@
* @version $Revision: 10337 $
* @since 2.6
*/
-public abstract class MarkupBehavior extends TestProducerBehavior implements
V1MarkupPortType
+public abstract class MarkupBehavior extends TestProducerBehavior implements
WSRPV1MarkupPortType
{
private List<String> handles = new ArrayList<String>(3);
private BehaviorRegistry registry;
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/PortletManagementBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/PortletManagementBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/PortletManagementBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -23,7 +23,6 @@
package org.gatein.wsrp.test.protocol.v1;
-import org.gatein.wsrp.services.v1.interfaces.V1PortletManagementPortType;
import org.oasis.wsrp.v1.V1AccessDenied;
import org.oasis.wsrp.v1.V1DestroyFailed;
import org.oasis.wsrp.v1.V1Extension;
@@ -54,7 +53,7 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class PortletManagementBehavior extends TestProducerBehavior implements
V1PortletManagementPortType
+public class PortletManagementBehavior extends TestProducerBehavior implements
WSRPV1PortletManagementPortType
{
public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") V1RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") V1PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") V1UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
@WebParam(name = "portletDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types", mode = WebParam.Mode.OUT)
Holder<V1PortletDescription> portletDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types",
mode = WebParam.Mode.OUT) Holder<V1ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types",
mode = WebParam.Mode.OUT) Holder<List<V1Extension>> extens!
ions) throws V1AccessDenied, V1InconsistentParameters, V1InvalidHandle,
V1InvalidRegistration, V1InvalidUserCategory, V1MissingParameters, V1OperationFailed
{
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/RegistrationBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/RegistrationBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/RegistrationBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -23,7 +23,6 @@
package org.gatein.wsrp.test.protocol.v1;
-import org.gatein.wsrp.services.v1.interfaces.V1RegistrationPortType;
import org.oasis.wsrp.v1.V1Extension;
import org.oasis.wsrp.v1.V1InvalidRegistration;
import org.oasis.wsrp.v1.V1MissingParameters;
@@ -42,7 +41,7 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class RegistrationBehavior extends TestProducerBehavior implements
V1RegistrationPortType
+public class RegistrationBehavior extends TestProducerBehavior implements
WSRPV1RegistrationPortType
{
public static final String REGISTRATION_HANDLE = "registration";
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/ServiceDescriptionBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/ServiceDescriptionBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/ServiceDescriptionBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -24,7 +24,6 @@
package org.gatein.wsrp.test.protocol.v1;
import org.gatein.wsrp.WSRPConstants;
-import org.gatein.wsrp.services.v1.interfaces.V1ServiceDescriptionPortType;
import org.gatein.wsrp.spec.v1.WSRP1TypeFactory;
import org.oasis.wsrp.v1.V1CookieProtocol;
import org.oasis.wsrp.v1.V1Extension;
@@ -53,7 +52,7 @@
* @version $Revision: 11320 $
* @since 2.6
*/
-public class ServiceDescriptionBehavior extends TestProducerBehavior implements
V1ServiceDescriptionPortType
+public class ServiceDescriptionBehavior extends TestProducerBehavior implements
WSRPV1ServiceDescriptionPortType
{
protected V1ServiceDescription serviceDescription;
private static final V1ServiceDescription DEFAULT_SERVICE_DESCRIPTION =
WSRP1TypeFactory.createServiceDescription(false);
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/TestWSRPProducerImpl.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/TestWSRPProducerImpl.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/TestWSRPProducerImpl.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -23,10 +23,6 @@
package org.gatein.wsrp.test.protocol.v1;
-import org.gatein.wsrp.services.v1.interfaces.V1MarkupPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1PortletManagementPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1RegistrationPortType;
-import org.gatein.wsrp.services.v1.interfaces.V1ServiceDescriptionPortType;
import org.gatein.wsrp.spec.v1.WSRP1ExceptionFactory;
import org.oasis.wsrp.v1.V1AccessDenied;
import org.oasis.wsrp.v1.V1CookieProtocol;
@@ -80,7 +76,7 @@
* @version $Revision: 12020 $
* @since 2.4
*/
-public class TestWSRPProducerImpl implements TestWSRPProducer, V1MarkupPortType,
V1PortletManagementPortType, V1RegistrationPortType, V1ServiceDescriptionPortType
+public class TestWSRPProducerImpl implements TestWSRPProducer, WSRPV1MarkupPortType,
WSRPV1PortletManagementPortType, WSRPV1RegistrationPortType,
WSRPV1ServiceDescriptionPortType
{
private int sessionExpirationTime = 600;
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -36,10 +36,6 @@
import org.gatein.wsrp.services.v2.V2PortletManagementService;
import org.gatein.wsrp.services.v2.V2RegistrationService;
import org.gatein.wsrp.services.v2.V2ServiceDescriptionService;
-import org.gatein.wsrp.services.v2.interfaces.V2MarkupPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2PortletManagementPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2RegistrationPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2ServiceDescriptionPortType;
import org.gatein.wsrp.test.support.RequestedMarkupBehavior;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.GetMarkup;
@@ -55,6 +51,10 @@
import org.oasis.wsrp.v2.UnsupportedMimeType;
import org.oasis.wsrp.v2.UnsupportedMode;
import org.oasis.wsrp.v2.UnsupportedWindowState;
+import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
+import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
+import org.oasis.wsrp.v2.WSRPV2RegistrationPortType;
+import org.oasis.wsrp.v2.WSRPV2ServiceDescriptionPortType;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
@@ -89,11 +89,11 @@
start();
}
- if (V2ServiceDescriptionPortType.class.isAssignableFrom(serviceClass))
+ if (WSRPV2ServiceDescriptionPortType.class.isAssignableFrom(serviceClass))
{
return (T)registry.getServiceDescriptionBehavior();
}
- if (V2MarkupPortType.class.isAssignableFrom(serviceClass))
+ if (WSRPV2MarkupPortType.class.isAssignableFrom(serviceClass))
{
String requestedMarkupBehavior =
RequestedMarkupBehavior.getRequestedMarkupBehavior();
if (requestedMarkupBehavior == null)
@@ -102,11 +102,11 @@
}
return (T)registry.getMarkupBehaviorFor(requestedMarkupBehavior);
}
- if (V2PortletManagementPortType.class.isAssignableFrom(serviceClass))
+ if (WSRPV2PortletManagementPortType.class.isAssignableFrom(serviceClass))
{
return (T)registry.getPortletManagementBehavior();
}
- if (V2RegistrationPortType.class.isAssignableFrom(serviceClass))
+ if (WSRPV2RegistrationPortType.class.isAssignableFrom(serviceClass))
{
return (T)registry.getRegistrationBehavior();
}
@@ -115,22 +115,22 @@
public ServiceDescriptionService getServiceDescriptionService() throws Exception
{
- return new
V2ServiceDescriptionService(getService(V2ServiceDescriptionPortType.class));
+ return new
V2ServiceDescriptionService(getService(WSRPV2ServiceDescriptionPortType.class));
}
public MarkupService getMarkupService() throws Exception
{
- return new V2MarkupService(getService(V2MarkupPortType.class));
+ return new V2MarkupService(getService(WSRPV2MarkupPortType.class));
}
public PortletManagementService getPortletManagementService() throws Exception
{
- return new
V2PortletManagementService(getService(V2PortletManagementPortType.class));
+ return new
V2PortletManagementService(getService(WSRPV2PortletManagementPortType.class));
}
public RegistrationService getRegistrationService() throws Exception
{
- return new V2RegistrationService(getService(V2RegistrationPortType.class));
+ return new V2RegistrationService(getService(WSRPV2RegistrationPortType.class));
}
public Version getWSRPVersion()
@@ -234,4 +234,16 @@
return MARKUP;
}
}
+
+ public void enableWSS(boolean enable)
+ {
+ // FIXME enableWSS
+
+ }
+
+ public boolean isWSSEnabled()
+ {
+ // FIXME isWSSEnabled
+ return false;
+ }
}
\ No newline at end of file
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -29,7 +29,6 @@
import org.gatein.pc.api.WindowState;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.WSRPUtils;
-import org.gatein.wsrp.services.v2.interfaces.V2MarkupPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.EventParams;
import org.oasis.wsrp.v2.Extension;
@@ -65,6 +64,7 @@
import org.oasis.wsrp.v2.UnsupportedWindowState;
import org.oasis.wsrp.v2.UpdateResponse;
import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
import javax.jws.WebParam;
import javax.xml.ws.Holder;
@@ -78,7 +78,7 @@
* @version $Revision: 10337 $
* @since 2.6
*/
-public abstract class MarkupBehavior extends TestProducerBehavior implements
V2MarkupPortType
+public abstract class MarkupBehavior extends TestProducerBehavior implements
WSRPV2MarkupPortType
{
private List<String> handles = new ArrayList<String>(3);
private BehaviorRegistry registry;
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -24,7 +24,6 @@
package org.gatein.wsrp.test.protocol.v2;
import org.gatein.common.NotYetImplemented;
-import org.gatein.wsrp.services.v2.interfaces.V2PortletManagementPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.CopiedPortlet;
import org.oasis.wsrp.v2.ExportByValueNotSupported;
@@ -68,7 +67,7 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class PortletManagementBehavior extends TestProducerBehavior implements
V2PortletManagementPortType
+public class PortletManagementBehavior extends TestProducerBehavior implements
WSRPV2PortletManagementPortType
{
public void getPortletPropertyDescription(@WebParam(name =
"registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
@WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "modelDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<ModelDescription> modelDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) thro!
ws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/RegistrationBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/RegistrationBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/RegistrationBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -24,7 +24,6 @@
package org.gatein.wsrp.test.protocol.v2;
import org.gatein.common.NotYetImplemented;
-import org.gatein.wsrp.services.v2.interfaces.V2RegistrationPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetRegistrationLifetime;
@@ -51,7 +50,7 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class RegistrationBehavior extends TestProducerBehavior implements
V2RegistrationPortType
+public class RegistrationBehavior extends TestProducerBehavior implements
WSRPV2RegistrationPortType
{
public static final String REGISTRATION_HANDLE = "registration";
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/ServiceDescriptionBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/ServiceDescriptionBehavior.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/ServiceDescriptionBehavior.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -25,7 +25,6 @@
import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.WSRPTypeFactory;
-import org.gatein.wsrp.services.v2.interfaces.V2ServiceDescriptionPortType;
import org.oasis.wsrp.v2.CookieProtocol;
import org.oasis.wsrp.v2.EventDescription;
import org.oasis.wsrp.v2.ExportDescription;
@@ -44,6 +43,7 @@
import org.oasis.wsrp.v2.ResourceSuspended;
import org.oasis.wsrp.v2.ServiceDescription;
import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2ServiceDescriptionPortType;
import javax.jws.WebParam;
import javax.xml.ws.Holder;
@@ -59,7 +59,7 @@
* @version $Revision: 11320 $
* @since 2.6
*/
-public class ServiceDescriptionBehavior extends TestProducerBehavior implements
V2ServiceDescriptionPortType
+public class ServiceDescriptionBehavior extends TestProducerBehavior implements
WSRPV2ServiceDescriptionPortType
{
protected ServiceDescription serviceDescription;
private static final ServiceDescription DEFAULT_SERVICE_DESCRIPTION =
WSRPTypeFactory.createServiceDescription(false);
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/TestWSRPProducerImpl.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/TestWSRPProducerImpl.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/TestWSRPProducerImpl.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -24,10 +24,6 @@
package org.gatein.wsrp.test.protocol.v2;
import org.gatein.common.NotYetImplemented;
-import org.gatein.wsrp.services.v2.interfaces.V2MarkupPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2PortletManagementPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2RegistrationPortType;
-import org.gatein.wsrp.services.v2.interfaces.V2ServiceDescriptionPortType;
import org.gatein.wsrp.spec.v2.WSRP2ExceptionFactory;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.CookieProtocol;
@@ -104,7 +100,7 @@
* @version $Revision: 12020 $
* @since 2.4
*/
-public class TestWSRPProducerImpl implements TestWSRPProducer, V2MarkupPortType,
V2PortletManagementPortType, V2RegistrationPortType, V2ServiceDescriptionPortType
+public class TestWSRPProducerImpl implements TestWSRPProducer, WSRPV2MarkupPortType,
WSRPV2PortletManagementPortType, WSRPV2RegistrationPortType,
WSRPV2ServiceDescriptionPortType
{
private int sessionExpirationTime = 600;
Modified:
components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java
===================================================================
---
components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java 2011-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java 2011-03-08
18:14:47 UTC (rev 5980)
@@ -46,16 +46,23 @@
public abstract void setWSTimeoutMilliseconds(Integer expiration);
+ @Property(name = "enablewss", defaultValue = "false")
+ public abstract boolean getWSSEnabled();
+
+ public abstract void setWSSEnabled(boolean enable);
+
public void initFrom(EndpointConfigurationInfo info)
{
setWSDLURL(info.getWsdlDefinitionURL());
setWSTimeoutMilliseconds(info.getWSOperationTimeOut());
+ setWSSEnabled(info.getWSSEnabled());
}
EndpointConfigurationInfo toEndpointConfigurationInfo(EndpointConfigurationInfo
initial)
{
initial.setWsdlDefinitionURL(getWSDLURL());
initial.setWSOperationTimeOut(getWSTimeoutMilliseconds());
+ initial.setWSSEnabled(getWSSEnabled());
return initial;
}
}
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-03-08
13:38:01 UTC (rev 5979)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/resources/org/gatein/wsrp/endpoints/producer-handler-chains.xml 2011-03-08
18:14:47 UTC (rev 5980)
@@ -1,12 +1,14 @@
<?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>
- <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+
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.ProducerWSSecurityHandler</handler-class>
+ <handler-class>org.wsrp.wss.jboss5.handlers.producer.JBWSSecurityHandlerWrapper</handler-class>
</handler>
</handler-chain>
</handler-chains>
Added:
components/wsrp/trunk/wsrp-producer-war/src/main/webapp/WEB-INF/conf/gatein-wsse-producer.xml
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/webapp/WEB-INF/conf/gatein-wsse-producer.xml
(rev 0)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/webapp/WEB-INF/conf/gatein-wsse-producer.xml 2011-03-08
18:14:47 UTC (rev 5980)
@@ -0,0 +1,9 @@
+ <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>