JBossWS SVN: r11579 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-11 09:14:53 -0500 (Thu, 11 Feb 2010)
New Revision: 11579
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-2917] excluding test
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-02-11 14:05:56 UTC (rev 11578)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-02-11 14:14:53 UTC (rev 11579)
@@ -44,3 +44,4 @@
# [JBWS-2917] We're using buggy xalan version causing namespaces issues
org/jboss/test/ws/jaxws/jbws2917/**
+org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-02-11 14:05:56 UTC (rev 11578)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-02-11 14:14:53 UTC (rev 11579)
@@ -44,3 +44,4 @@
# [JBWS-2917] We're using buggy xalan version causing namespaces issues
org/jboss/test/ws/jaxws/jbws2917/**
+org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-02-11 14:05:56 UTC (rev 11578)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-02-11 14:14:53 UTC (rev 11579)
@@ -44,3 +44,4 @@
# [JBWS-2917] We're using buggy xalan version causing namespaces issues
org/jboss/test/ws/jaxws/jbws2917/**
+org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-02-11 14:05:56 UTC (rev 11578)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-02-11 14:14:53 UTC (rev 11579)
@@ -44,3 +44,4 @@
# [JBWS-2917] We're using buggy xalan version causing namespaces issues
org/jboss/test/ws/jaxws/jbws2917/**
+org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
14 years, 4 months
JBossWS SVN: r11578 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-11 09:05:56 -0500 (Thu, 11 Feb 2010)
New Revision: 11578
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.java
Log:
[JBWS-2914] providing EndpointReferenceBuilder test
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.java 2010-02-11 14:05:56 UTC (rev 11578)
@@ -0,0 +1,157 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.endpointReference;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+import org.jboss.ws.Constants;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.test.JBossWSTest;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * W3CEndpointReferenceBuilder test.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class EndpointReferenceBuilderTestCase extends JBossWSTest
+{
+ private static final String URL = "http://localhost:8080/hello";
+ private static final String WSDL_URL = URL + "?wsdl";
+ private static final String XML_INTERFACE_NAME = "<wsam:InterfaceName xmlns:wsam=\"http://www.w3.org/2007/05/addressing/metadata\" xmlns:myns=\"http://helloservice.org/wsdl\">myns:Hello</wsam:InterfaceName>";
+ private static final String XML_REF_PARAM1 = "<ns1:param1 wsa:IsReferenceParameter='true' xmlns:ns1=\"http://helloservice.org/param1\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">Hello</ns1:param1>";
+ private static final String XML_REF_PARAM2 = "<ns2:param2 wsa:IsReferenceParameter='true' xmlns:ns2=\"http://helloservice.org/param2\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">World</ns2:param2>";
+ private static final String MY_NS = "http://helloservice.org/wsdl";
+ private static final String SERVICE_NAME = "HelloService";
+ private static final String PORT_NAME = "HelloPort";
+ private static final String PORT_TYPE_NAME = "Hello";
+ private static final String WSA_NS = "http://www.w3.org/2005/08/addressing";
+ private static final String WSAM_NS = "http://www.w3.org/2007/05/addressing/metadata";
+ private static final String WSAM_PREFIX = "wsam";
+ private static final String MY_PREFIX = "myns";
+ private static final QName PARAM1_QNAME = new QName("http://helloservice.org/param1", "param1", "ns1");
+ private static final QName PARAM2_QNAME = new QName("http://helloservice.org/param2", "param2", "ns2");
+ private static final QName WSAM_SERVICE_QNAME = new QName(WSAM_NS, "ServiceName");
+ private static final QName WSAM_INTERFACE_QNAME = new QName(WSAM_NS, "InterfaceName");
+ private static final QName METADATA_QNAME = new QName(WSA_NS, "Metadata");
+ private static final QName SERVICE_QNAME = new QName(MY_NS, SERVICE_NAME, MY_PREFIX);
+ private static final QName PORT_QNAME = new QName(MY_NS, PORT_NAME, MY_PREFIX);
+ private static final QName PORT_TYPE_QNAME = new QName(MY_NS, PORT_TYPE_NAME, MY_PREFIX);
+
+ public void testParsedInterfaceName() throws Exception
+ {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder = builder.address(URL);
+ Element element = DOMUtils.parse(XML_INTERFACE_NAME);
+ builder = builder.metadata(element);
+ builder = builder.serviceName(SERVICE_QNAME);
+ builder = builder.endpointName(PORT_QNAME);
+ builder = builder.wsdlDocumentLocation(WSDL_URL);
+ element = DOMUtils.parse(XML_REF_PARAM1);
+ builder = builder.referenceParameter(element);
+ element = DOMUtils.parse(XML_REF_PARAM2);
+ builder = builder.referenceParameter(element);
+ W3CEndpointReference epr = builder.build();
+ DOMResult dr = new DOMResult();
+ epr.writeTo(dr);
+ Node endpointReferenceElement = dr.getNode();
+ System.out.println(getXml(endpointReferenceElement));
+ assertMetaData(endpointReferenceElement);
+ assertRefParam(endpointReferenceElement, PARAM1_QNAME, "Hello");
+ assertRefParam(endpointReferenceElement, PARAM2_QNAME, "World");
+ }
+
+ public void testConstructedInterfaceName() throws Exception
+ {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder = builder.address(URL);
+ builder = builder.serviceName(SERVICE_QNAME);
+ builder = builder.endpointName(PORT_QNAME);
+ builder = builder.interfaceName(PORT_TYPE_QNAME);
+ builder = builder.wsdlDocumentLocation(WSDL_URL);
+ Element element = DOMUtils.parse(XML_REF_PARAM1);
+ builder = builder.referenceParameter(element);
+ element = DOMUtils.parse(XML_REF_PARAM2);
+ builder = builder.referenceParameter(element);
+ W3CEndpointReference epr = builder.build();
+ DOMResult dr = new DOMResult();
+ epr.writeTo(dr);
+ Node endpointReferenceElement = dr.getNode();
+ System.out.println(getXml(endpointReferenceElement));
+ assertMetaData(endpointReferenceElement);
+ assertRefParam(endpointReferenceElement, PARAM1_QNAME, "Hello");
+ assertRefParam(endpointReferenceElement, PARAM2_QNAME, "World");
+ }
+
+ private static String getXml(final Node node) throws Exception
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PrintWriter pw = new PrintWriter(baos);
+ new DOMWriter(pw, Constants.DEFAULT_XML_CHARSET).setPrettyprint(true).print(node);
+ return baos.toString("utf-8");
+ }
+
+ private static void assertRefParam(final Node root, final QName nodeName, final String refParamValue)
+ {
+ Element e = (Element)DOMUtils.getFirstChildElement(root, nodeName, true);
+ assertNotNull("Reference parameter " + nodeName + " not found", e);
+ String actual = DOMUtils.getTextContent(e);
+ if ((actual == null) || (!actual.equals(refParamValue)))
+ {
+ fail("Reference parameter " + nodeName + " expected value is " + refParamValue);
+ }
+ }
+
+ private static void assertMetaData(final Node root)
+ {
+ Element metadataElement = (Element)DOMUtils.getFirstChildElement(root, METADATA_QNAME, true);
+ assertEquals("wsdlLocation mismatch", metadataElement.getAttribute("wsdlLocation"), WSDL_URL);
+ Element serviceNameElement = (Element)DOMUtils.getFirstChildElement(metadataElement, WSAM_SERVICE_QNAME);
+ assertNamespaces(serviceNameElement);
+ assertEquals("wrong text content in ServiceName element", "myns:HelloService", DOMUtils.getTextContent(serviceNameElement));
+ String endpointNameValue = DOMUtils.getAttributeValue(serviceNameElement, "EndpointName");
+ assertNotNull("cannot find endpointName attribute value", endpointNameValue);
+ assertEquals("wrong endpointName attribute value", endpointNameValue, "myns:HelloPort");
+ Element interfaceNameElement = (Element)DOMUtils.getFirstChildElement(metadataElement, WSAM_INTERFACE_QNAME);
+ assertNamespaces(interfaceNameElement);
+ assertEquals("wrong text content in InterfaceName element", "myns:Hello", DOMUtils.getTextContent(interfaceNameElement));
+ }
+
+ private static void assertNamespaces(final Element e)
+ {
+ String myNamespace = e.lookupNamespaceURI(MY_PREFIX);
+ assertNotNull("namespace is null for prefix " + MY_PREFIX + ", isn't xalan in endorsed directory?", myNamespace);
+ assertEquals("namespace mismatch", myNamespace, MY_NS);
+ String wsamNamespace = e.lookupNamespaceURI(WSAM_PREFIX);
+ assertNotNull("namespace is null for prefix " + WSAM_PREFIX + ", isn't xalan in endorsed directory?", wsamNamespace);
+ assertEquals("namespace mismatch", wsamNamespace, WSAM_NS);
+ }
+}
+
14 years, 4 months
JBossWS SVN: r11577 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws: wsaddressing and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-11 07:36:36 -0500 (Thu, 11 Feb 2010)
New Revision: 11577
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/wsaddressing/NativeEndpointReference.java
Log:
[JBWS-2914] implementing missing bits in NativeEndpointReference
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2010-02-10 18:31:18 UTC (rev 11576)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2010-02-11 12:36:36 UTC (rev 11577)
@@ -141,6 +141,7 @@
epr.setAddress(address);
epr.setServiceName(serviceName);
epr.setEndpointName(portName);
+ epr.setInterfaceName(interfaceName);
epr.setMetadata(metadata);
epr.setWsdlLocation(wsdlDocumentLocation);
epr.setReferenceParameters(referenceParameters);
@@ -158,10 +159,6 @@
public <T> T getPort(final EndpointReference epr, final Class<T> sei, final WebServiceFeature... features)
{
final NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
- if (nepr.getWsdlLocation() == null)
- {
- nepr.setWsdlLocation(nepr.getAddress() + "?wsdl");
- }
final URL wsdlLocation = nepr.getWsdlLocation();
final QName serviceName = nepr.getServiceName();
final ServiceDelegate delegate = createServiceDelegate(wsdlLocation, serviceName, Service.class);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/wsaddressing/NativeEndpointReference.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/wsaddressing/NativeEndpointReference.java 2010-02-10 18:31:18 UTC (rev 11576)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/wsaddressing/NativeEndpointReference.java 2010-02-11 12:36:36 UTC (rev 11577)
@@ -23,6 +23,8 @@
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -42,6 +44,7 @@
import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceException;
+import org.jboss.wsf.common.DOMUtils;
import org.w3c.dom.Element;
/**
@@ -53,35 +56,39 @@
* @see EndpointReferenceUtil class.
*
* @author alessio.soldano(a)jboss.com
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>ok
* @since 28-Feb-2009
- *
*/
-
-// XmlRootElement allows this class to be marshalled on its own
-@XmlRootElement(name = "EndpointReference", namespace = NativeEndpointReference.NS)
-@XmlType(name = "EndpointReferenceType", namespace = NativeEndpointReference.NS)
+@XmlRootElement(name = "EndpointReference", namespace = NativeEndpointReference.WSA_NS)
+@XmlType(name = "EndpointReferenceType", namespace = NativeEndpointReference.WSA_NS)
public final class NativeEndpointReference extends EndpointReference
{
- protected static final String NS = "http://www.w3.org/2005/08/addressing";
+ protected static final String WSA_NS = "http://www.w3.org/2005/08/addressing";
+ private static final String WSAM_NS = "http://www.w3.org/2007/05/addressing/metadata";
+ private static final QName SERVICE_QNAME = new QName(WSAM_NS, "ServiceName", "wsam");
+ private static final QName INTERFACE_QNAME = new QName(WSAM_NS, "InterfaceName", "wsam");
+ private static final QName WSDL_LOCATION_QNAME = new QName("wsdlLocation");
+ private static final String ENDPOINT_ATTRIBUTE = "EndpointName";
+ private static final JAXBContext jc = getJaxbContext();
- private final static JAXBContext jc = getJaxbContext();
-
// private but necessary properties for databinding
- @XmlElement(name = "Address", namespace = NS)
+ @XmlElement(name = "Address", namespace = WSA_NS)
private Address address;
- @XmlElement(name = "ReferenceParameters", namespace = NS)
- private Elements referenceParameters;
- @XmlElement(name = "Metadata", namespace = NS)
- private Elements metadata;
+ @XmlElement(name = "ReferenceParameters", namespace = WSA_NS)
+ private Elements referenceParameters = new Elements();
+ @XmlElement(name = "Metadata", namespace = WSA_NS)
+ private Elements metadata = new Elements();
@XmlAnyAttribute
- Map<QName, String> attributes;
+ private Map<QName, String> attributes;
@XmlAnyElement
- List<Element> elements;
+ private List<Element> elements;
// not marshalled
private QName serviceName;
+ private Element serviceNameElement;
private QName endpointName;
- private URL wsdlLocation;
+ private QName interfaceName;
+ private String wsdlLocation;
public NativeEndpointReference()
{
@@ -106,8 +113,48 @@
{
NativeEndpointReference epr = jc.createUnmarshaller().unmarshal(source, NativeEndpointReference.class).getValue();
this.address = epr.address;
+ this.referenceParameters = epr.referenceParameters;
this.metadata = epr.metadata;
- this.referenceParameters = epr.referenceParameters;
+ this.attributes = epr.attributes;
+ this.elements = epr.elements;
+ if (epr.metadata != null)
+ {
+ Map<QName, String> metadataAttributes = epr.metadata.getAttributes();
+ if (metadataAttributes != null)
+ {
+ final String wsdlLocation = metadataAttributes.get(WSDL_LOCATION_QNAME);
+ if (wsdlLocation != null)
+ {
+ this.setWsdlLocation(wsdlLocation);
+ }
+ }
+ List<Element> metadataElements = epr.metadata.getElements();
+ if (metadataElements != null)
+ {
+ for (Element e : epr.metadata.getElements())
+ {
+ if (WSAM_NS.equals(e.getNamespaceURI()))
+ {
+ if (e.getNodeName().equals(SERVICE_QNAME.getLocalPart()))
+ {
+ QName serviceQName = this.getQName(e, e.getNodeValue());
+ this.setServiceName(serviceQName);
+ String endpointName = e.getAttribute(ENDPOINT_ATTRIBUTE);
+ if (endpointName != null)
+ {
+ QName endpointQName = this.getQName(e, endpointName);
+ this.setEndpointName(endpointQName);
+ }
+ }
+ if (e.getNodeName().equals(INTERFACE_QNAME.getLocalPart()))
+ {
+ QName interfaceQName = this.getQName(e, e.getNodeValue());
+ this.setServiceName(interfaceQName);
+ }
+ }
+ }
+ }
+ }
}
catch (JAXBException e)
{
@@ -127,6 +174,9 @@
public void setAddress(String address)
{
+ if (address == null)
+ return;
+
this.address = new Address(address);
}
@@ -136,9 +186,17 @@
return serviceName;
}
- public void setServiceName(QName serviceName)
+ public void setServiceName(final QName serviceName)
{
+ if (serviceName == null)
+ return;
+
this.serviceName = serviceName;
+ this.serviceNameElement = DOMUtils.createElement(SERVICE_QNAME);
+ final String attrName = "xmlns:" + serviceName.getPrefix();
+ this.serviceNameElement.setAttribute(attrName, serviceName.getNamespaceURI());
+ this.serviceNameElement.setTextContent(this.toString(serviceName));
+ this.metadata.addElement(this.serviceNameElement);
}
@XmlTransient
@@ -149,47 +207,85 @@
public void setEndpointName(QName endpointName)
{
+ if (endpointName == null)
+ return;
+
this.endpointName = endpointName;
}
@XmlTransient
+ public QName getInterfaceName()
+ {
+ return interfaceName;
+ }
+
+ public void setInterfaceName(final QName interfaceName)
+ {
+ if (interfaceName == null)
+ return;
+
+ this.interfaceName = interfaceName;
+ Element interfaceNameElement = DOMUtils.createElement(INTERFACE_QNAME);
+ final String attrName = "xmlns:" + interfaceName.getPrefix();
+ interfaceNameElement.setAttribute(attrName, interfaceName.getNamespaceURI());
+ interfaceNameElement.setTextContent(this.toString(interfaceName));
+ this.metadata.addElement(interfaceNameElement);
+ }
+
+ @XmlTransient
public List<Element> getMetadata()
{
- return metadata != null ? metadata.getElements() : null;
+ return this.metadata.getElements();
}
public void setMetadata(List<Element> metadata)
{
- this.metadata = new Elements(metadata);
+ if ((metadata == null) || (metadata.size() == 0))
+ return;
+
+ this.metadata.setElements(metadata);
}
@XmlTransient
public URL getWsdlLocation()
{
- return wsdlLocation;
- }
-
- public void setWsdlLocation(String wsdlLocation)
- {
- try
+ if (this.wsdlLocation != null)
{
- this.wsdlLocation = wsdlLocation != null ? new URL(wsdlLocation) : null;
+ return this.toURL(this.wsdlLocation);
}
- catch (MalformedURLException e)
+ else
{
- throw new IllegalArgumentException("Invalid URL: " + wsdlLocation);
+ String address = this.getAddress();
+ if (address != null)
+ {
+ return this.toURL(address + "?wsdl");
+ }
}
+
+ return null;
}
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ if (wsdlLocation == null)
+ return;
+
+ this.wsdlLocation = wsdlLocation;
+ this.metadata.addAttribute(WSDL_LOCATION_QNAME, wsdlLocation);
+ }
@XmlTransient
public List<Element> getReferenceParameters()
{
- return referenceParameters != null ? referenceParameters.getElements() : null;
+ return this.referenceParameters.getElements();
}
public void setReferenceParameters(List<Element> metadata)
{
- this.referenceParameters = new Elements(metadata);
+ if ((metadata == null) || (metadata.size() == 0))
+ return;
+
+ this.referenceParameters.setElements(metadata);
}
/**
@@ -218,6 +314,10 @@
*/
public void writeTo(Result result)
{
+ if (this.endpointName != null && this.serviceName != null)
+ {
+ this.serviceNameElement.setAttribute(ENDPOINT_ATTRIBUTE, this.toString(this.endpointName));
+ }
try
{
Marshaller marshaller = jc.createMarshaller();
@@ -230,6 +330,18 @@
}
}
+ private URL toURL(final String s)
+ {
+ try
+ {
+ return new URL(s);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalArgumentException(e.getMessage(), e);
+ }
+ }
+
private static JAXBContext getJaxbContext()
{
try
@@ -242,6 +354,34 @@
}
}
+ private String toString(final QName qname)
+ {
+ StringBuilder sb = new StringBuilder();
+ if (qname.getPrefix() != null && qname.getPrefix().length() > 0)
+ {
+ sb.append(qname.getPrefix());
+ sb.append(':');
+ }
+ sb.append(qname.getLocalPart());
+ return sb.toString();
+ }
+
+ private QName getQName(Element e, String nodeValue)
+ {
+ final int separatorIndex = nodeValue.indexOf(':');
+ if (separatorIndex == -1)
+ {
+ return new QName(nodeValue);
+ }
+ else
+ {
+ final String prefix = nodeValue.substring(0, separatorIndex);
+ final String localPart = nodeValue.substring(separatorIndex + 1);
+ final String namespace = e.lookupNamespaceURI(prefix);
+ return new QName(namespace, localPart, prefix);
+ }
+ }
+
private static class Address
{
@XmlValue
@@ -305,8 +445,24 @@
public void setElements(List<Element> elements)
{
- this.elements = elements;
+ if (this.elements == null)
+ {
+ this.elements = elements;
+ }
+ else
+ {
+ this.elements.addAll(elements);
+ }
}
+
+ public void addElement(Element e)
+ {
+ if (this.elements == null)
+ {
+ this.elements = new LinkedList<Element>();
+ }
+ this.elements.add(e);
+ }
@XmlTransient
public Map<QName, String> getAttributes()
@@ -316,7 +472,24 @@
public void setAttributes(Map<QName, String> attributes)
{
- this.attributes = attributes;
+ if (this.attributes == null)
+ {
+ this.attributes = attributes;
+ }
+ else
+ {
+ this.attributes.putAll(attributes);
+ }
}
+
+ public void addAttribute(QName attrName, String attrValue)
+ {
+ if (this.attributes == null)
+ {
+ this.attributes = new HashMap<QName, String>();
+ }
+ this.attributes.put(attrName, attrValue);
+ }
}
+
}
14 years, 4 months
JBossWS SVN: r11576 - in stack/metro/branches/jaxrpc-cxf/src/main: scripts and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-10 13:31:18 -0500 (Wed, 10 Feb 2010)
New Revision: 11576
Modified:
stack/metro/branches/jaxrpc-cxf/src/main/distro/build.xml
stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-2922] Enable jaxrpc tests in binary distro
Modified: stack/metro/branches/jaxrpc-cxf/src/main/distro/build.xml
===================================================================
--- stack/metro/branches/jaxrpc-cxf/src/main/distro/build.xml 2010-02-10 17:55:58 UTC (rev 11575)
+++ stack/metro/branches/jaxrpc-cxf/src/main/distro/build.xml 2010-02-10 18:31:18 UTC (rev 11576)
@@ -96,6 +96,7 @@
<target name="tests-jars" depends="tests-compile,tests-copy-resources">
<ant antfile="${tests.dir}/ant-import/build-samples-jaxws.xml" target="build-samples-jaxws" inheritall="true"/>
+ <ant antfile="${tests.dir}/ant-import/build-samples-jaxrpc.xml" target="build-samples-jaxrpc" inheritall="true"/>
</target>
<target name="tests-main" depends="tests-jars" description="Build the test deployments."/>
Modified: stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 17:55:58 UTC (rev 11575)
+++ stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 18:31:18 UTC (rev 11576)
@@ -99,6 +99,7 @@
<includes>
<include>ant-import/**</include>
<include>java/org/jboss/test/ws/console/**</include>
+ <include>java/org/jboss/test/ws/jaxrpc/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/smoke/**</include>
<include>java/org/jboss/test/ws/management/**</include>
14 years, 4 months
JBossWS SVN: r11575 - in stack/native/branches/jaxrpc-cxf/src/main: scripts and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-10 12:55:58 -0500 (Wed, 10 Feb 2010)
New Revision: 11575
Modified:
stack/native/branches/jaxrpc-cxf/src/main/distro/build.xml
stack/native/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-2922] Enable jaxrpc tests in binary distro
Modified: stack/native/branches/jaxrpc-cxf/src/main/distro/build.xml
===================================================================
--- stack/native/branches/jaxrpc-cxf/src/main/distro/build.xml 2010-02-10 17:45:21 UTC (rev 11574)
+++ stack/native/branches/jaxrpc-cxf/src/main/distro/build.xml 2010-02-10 17:55:58 UTC (rev 11575)
@@ -99,6 +99,7 @@
<target name="tests-jars" depends="tests-compile,tests-copy-resources">
<ant antfile="${tests.dir}/ant-import/build-samples-jaxws.xml" target="build-samples-jaxws" inheritall="true"/>
+ <ant antfile="${tests.dir}/ant-import/build-samples-jaxrpc.xml" target="build-samples-jaxrpc" inheritall="true"/>
</target>
<target name="tests-main" depends="tests-jars" description="Build the test deployments."/>
Modified: stack/native/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/native/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 17:45:21 UTC (rev 11574)
+++ stack/native/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 17:55:58 UTC (rev 11575)
@@ -99,6 +99,7 @@
<includes>
<include>ant-import/**</include>
<include>java/org/jboss/test/ws/console/**</include>
+ <include>java/org/jboss/test/ws/jaxrpc/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/smoke/**</include>
<include>java/org/jboss/test/ws/management/**</include>
@@ -117,4 +118,4 @@
</moduleSet>
</moduleSets>
-</assembly>
\ No newline at end of file
+</assembly>
14 years, 4 months
JBossWS SVN: r11574 - in stack/cxf/branches/jaxrpc-cxf/src/main: scripts and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-10 12:45:21 -0500 (Wed, 10 Feb 2010)
New Revision: 11574
Modified:
stack/cxf/branches/jaxrpc-cxf/src/main/distro/build.xml
stack/cxf/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-2922] Enable jaxrpc tests in binary distro
Modified: stack/cxf/branches/jaxrpc-cxf/src/main/distro/build.xml
===================================================================
--- stack/cxf/branches/jaxrpc-cxf/src/main/distro/build.xml 2010-02-10 17:44:26 UTC (rev 11573)
+++ stack/cxf/branches/jaxrpc-cxf/src/main/distro/build.xml 2010-02-10 17:45:21 UTC (rev 11574)
@@ -96,6 +96,7 @@
<target name="tests-jars" depends="tests-compile,tests-copy-resources">
<ant antfile="${tests.dir}/ant-import/build-samples-jaxws.xml" target="build-samples-jaxws" inheritall="true"/>
+ <ant antfile="${tests.dir}/ant-import/build-samples-jaxrpc.xml" target="build-samples-jaxrpc" inheritall="true"/>
</target>
<target name="tests-main" depends="tests-jars" description="Build the test deployments."/>
Modified: stack/cxf/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/cxf/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 17:44:26 UTC (rev 11573)
+++ stack/cxf/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 17:45:21 UTC (rev 11574)
@@ -99,13 +99,14 @@
<includes>
<include>ant-import/**</include>
<include>java/org/jboss/test/ws/console/**</include>
+ <include>java/org/jboss/test/ws/jaxrpc/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/smoke/**</include>
<include>java/org/jboss/test/ws/management/**</include>
<include>java/org/jboss/test/ws/projectGenerator/**</include>
<include>resources/console/**</include>
+ <include>resources/jaxrpc/samples/**</include>
<include>resources/jaxws/samples/**</include>
- <include>resources/jaxrpc/samples/**</include>
<include>resources/jaxws/smoke/**</include>
<include>resources/management/**</include>
<include>resources/projectGenerator/**</include>
14 years, 4 months
JBossWS SVN: r11573 - framework/branches/jaxrpc-cxf/testsuite/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-10 12:44:26 -0500 (Wed, 10 Feb 2010)
New Revision: 11573
Modified:
framework/branches/jaxrpc-cxf/testsuite/test/ant-import/build-testsuite.xml
Log:
[JBWS-2922] Add classpath entries for jaxrpc tests in bin distro
Modified: framework/branches/jaxrpc-cxf/testsuite/test/ant-import/build-testsuite.xml
===================================================================
--- framework/branches/jaxrpc-cxf/testsuite/test/ant-import/build-testsuite.xml 2010-02-10 16:44:26 UTC (rev 11572)
+++ framework/branches/jaxrpc-cxf/testsuite/test/ant-import/build-testsuite.xml 2010-02-10 17:44:26 UTC (rev 11573)
@@ -185,10 +185,12 @@
<pathelement location="${jboss.lib}/jboss-reflect.jar"/>
<pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss.server.lib}/jbossws-native-core.jar"/> <!-- For jaxrpc tests -->
<pathelement location="${jboss.server.lib}/hibernate3.jar"/>
<pathelement location="${jboss.server.lib}/jnpserver.jar"/>
<pathelement location="${jboss.server.lib}/jboss-ejb3-core.jar"/>
<pathelement location="${jboss.server.lib}/hibernate-core.jar"/>
+ <pathelement location="${jboss.server.lib}/netty.jar"/> <!-- For jaxrpc tests -->
<pathelement location="${jboss.server.lib}/servlet-api.jar"/>
<pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi.jar"/>
<pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi-saaj.jar"/>
@@ -263,10 +265,12 @@
<pathelement location="${jboss.lib}/jboss-reflect.jar"/>
<pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss.server.lib}/jbossws-native-core.jar"/> <!-- For jaxrpc tests -->
<pathelement location="${jboss.server.lib}/hibernate3.jar"/>
<pathelement location="${jboss.server.lib}/jnpserver.jar"/>
<pathelement location="${jboss.server.lib}/jboss-ejb3-core.jar"/>
<pathelement location="${jboss.server.lib}/hibernate-core.jar"/>
+ <pathelement location="${jboss.server.lib}/netty.jar"/> <!-- For jaxrpc tests -->
<pathelement location="${jboss.server.lib}/servlet-api.jar"/>
<pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi.jar"/>
<pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi-saaj.jar"/>
@@ -345,10 +349,12 @@
<pathelement location="${jboss.lib}/jboss-reflect.jar"/>
<pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss.server.lib}/jbossws-native-core.jar"/> <!-- For jaxrpc tests -->
<pathelement location="${jboss.server.lib}/hibernate3.jar"/>
<pathelement location="${jboss.server.lib}/jnpserver.jar"/>
<pathelement location="${jboss.server.lib}/jboss-ejb3-core.jar"/>
<pathelement location="${jboss.server.lib}/hibernate-core.jar"/>
+ <pathelement location="${jboss.server.lib}/netty.jar"/> <!-- For jaxrpc tests -->
<pathelement location="${jboss.server.lib}/servlet-api.jar"/>
<pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi.jar"/>
<pathelement location="${jboss.server.deploy}/juddi-service.sar/juddi-saaj.jar"/>
14 years, 4 months
JBossWS SVN: r11572 - stack/metro/branches/jaxrpc-cxf/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-10 11:44:26 -0500 (Wed, 10 Feb 2010)
New Revision: 11572
Modified:
stack/metro/branches/jaxrpc-cxf/modules/testsuite/pom.xml
Log:
[JBWS-2922] Fix surefire classpath
Modified: stack/metro/branches/jaxrpc-cxf/modules/testsuite/pom.xml
===================================================================
--- stack/metro/branches/jaxrpc-cxf/modules/testsuite/pom.xml 2010-02-10 16:41:28 UTC (rev 11571)
+++ stack/metro/branches/jaxrpc-cxf/modules/testsuite/pom.xml 2010-02-10 16:44:26 UTC (rev 11572)
@@ -377,6 +377,9 @@
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <!-- Libs below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
+ <additionalClasspathElement>${jboss.home}/common/lib/jbossws-native-core.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/netty.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
@@ -438,6 +441,9 @@
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <!-- Libs below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
+ <additionalClasspathElement>${jboss.home}/common/lib/jbossws-native-core.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/netty.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
@@ -499,6 +505,9 @@
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <!-- Libs below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
+ <additionalClasspathElement>${jboss.home}/common/lib/jbossws-native-core.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/netty.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
@@ -560,6 +569,9 @@
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ <!-- Libs below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
+ <additionalClasspathElement>${jboss.home}/common/lib/jbossws-native-core.jar</additionalClasspathElement>
+ <additionalClasspathElement>${jboss.home}/common/lib/netty.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
14 years, 4 months
JBossWS SVN: r11571 - in stack/metro/branches/jaxrpc-cxf: src/main/scripts and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-10 11:41:28 -0500 (Wed, 10 Feb 2010)
New Revision: 11571
Modified:
stack/metro/branches/jaxrpc-cxf/modules/testsuite/framework-tests/pom.xml
stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-2922] Adding jaxrpc tests to the testsuite
Modified: stack/metro/branches/jaxrpc-cxf/modules/testsuite/framework-tests/pom.xml
===================================================================
--- stack/metro/branches/jaxrpc-cxf/modules/testsuite/framework-tests/pom.xml 2010-02-10 16:23:49 UTC (rev 11570)
+++ stack/metro/branches/jaxrpc-cxf/modules/testsuite/framework-tests/pom.xml 2010-02-10 16:41:28 UTC (rev 11571)
@@ -112,6 +112,7 @@
<property name="tests.output.dir" value="${project.build.directory}"/>
<ant antfile="src/test/ant-import/build-jars-jaxws.xml" target="build-jars-jaxws"/>
<ant antfile="src/test/ant-import/build-samples-jaxws.xml" target="build-samples-jaxws"/>
+ <ant antfile="src/test/ant-import/build-samples-jaxrpc.xml" target="build-samples-jaxrpc"/>
</tasks>
</configuration>
</execution>
Modified: stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 16:23:49 UTC (rev 11570)
+++ stack/metro/branches/jaxrpc-cxf/src/main/scripts/assembly-bin-dist.xml 2010-02-10 16:41:28 UTC (rev 11571)
@@ -104,6 +104,7 @@
<include>java/org/jboss/test/ws/management/**</include>
<include>java/org/jboss/test/ws/projectGenerator/**</include>
<include>resources/console/**</include>
+ <include>resources/jaxrpc/samples/**</include>
<include>resources/jaxws/samples/**</include>
<include>resources/jaxws/smoke/**</include>
<include>resources/management/**</include>
14 years, 4 months
JBossWS SVN: r11570 - stack/native/branches/jaxrpc-cxf/modules/services.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-10 11:23:49 -0500 (Wed, 10 Feb 2010)
New Revision: 11570
Modified:
stack/native/branches/jaxrpc-cxf/modules/services/
Log:
svn:ignore on modules/services/target
Property changes on: stack/native/branches/jaxrpc-cxf/modules/services
___________________________________________________________________
Name: svn:ignore
+ target
14 years, 4 months