Author: richard.opalka(a)jboss.com
Date: 2007-09-19 15:08:10 -0400 (Wed, 19 Sep 2007)
New Revision: 4593
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/DeliveryAssuranceMetaData.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/MessageStoreMetaData.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/PortMetaData.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ProviderMetaData.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ReliableMessagingMetaData.java
Removed:
stack/native/branches/ropalka/trunk/src/main/resources/schema/jboss-ws-rm_1.0.xsd
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/CommonConfig.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java
stack/native/branches/ropalka/trunk/src/main/resources/schema/jaxws-config_2_0.xsd
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java
stack/native/branches/ropalka/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml
Log:
implementing wsrm configuration + extending ConfigFactoryTestCase to test this new
configuration
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2007-09-19
17:58:53 UTC (rev 4592)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -48,7 +48,6 @@
{
registerEntity("urn:jboss:jaxrpc-config:2.0",
"schema/jaxrpc-config_2_0.xsd");
registerEntity("urn:jboss:jaxws-config:2.0",
"schema/jaxws-config_2_0.xsd");
-
registerEntity("http://www.jboss.com/ws-rm/config",
"schema/jboss-ws-rm_1.0.xsd");
registerEntity("http://java.sun.com/xml/ns/javaee",
"schema/javaee_web_services_1_2.xsd");
registerEntity("http://www.w3.org/2005/08/addressing",
"schema/ws-addr.xsd");
registerEntity("http://schemas.xmlsoap.org/ws/2004/08/eventing",
"eventing.xsd");
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/CommonConfig.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/CommonConfig.java 2007-09-19
17:58:53 UTC (rev 4592)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/CommonConfig.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -30,6 +30,7 @@
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.metadata.wsrm.ReliableMessagingMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -41,6 +42,7 @@
public abstract class CommonConfig
{
private String configName;
+ private ReliableMessagingMetaData wsrmCfg;
private List<URI> features = new ArrayList<URI>();
private List<EndpointProperty> properties = new
ArrayList<EndpointProperty>();
@@ -64,7 +66,7 @@
{
return hasFeature(nameToURI(uri));
}
-
+
public void setFeature(String type, boolean enabled) {
if(enabled) {
@@ -74,6 +76,16 @@
features.remove(nameToURI(type));
}
+ public void setReliableMessaging(ReliableMessagingMetaData wsrmCfg)
+ {
+ this.wsrmCfg = wsrmCfg;
+ }
+
+ public ReliableMessagingMetaData getReliableMessaging()
+ {
+ return this.wsrmCfg;
+ }
+
public void addProperty(String name, String value)
{
EndpointProperty p = new EndpointProperty();
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java 2007-09-19
17:58:53 UTC (rev 4592)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -23,6 +23,8 @@
//$Id$
+import javax.xml.namespace.QName;
+
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.config.EndpointProperty;
import org.jboss.ws.metadata.config.jaxws.ClientConfigJAXWS;
@@ -30,10 +32,18 @@
import org.jboss.ws.metadata.config.jaxws.ConfigRootJAXWS;
import org.jboss.ws.metadata.config.jaxws.EndpointConfigJAXWS;
import org.jboss.ws.metadata.config.jaxws.HandlerChainsConfigJAXWS;
+import org.jboss.ws.metadata.wsrm.DeliveryAssuranceMetaData;
+import org.jboss.ws.metadata.wsrm.MessageStoreMetaData;
+import org.jboss.ws.metadata.wsrm.PortMetaData;
+import org.jboss.ws.metadata.wsrm.ProviderMetaData;
+import org.jboss.ws.metadata.wsrm.ReliableMessagingMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.HandlerChainsObjectFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
+import org.jboss.ws.extensions.wsrm.DeliveryAssurance;
+import org.jboss.ws.extensions.wsrm.DeliveryAssuranceFactory;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
/**
* ObjectModelFactory for JAXRPC configurations.
@@ -122,10 +132,117 @@
commonConfig.setPostHandlerChains(postHandlerChains);
return postHandlerChains;
}
+ if ("reliable-messaging".equals(localName))
+ {
+ ReliableMessagingMetaData wsrmCfg = new ReliableMessagingMetaData();
+ commonConfig.setReliableMessaging(wsrmCfg);
+ return wsrmCfg;
+ }
return null;
}
+
+ public Object newChild(ReliableMessagingMetaData wsrmConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ int countOfAttributes = attrs.getLength();
+ if (localName.equals("delivery-assurance"))
+ {
+ DeliveryAssuranceMetaData deliveryAssurance = getDeliveryAssurance(attrs);
+ wsrmConfig.setDeliveryAssurance(deliveryAssurance);
+ return deliveryAssurance;
+ }
+ if (localName.equals("provider"))
+ {
+ String specVersion = null;
+ for (int i = 0; i < countOfAttributes; i++)
+ {
+ if (attrs.getLocalName(i).equals("specVersion"))
+ {
+ specVersion = attrs.getValue(i);
+ break;
+ }
+ }
+ ProviderMetaData provider = new ProviderMetaData();
+ provider.setSpecVersion(specVersion);
+ wsrmConfig.setProvider(provider);
+ return provider;
+ }
+ if (localName.equals("message-store"))
+ {
+ String className = null, id = null;
+ for (int i = 0; i < countOfAttributes && (className == null || id ==
null); i++)
+ {
+ String attrLocalName = attrs.getLocalName(i);
+ if (attrLocalName.equals("id"))
+ id = attrs.getValue(i);
+ if (attrLocalName.equals("class"))
+ className = attrs.getValue(i);
+ }
+
+ MessageStoreMetaData messageStore = new MessageStoreMetaData();
+ messageStore.setId(id);
+ messageStore.setClassName(className);
+ wsrmConfig.setMessageStore(messageStore);
+ return messageStore;
+ }
+ if (localName.equals("port"))
+ {
+ String portName = null;
+ for (int i = 0; i < countOfAttributes; i++)
+ {
+ if (attrs.getLocalName(i).equals("name"))
+ {
+ portName = attrs.getValue(i);
+ break;
+ }
+ }
+ PortMetaData port = new PortMetaData();
+ port.setPortName(QName.valueOf(portName));
+ wsrmConfig.getPorts().add(port);
+ return port;
+ }
+
+ return null;
+ }
+
+ public Object newChild(PortMetaData port, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ if (localName.equals("delivery-assurance"))
+ {
+ DeliveryAssuranceMetaData deliveryAssurance = getDeliveryAssurance(attrs);
+ port.setDeliveryAssurance(deliveryAssurance);
+ return deliveryAssurance;
+ }
+
+ return null;
+ }
+
+ private DeliveryAssuranceMetaData getDeliveryAssurance(Attributes attrs)
+ {
+ String inOrder = null, quality = null;
+ for (int i = 0; i < attrs.getLength() && (inOrder == null || quality ==
null); i++)
+ {
+ String attrLocalName = attrs.getLocalName(i);
+ if (attrLocalName.equals("inOrder"))
+ inOrder = attrs.getValue(i);
+ if (attrLocalName.equals("quality"))
+ quality = attrs.getValue(i);
+ }
+ DeliveryAssuranceMetaData deliveryAssurance = new DeliveryAssuranceMetaData();
+ deliveryAssurance.setQuality(quality);
+ deliveryAssurance.setInOrder(inOrder);
+ return deliveryAssurance;
+ }
+
+ public void setValue(MessageStoreMetaData messageStore, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("config-file"))
+ {
+ messageStore.setConfigFile(value);
+ }
+ }
+
/**
* Called when parsing of a new element started.
*/
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/DeliveryAssuranceMetaData.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/DeliveryAssuranceMetaData.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/DeliveryAssuranceMetaData.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.wsrm;
+
+/**
+ * Delivery assurance metadata
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public final class DeliveryAssuranceMetaData
+{
+
+ private String quality;
+ private String inOrder;
+
+ public final void setQuality(String quality)
+ {
+ if (quality == null)
+ throw new IllegalArgumentException();
+
+ this.quality = quality;
+ }
+
+ public final String getQuality()
+ {
+ return this.quality;
+ }
+
+ public final void setInOrder(String inOrder)
+ {
+ if (inOrder == null)
+ throw new IllegalArgumentException();
+
+ this.inOrder = inOrder;
+ }
+
+ public final String getInOrder()
+ {
+ return this.inOrder;
+ }
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/DeliveryAssuranceMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/MessageStoreMetaData.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/MessageStoreMetaData.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/MessageStoreMetaData.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.wsrm;
+
+/**
+ * Message store metadata
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public final class MessageStoreMetaData
+{
+
+ private String id;
+ private String className;
+ private String configFile;
+
+ public final void setId(String id)
+ {
+ if (id == null)
+ throw new IllegalArgumentException();
+
+ this.id = id;
+ }
+
+ public final String getId()
+ {
+ return this.id;
+ }
+
+ public final void setClassName(String className)
+ {
+ if (className == null)
+ throw new IllegalArgumentException();
+
+ this.className = className;
+ }
+
+ public final String getClassName()
+ {
+ return this.className;
+ }
+
+ public final void setConfigFile(String configFile)
+ {
+ if (configFile == null)
+ throw new IllegalArgumentException();
+
+ this.configFile = configFile;
+ }
+
+ public final String getConfigFile()
+ {
+ return this.configFile;
+ }
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/MessageStoreMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/PortMetaData.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/PortMetaData.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/PortMetaData.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.wsrm;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Port customization metadata
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public final class PortMetaData
+{
+
+ private QName portName;
+ private DeliveryAssuranceMetaData deliveryAssurance;
+
+ public final void setPortName(QName portName)
+ {
+ if (portName == null)
+ throw new IllegalArgumentException();
+
+ this.portName = portName;
+ }
+
+ public final QName getPortName()
+ {
+ return this.portName;
+ }
+
+ public final void setDeliveryAssurance(DeliveryAssuranceMetaData deliveryAssurance)
+ {
+ if (deliveryAssurance == null)
+ throw new IllegalArgumentException();
+
+ this.deliveryAssurance = deliveryAssurance;
+ }
+
+ public final DeliveryAssuranceMetaData getDeliveryAssurance()
+ {
+ return this.deliveryAssurance;
+ }
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/PortMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ProviderMetaData.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ProviderMetaData.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ProviderMetaData.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.wsrm;
+
+/**
+ * Reliable messaging provider metadata
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public final class ProviderMetaData
+{
+
+ private String specVersion;
+
+ public final void setSpecVersion(String specVersion)
+ {
+ if (specVersion == null)
+ throw new IllegalArgumentException();
+
+ this.specVersion = specVersion;
+ }
+
+ public final String getSpecVersion()
+ {
+ return this.specVersion;
+ }
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ProviderMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ReliableMessagingMetaData.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ReliableMessagingMetaData.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ReliableMessagingMetaData.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.wsrm;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Reliable messaging configuration metadata
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public final class ReliableMessagingMetaData
+{
+
+ private DeliveryAssuranceMetaData deliveryAssurance;
+ private ProviderMetaData provider;
+ private MessageStoreMetaData messageStore;
+ private List<PortMetaData> ports = new LinkedList<PortMetaData>();
+
+ public final void setDeliveryAssurance(DeliveryAssuranceMetaData deliveryAssurance)
+ {
+ if (deliveryAssurance == null)
+ throw new IllegalArgumentException();
+
+ this.deliveryAssurance = deliveryAssurance;
+ }
+
+ public final DeliveryAssuranceMetaData getDeliveryAssurance()
+ {
+ return this.deliveryAssurance;
+ }
+
+ public final void setProvider(ProviderMetaData provider)
+ {
+ if (provider == null)
+ throw new IllegalArgumentException();
+
+ this.provider = provider;
+ }
+
+ public final ProviderMetaData getProvider()
+ {
+ return this.provider;
+ }
+
+ public final void setMessageStore(MessageStoreMetaData messageStore)
+ {
+ if (messageStore == null)
+ throw new IllegalArgumentException();
+
+ this.messageStore = messageStore;
+ }
+
+ public final MessageStoreMetaData getMessageStore()
+ {
+ return this.messageStore;
+ }
+
+ public final List<PortMetaData> getPorts()
+ {
+ return this.ports;
+ }
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/metadata/wsrm/ReliableMessagingMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/branches/ropalka/trunk/src/main/resources/schema/jaxws-config_2_0.xsd
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/resources/schema/jaxws-config_2_0.xsd 2007-09-19
17:58:53 UTC (rev 4592)
+++
stack/native/branches/ropalka/trunk/src/main/resources/schema/jaxws-config_2_0.xsd 2007-09-19
19:08:10 UTC (rev 4593)
@@ -4,7 +4,6 @@
targetNamespace="urn:jboss:jaxws-config:2.0"
xmlns:tns="urn:jboss:jaxws-config:2.0"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
-
xmlns:wsrm="http://www.jboss.com/ws-rm/config"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
@@ -21,8 +20,6 @@
<xsd:import
namespace="http://java.sun.com/xml/ns/javaee"
schemaLocation="javaee_web_services_1_2.xsd"/>
- <xsd:import
namespace="http://www.jboss.com/ws-rm/config"
schemaLocation="jboss-ws-rm_1.0.xsd"/>
-
<xsd:element name="jaxws-config"
type="tns:jaxwsConfigType"/>
<xsd:complexType name="jaxwsConfigType">
<xsd:choice>
@@ -46,7 +43,7 @@
<xsd:complexType name="commonConfigType">
<xsd:sequence>
<xsd:element name="config-name" type="xsd:string"/>
- <xsd:element name="reliable-messaging"
type="wsrm:rmConfigType" minOccurs="0"/>
+ <xsd:element name="reliable-messaging"
type="tns:rmConfigType" minOccurs="0"/>
<xsd:element name="pre-handler-chains"
type="javaee:handler-chainsType" minOccurs="0"/>
<xsd:element name="post-handler-chains"
type="javaee:handler-chainsType" minOccurs="0"/>
<xsd:element name="feature" type="xsd:anyURI"
minOccurs="0" maxOccurs="unbounded"/>
@@ -61,4 +58,127 @@
</xsd:sequence>
</xsd:complexType>
+ <!-- WSRM configuration -->
+ <xsd:complexType name="rmConfigType">
+ <xsd:sequence>
+ <xsd:element name="delivery-assurance"
type="tns:deliveryAssuranceType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ Global WS-RM delivery assurance configuration that applies to all WSDL
ports.
+ If there is the WS-Policy with attached WS-RM assertion in WSDL
+ associated with some port or its associated binding it
+ will always override this global configuration.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="provider" type="tns:providerType">
+ <xsd:annotation>
+ <xsd:documentation>
+ WS-RM specification version to be used for reliable messaging.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="message-store"
type="tns:msgStoreType">
+ <xsd:annotation>
+ <xsd:documentation>
+ WS-RM message store to be used for reliable messaging.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="port" type="tns:portType"
minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+ WSDL port specific WS-RM delivery assurance configuration.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="msgStoreType">
+ <xsd:sequence>
+ <xsd:element name="config-file" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>
+ Message store specific configuration file.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string"
use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Message store identifier.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="class" type="xsd:string"
use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Message store class name providing public default constructor.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="deliveryAssuranceType">
+ <xsd:attribute name="quality" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ Quality of service to be ensured.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="AtLeastOnce"/>
+ <xsd:enumeration value="AtMostOnce"/>
+ <xsd:enumeration value="ExactlyOnce"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="inOrder" type="xsd:boolean"
use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ In order quality of service to be ensured. Set this attribute to 'true'
to ensure in order message delivery.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="providerType">
+ <xsd:attribute name="specVersion" use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ WS-RM spec. version to be used for reliable messaging.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration
value="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+ <xsd:enumeration
value="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="portType">
+ <xsd:sequence>
+ <xsd:element name="delivery-assurance"
type="tns:deliveryAssuranceType">
+ <xsd:annotation>
+ <xsd:documentation>
+ This WSDL port specific WS-RM delivery assurance configuration
+ applies to all operations on this port.
+ This configuration always overrides the global configuration.
+ If there is the WS-Policy with attached WS-RM assertion in WSDL
+ associated with this port or its associated binding it
+ will always override this port specific configuration.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"
use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+ WSDL port name specified in the form {namespace}localPart.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:complexType>
+
</xsd:schema>
Deleted:
stack/native/branches/ropalka/trunk/src/main/resources/schema/jboss-ws-rm_1.0.xsd
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/resources/schema/jboss-ws-rm_1.0.xsd 2007-09-19
17:58:53 UTC (rev 4592)
+++
stack/native/branches/ropalka/trunk/src/main/resources/schema/jboss-ws-rm_1.0.xsd 2007-09-19
19:08:10 UTC (rev 4593)
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema
-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
-
xmlns="http://www.jboss.com/ws-rm/config"
-
targetNamespace="http://www.jboss.com/ws-rm/config"
- elementFormDefault="qualified">
- <xs:complexType name="rmConfigType">
- <xs:sequence>
- <xs:element name="delivery-assurance"
type="deliveryAssuranceType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>
- Global WS-RM delivery assurance configuration that applies to all WSDL
ports.
- If there is the WS-Policy with attached WS-RM assertion in WSDL
- associated with some port or its associated binding it
- will always override this global configuration.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="provider" type="providerType">
- <xs:annotation>
- <xs:documentation>
- WS-RM specification version to be used for reliable messaging.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="message-store" type="msgStoreType">
- <xs:annotation>
- <xs:documentation>
- WS-RM message store to be used for reliable messaging.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="port" type="portType"
minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>
- WSDL port specific WS-RM delivery assurance configuration.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="msgStoreType">
- <xs:sequence>
- <xs:element name="config-file" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Message store specific configuration file.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string"
use="required">
- <xs:annotation>
- <xs:documentation>
- Message store name.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="class" type="xs:string"
use="required">
- <xs:annotation>
- <xs:documentation>
- Message store class name providing public default constructor.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="storeId" type="xs:string"
use="required">
- <xs:annotation>
- <xs:documentation>
- Message store identifier.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="deliveryAssuranceType">
- <xs:attribute name="quality" use="required">
- <xs:annotation>
- <xs:documentation>
- Quality of service to be ensured.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="at-least-once"/>
- <xs:enumeration value="at-most-once"/>
- <xs:enumeration value="exactly-once"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="inOrder" type="xs:boolean"
use="required" default="false">
- <xs:annotation>
- <xs:documentation>
- In order quality of service to be ensured. Set this attribute to 'true'
to ensure in order message delivery.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="providerType">
- <xs:attribute name="specVersion" use="required">
- <xs:annotation>
- <xs:documentation>
- WS-RM spec. version to be used for reliable messaging.
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration
value="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
- <xs:enumeration
value="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="portType">
- <xs:sequence>
- <xs:element name="delivery-assurance"
type="deliveryAssuranceType">
- <xs:annotation>
- <xs:documentation>
- This WSDL port specific WS-RM delivery assurance configuration
- applies to all operations on this port.
- This configuration always overrides the global configuration.
- If there is the WS-Policy with attached WS-RM assertion in WSDL
- associated with this port or its associated binding it
- will always override this port specific configuration.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string"
use="required">
- <xs:annotation>
- <xs:documentation>
- WSDL port name specified in the form {namespace}localPart.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
-</xs:schema>
Modified:
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java 2007-09-19
17:58:53 UTC (rev 4592)
+++
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java 2007-09-19
19:08:10 UTC (rev 4593)
@@ -22,7 +22,13 @@
package org.jboss.test.ws.common.config;
import java.io.File;
+import java.util.List;
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.extensions.wsrm.DeliveryAssurance;
+import org.jboss.ws.extensions.wsrm.DeliveryQuality;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.metadata.config.EndpointProperty;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
import org.jboss.ws.metadata.config.jaxrpc.CommonConfigJAXRPC;
@@ -30,6 +36,11 @@
import org.jboss.ws.metadata.config.jaxrpc.EndpointConfigJAXRPC;
import org.jboss.ws.metadata.config.jaxws.ConfigRootJAXWS;
import org.jboss.ws.metadata.config.jaxws.EndpointConfigJAXWS;
+import org.jboss.ws.metadata.wsrm.DeliveryAssuranceMetaData;
+import org.jboss.ws.metadata.wsrm.MessageStoreMetaData;
+import org.jboss.ws.metadata.wsrm.PortMetaData;
+import org.jboss.ws.metadata.wsrm.ProviderMetaData;
+import org.jboss.ws.metadata.wsrm.ReliableMessagingMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.wsf.test.JBossWSTest;
@@ -117,4 +128,34 @@
assertNotNull("Property does not exist", value);
assertEquals("Wrong property valule", value, "5000");
}
+
+ public void testWSRMConfiguration() throws Exception
+ {
+ File confFile = new
File("resources/common/config/jaxws-endpoint-config.xml");
+ assertTrue(confFile.exists());
+
+ JBossWSConfigFactory factory = JBossWSConfigFactory.newInstance();
+ ConfigRootJAXWS config = (ConfigRootJAXWS)factory.parse(confFile.toURL());
+ EndpointConfigJAXWS epConfig =
(EndpointConfigJAXWS)config.getConfigByName("Standard WSRM Endpoint");
+ ReliableMessagingMetaData wsrmConfig = epConfig.getReliableMessaging();
+ assertNotNull(wsrmConfig);
+ DeliveryAssuranceMetaData deliveryAssurance = wsrmConfig.getDeliveryAssurance();
+ assertEquals(deliveryAssurance.getInOrder(), "true");
+ assertEquals(deliveryAssurance.getQuality(), "AtLeastOnce");
+ ProviderMetaData provider = wsrmConfig.getProvider();
+ assertEquals(provider.getSpecVersion(),
"http://docs.oasis-open.org/ws-rx/wsrm/200702");
+ MessageStoreMetaData messageStore = wsrmConfig.getMessageStore();
+ assertEquals(messageStore.getId(), "wsrmStoreId");
+ assertEquals(messageStore.getClassName(), "custom.MessageStoreImpl");
+ assertEquals(messageStore.getConfigFile(), "META-INF/config.xml");
+ List<PortMetaData> ports = wsrmConfig.getPorts();
+ PortMetaData port1 = ports.get(0);
+ assertEquals(port1.getPortName(), new QName("http://custom/namespace/",
"Port1"));
+ assertEquals(port1.getDeliveryAssurance().getInOrder(), "false");
+ assertEquals(port1.getDeliveryAssurance().getQuality(), "AtMostOnce");
+ PortMetaData port2 = ports.get(1);
+ assertEquals(port2.getPortName(), new QName("http://custom/namespace/",
"Port2"));
+ assertEquals(port2.getDeliveryAssurance().getInOrder(), "true");
+ assertEquals(port2.getDeliveryAssurance().getQuality(), "ExactlyOnce");
+ }
}
Modified:
stack/native/branches/ropalka/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml
===================================================================
---
stack/native/branches/ropalka/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml 2007-09-19
17:58:53 UTC (rev 4592)
+++
stack/native/branches/ropalka/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml 2007-09-19
19:08:10 UTC (rev 4593)
@@ -41,4 +41,26 @@
</endpoint-config>
+ <endpoint-config>
+
+ <config-name>Standard WSRM Endpoint</config-name>
+ <reliable-messaging>
+ <delivery-assurance inOrder="true"
quality="AtLeastOnce"/>
+ <provider
+
specVersion="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+ <message-store
+ id="wsrmStoreId"
+ class="custom.MessageStoreImpl">
+ <config-file>META-INF/config.xml</config-file>
+ </message-store>
+ <port name="{http://custom/namespace/}Port1">
+ <delivery-assurance inOrder="false"
quality="AtMostOnce"/>
+ </port>
+ <port name="{http://custom/namespace/}Port2">
+ <delivery-assurance inOrder="true"
quality="ExactlyOnce"/>
+ </port>
+ </reliable-messaging>
+
+ </endpoint-config>
+
</jaxws-config>
\ No newline at end of file