JBossWS SVN: r11630 - spi/tags.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-19 06:05:21 -0500 (Fri, 19 Feb 2010)
New Revision: 11630
Added:
spi/tags/jbossws-spi-3.3.0.Beta3/
Log:
Tagging jbossws-spi-3.3.0.Beta3
Copied: spi/tags/jbossws-spi-3.3.0.Beta3 (from rev 11629, spi/trunk)
14 years, 4 months
JBossWS SVN: r11629 - in framework/trunk/testsuite/test/resources/jaxrpc/samples: jsr109pojo/rpclit/META-INF and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-19 05:47:17 -0500 (Fri, 19 Feb 2010)
New Revision: 11629
Modified:
framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml
framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss.xml
framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/META-INF/jboss-client.xml
framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jboss-web.xml
Log:
Fixing deployment descriptor erroneously including local fs references
Modified: framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml 2010-02-19 10:24:28 UTC (rev 11628)
+++ framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml 2010-02-19 10:47:17 UTC (rev 11629)
@@ -7,7 +7,7 @@
<service-ref>
<service-ref-name>service/TestServiceEJB</service-ref-name>
- <wsdl-override>http://localhost:8080/jaxrpc-samples-jsr109pojo-rpc?wsdl</wsdl-override>
+ <wsdl-override>http://localhost:8080/jaxrpc-samples-jsr109ejb-rpc?wsdl</wsdl-override>
</service-ref>
</jboss-client>
Modified: framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss.xml 2010-02-19 10:24:28 UTC (rev 11628)
+++ framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss.xml 2010-02-19 10:47:17 UTC (rev 11629)
@@ -8,7 +8,7 @@
<context-root>/jaxrpc-samples-jsr109ejb-rpc</context-root>
<webservice-description>
<webservice-description-name>TestService</webservice-description-name>
- <wsdl-publish-location>file:/dati/jbossws/stack/native/trunk/modules/testsuite/native-tests/target/wsdl-publish/jsr109ejb</wsdl-publish-location>
+ <wsdl-publish-location>http://localhost:8080/jaxrpc-samples-jsr109ejb-rpc?wsdl</wsdl-publish-location>
</webservice-description>
</webservices>
Modified: framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/META-INF/jboss-client.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/META-INF/jboss-client.xml 2010-02-19 10:24:28 UTC (rev 11628)
+++ framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/META-INF/jboss-client.xml 2010-02-19 10:47:17 UTC (rev 11629)
@@ -7,7 +7,7 @@
<service-ref>
<service-ref-name>service/TestServiceJSE</service-ref-name>
- <wsdl-override>file:/dati/jbossws/stack/native/trunk/modules/testsuite/native-tests/target/wsdl-publish/jsr109pojo/TestService.wsdl</wsdl-override>
+ <wsdl-override>http://localhost:8080/jaxrpc-samples-jsr109pojo-rpc?wsdl</wsdl-override>
</service-ref>
</jboss-client>
Modified: framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jboss-web.xml 2010-02-19 10:24:28 UTC (rev 11628)
+++ framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jboss-web.xml 2010-02-19 10:47:17 UTC (rev 11629)
@@ -6,7 +6,7 @@
<webservice-description>
<webservice-description-name>TestService</webservice-description-name>
- <wsdl-publish-location>file:/dati/jbossws/stack/native/trunk/modules/testsuite/native-tests/target/wsdl-publish/jsr109pojo</wsdl-publish-location>
+ <wsdl-publish-location>http://localhost:8080/jaxrpc-samples-jsr109pojo-rpc?wsdl</wsdl-publish-location>
</webservice-description>
</jboss-web>
\ No newline at end of file
14 years, 4 months
JBossWS SVN: r11628 - stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-19 05:24:28 -0500 (Fri, 19 Feb 2010)
New Revision: 11628
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java
Log:
refactoring XML helper methods in NativeEndpointReferenceTestCase
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java 2010-02-19 10:18:49 UTC (rev 11627)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java 2010-02-19 10:24:28 UTC (rev 11628)
@@ -71,26 +71,18 @@
public void testNativeEndpointReferenceFromSource() throws Exception
{
- System.out.println(getXml(DOMUtils.parse(XML)));
+ System.out.println(DOMUtils.node2String(DOMUtils.parse(XML)));
final Source xml = new DOMSource(DOMUtils.parse(XML));
NativeEndpointReference epr = new NativeEndpointReference(xml);
DOMResult dr = new DOMResult();
epr.writeTo(dr);
Node endpointReferenceElement = dr.getNode();
- System.out.println(getXml(endpointReferenceElement));
+ System.out.println(DOMUtils.node2String(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);
14 years, 4 months
JBossWS SVN: r11626 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-19 05:09:59 -0500 (Fri, 19 Feb 2010)
New Revision: 11626
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Echo.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EchoResponse.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/JBWS2937TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ProviderImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/UserType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/package-info.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/real.diff
framework/trunk/testsuite/test/resources/jaxws/jbws2937/
framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/wsdl/Endpoint.wsdl
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2937] providing test case for creating Dispatch objects using EPR based javax.xml.ws.Service.createDispatch(...) methods
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-02-19 09:57:56 UTC (rev 11625)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-02-19 10:09:59 UTC (rev 11626)
@@ -837,6 +837,21 @@
</fileset>
</jar>
+ <!-- jaxws-jbws2937 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2937.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2937/UserType.class"/>
+ </fileset>
+ </jar>
+
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2937-client.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2937/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.class"/>
+ </fileset>
+ </jar>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/test-libs/jaxws-namespace.war" webxml="${tests.output.dir}/test-resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Echo.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Echo.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Echo.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.jbws2937;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="echo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="arg0" type="{http://jboss.org/jbws2937}UserType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlRootElement(name = "echo", namespace = "http://jboss.org/jbws2937")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "echo", propOrder = {
+ "arg0"
+})
+public class Echo {
+
+ protected UserType arg0;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ * @return
+ * possible object is
+ * {@link UserType }
+ *
+ */
+ public UserType getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link UserType }
+ *
+ */
+ public void setArg0(UserType value) {
+ this.arg0 = value;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EchoResponse.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EchoResponse.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EchoResponse.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,64 @@
+
+package org.jboss.test.ws.jaxws.jbws2937;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echoResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="echoResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://jboss.org/jbws2937}UserType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlRootElement(name = "echoResponse", namespace = "http://jboss.org/jbws2937")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "echoResponse", propOrder = {
+ "_return"
+})
+public class EchoResponse {
+
+ @XmlElement(name = "return")
+ protected UserType _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ * @return
+ * possible object is
+ * {@link UserType }
+ *
+ */
+ public UserType getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ * @param value
+ * allowed object is
+ * {@link UserType }
+ *
+ */
+ public void setReturn(UserType value) {
+ this._return = value;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Endpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Endpoint.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/Endpoint.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.jbws2937;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://jboss.org/jbws2937")
+public interface Endpoint {
+
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns org.jboss.test.ws.jaxws.jbws2937.UserType
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "")
+ @RequestWrapper(localName = "echo", targetNamespace = "http://jboss.org/jbws2937", className = "org.jboss.test.ws.jaxws.jbws2937.Echo")
+ @ResponseWrapper(localName = "echoResponse", targetNamespace = "http://jboss.org/jbws2937", className = "org.jboss.test.ws.jaxws.jbws2937.EchoResponse")
+ public UserType echo(
+ @WebParam(name = "arg0", targetNamespace = "")
+ UserType arg0);
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointImpl.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,60 @@
+/*
+ * 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.jbws2937;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+
+import javax.ejb.Stateless;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * Service implementation.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@Stateless
+@SOAPBinding
+@WebContext
+(
+ contextRoot="jaxws-jbws2937",
+ urlPattern="/*"
+)
+@WebService
+(
+ name = "Endpoint",
+ serviceName = "EndpointService",
+ targetNamespace = "http://jboss.org/jbws2937"
+)
+public class EndpointImpl
+{
+ @WebMethod
+ public UserType echo(UserType user)
+ {
+ return user;
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/EndpointService.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,65 @@
+
+package org.jboss.test.ws.jaxws.jbws2937;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.0
+ *
+ */
+@WebServiceClient(name = "EndpointService", targetNamespace = "http://jboss.org/jbws2937", wsdlLocation = "file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/service.wsdl")
+public class EndpointService
+ extends Service
+{
+
+ private final static URL ENDPOINTSERVICE_WSDL_LOCATION;
+ private final static WebServiceException ENDPOINTSERVICE_EXCEPTION;
+ private final static QName ENDPOINTSERVICE_QNAME = new QName("http://jboss.org/jbws2937", "EndpointService");
+
+ static {
+ URL url = null;
+ WebServiceException e = null;
+ try {
+ url = new URL("file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/service.wsdl");
+ } catch (MalformedURLException ex) {
+ e = new WebServiceException(ex);
+ }
+ ENDPOINTSERVICE_WSDL_LOCATION = url;
+ ENDPOINTSERVICE_EXCEPTION = e;
+ }
+
+ public EndpointService() {
+ super(__getWsdlLocation(), ENDPOINTSERVICE_QNAME);
+ }
+
+ public EndpointService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ /**
+ *
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort() {
+ return super.getPort(new QName("http://jboss.org/jbws2937", "EndpointPort"), Endpoint.class);
+ }
+
+ private static URL __getWsdlLocation() {
+ if (ENDPOINTSERVICE_EXCEPTION!= null) {
+ throw ENDPOINTSERVICE_EXCEPTION;
+ }
+ return ENDPOINTSERVICE_WSDL_LOCATION;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/JBWS2937TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/JBWS2937TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/JBWS2937TestCase.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,201 @@
+/*
+ * 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.jbws2937;
+
+import java.io.StringReader;
+import java.net.URL;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.Service.Mode;
+import javax.xml.ws.soap.AddressingFeature;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * [JBWS-2937] Cannot create dispatch object using EPR based javax.xml.ws.Service.createDispatch methods.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class JBWS2937TestCase extends JBossWSTest
+{
+ private static final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2937";
+ private static final WebServiceFeature[] ADDRESSING_ENABLED = { new AddressingFeature(true) };
+ private static final WebServiceFeature[] ADDRESSING_DISABLED = { new AddressingFeature(false) };
+ private static final String NAMESPACE_URI = "http://jboss.org/jbws2937";
+ private static final String XML = "<ns1:echo xmlns:ns1='http://jboss.org/jbws2937'>" +
+ " <arg0>" +
+ " <string>Kermit</string>" +
+ " <qname>TheFrog</qname>" +
+ " </arg0>" +
+ "</ns1:echo>";
+ private static final QName SERVICE_QNAME = new QName(NAMESPACE_URI, "EndpointService");
+ private static final QName PORT_QNAME = new QName(NAMESPACE_URI, "EndpointPort");
+ private Service service;
+ private Endpoint proxy;
+ private EndpointReference epr;
+ private UserType user;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2937TestCase.class, "jaxws-jbws2937.jar, jaxws-jbws2937-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ URL wsdlURL = new URL(ENDPOINT_ADDRESS + "?wsdl");
+ this.service = EndpointService.create(wsdlURL, SERVICE_QNAME);
+ this.proxy = (Endpoint)this.service.getPort(PORT_QNAME, Endpoint.class);
+ this.epr = ((BindingProvider)this.proxy).getEndpointReference();
+ // prepare request object
+ this.user = new UserType();
+ this.user.setString("Kermit");
+ this.user.setQname(new QName("TheFrog"));
+ }
+
+ public void testProxy() throws Exception
+ {
+ final UserType response = this.proxy.echo(this.user);
+ assertEquals(this.user, response);
+ }
+
+ public void testCreateDispatchUsingEPRAndSource() throws Exception
+ {
+ Dispatch<Source> dispatch = this.service.createDispatch(PORT_QNAME, Source.class, Mode.PAYLOAD);
+ assertNotNull("Dispatch is null", dispatch);
+ this.invokeSourceDispatch(dispatch);
+ this.epr = dispatch.getEndpointReference();
+ printEPR(this.epr);
+
+ dispatch = this.service.createDispatch(this.epr, Source.class, Service.Mode.PAYLOAD, ADDRESSING_ENABLED);
+ assertNotNull("Dispatch is null", dispatch);
+ this.invokeSourceDispatch(dispatch);
+ this.epr = dispatch.getEndpointReference();
+ printEPR(this.epr);
+
+ dispatch = this.service.createDispatch(this.epr, Source.class, Service.Mode.PAYLOAD, ADDRESSING_DISABLED);
+ assertNotNull("Dispatch is null", dispatch);
+ this.invokeSourceDispatch(dispatch);
+ this.epr = dispatch.getEndpointReference();
+ printEPR(this.epr);
+ }
+
+ public void testCreateDispatchUsingEPRAndJAXBContext() throws Exception
+ {
+ Dispatch<Object> dispatch = this.service.createDispatch(PORT_QNAME, this.createJAXBContext(), Mode.PAYLOAD);
+ assertNotNull("Dispatch is null", dispatch);
+ this.invokeObjectDispatch(dispatch);
+ this.epr = dispatch.getEndpointReference();
+ printEPR(this.epr);
+
+ dispatch = this.service.createDispatch(this.epr, this.createJAXBContext(), Service.Mode.PAYLOAD, ADDRESSING_ENABLED);
+ assertNotNull("Dispatch is null", dispatch);
+ this.invokeObjectDispatch(dispatch);
+ this.epr = dispatch.getEndpointReference();
+ printEPR(this.epr);
+
+ dispatch = this.service.createDispatch(this.epr, this.createJAXBContext(), Service.Mode.PAYLOAD, ADDRESSING_DISABLED);
+ assertNotNull("Dispatch is null", dispatch);
+ this.invokeObjectDispatch(dispatch);
+ this.epr = dispatch.getEndpointReference();
+ printEPR(this.epr);
+ }
+
+ private JAXBContext createJAXBContext()
+ {
+ try
+ {
+ return JAXBContext.newInstance(ObjectFactory.class);
+ }
+ catch (JAXBException e)
+ {
+ throw new RuntimeException(e.getMessage(), e);
+ }
+ }
+
+ private void invokeObjectDispatch(final Dispatch<Object> dispatch) throws Exception
+ {
+ Echo request = new Echo();
+ request.setArg0(this.user);
+ EchoResponse response = (EchoResponse)dispatch.invoke(request);
+ assertEquals(response.getReturn(), this.user);
+ }
+
+ private void invokeSourceDispatch(final Dispatch<Source> dispatch) throws Exception
+ {
+ Source request = new StreamSource(new StringReader(XML));
+ Source response = dispatch.invoke(request);
+ verifyResponse(response);
+ }
+
+ private void verifyResponse(final Source result) throws Exception
+ {
+ final Element echoResponseElement = DOMUtils.sourceToElement(result);
+ System.out.println(DOMUtils.node2String(echoResponseElement));
+ assertNotNull("echoResponse element is null", echoResponseElement);
+ // validate return element
+ final Element returnElement = DOMUtils.getFirstChildElement(echoResponseElement);
+ assertNotNull("return element is null", returnElement);
+ assertEquals("return", returnElement.getNodeName());
+ // validate string element
+ final Element stringElement = DOMUtils.getFirstChildElement(returnElement, "string");
+ assertNotNull("string element is null", stringElement);
+ assertEquals("string", stringElement.getNodeName());
+ assertEquals("Kermit", stringElement.getTextContent());
+ // validate string element
+ final Element qnameElement = DOMUtils.getFirstChildElement(returnElement, "qname");
+ assertNotNull("qname element is null", qnameElement);
+ assertEquals("qname", qnameElement.getNodeName());
+ assertEquals("TheFrog", qnameElement.getTextContent());
+ }
+
+ private void printEPR(final EndpointReference epr) throws Exception
+ {
+ DOMResult dr = new DOMResult();
+ epr.writeTo(dr);
+ Node endpointReferenceElement = dr.getNode();
+ System.out.println(DOMUtils.node2String(endpointReferenceElement));
+ }
+
+ private void assertEquals(final UserType user1, final UserType user2)
+ {
+ assertEquals("user.string differs", user1.getString(), user2.getString());
+ assertEquals("user.qname differs", user1.getQname(), user2.getQname());
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ObjectFactory.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ObjectFactory.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ObjectFactory.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,89 @@
+
+package org.jboss.test.ws.jaxws.jbws2937;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.jbws2937 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _Echo_QNAME = new QName("http://jboss.org/jbws2937", "echo");
+ private final static QName _EchoResponse_QNAME = new QName("http://jboss.org/jbws2937", "echoResponse");
+ private final static QName _User_QNAME = new QName("http://jboss.org/jbws2937", "user");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.jbws2937
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link Echo }
+ *
+ */
+ public Echo createEcho() {
+ return new Echo();
+ }
+
+ /**
+ * Create an instance of {@link UserType }
+ *
+ */
+ public UserType createUserType() {
+ return new UserType();
+ }
+
+ /**
+ * Create an instance of {@link EchoResponse }
+ *
+ */
+ public EchoResponse createEchoResponse() {
+ return new EchoResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Echo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://jboss.org/jbws2937", name = "echo")
+ public JAXBElement<Echo> createEcho(Echo value) {
+ return new JAXBElement<Echo>(_Echo_QNAME, Echo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link EchoResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://jboss.org/jbws2937", name = "echoResponse")
+ public JAXBElement<EchoResponse> createEchoResponse(EchoResponse value) {
+ return new JAXBElement<EchoResponse>(_EchoResponse_QNAME, EchoResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link UserType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://jboss.org/jbws2937", name = "user")
+ public JAXBElement<UserType> createUser(UserType value) {
+ return new JAXBElement<UserType>(_User_QNAME, UserType.class, null, value);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ProviderImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ProviderImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/ProviderImpl.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,66 @@
+/*
+ * 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.jbws2937;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.util.JAXBSource;
+import javax.xml.transform.Source;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.Provider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.http.HTTPBinding;
+
+/**
+ * JAXB based provider.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebServiceProvider
+(
+ serviceName = "ProviderService",
+ portName = "ProviderPort",
+ targetNamespace = "http://jboss.org/jbws2937",
+ wsdlLocation = "WEB-INF/wsdl/Endpoint.wsdl"
+)
+@BindingType(value = HTTPBinding.HTTP_BINDING)
+@ServiceMode(value = Service.Mode.MESSAGE)
+public class ProviderImpl implements Provider<Source>
+{
+ public Source invoke(final Source request)
+ {
+ try
+ {
+ JAXBContext jc = JAXBContext.newInstance(UserType.class);
+ UserType user = (UserType)jc.createUnmarshaller().unmarshal(request);
+ System.out.println("[string=" + user.getString() + ",qname=" + user.getQname() + "]");
+ return new JAXBSource(jc, user);
+ }
+ catch (JAXBException e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/UserType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/UserType.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/UserType.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,91 @@
+
+package org.jboss.test.ws.jaxws.jbws2937;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+
+/**
+ * <p>Java class for UserType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="UserType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="string" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="qname" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "UserType", propOrder = {
+ "string",
+ "qname"
+})
+public class UserType {
+
+ @XmlElement(required = true)
+ protected String string;
+ @XmlElement(required = true)
+ protected QName qname;
+
+ /**
+ * Gets the value of the string property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getString() {
+ return string;
+ }
+
+ /**
+ * Sets the value of the string property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setString(String value) {
+ this.string = value;
+ }
+
+ /**
+ * Gets the value of the qname property.
+ *
+ * @return
+ * possible object is
+ * {@link QName }
+ *
+ */
+ public QName getQname() {
+ return qname;
+ }
+
+ /**
+ * Sets the value of the qname property.
+ *
+ * @param value
+ * allowed object is
+ * {@link QName }
+ *
+ */
+ public void setQname(QName value) {
+ this.qname = value;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/package-info.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/package-info.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/package-info.java 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,2 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://jboss.org/jbws2937")
+package org.jboss.test.ws.jaxws.jbws2937;
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/real.diff
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/real.diff (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2937/real.diff 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,6 @@
+6a7
+> import javax.xml.bind.annotation.XmlRootElement;
+30a32
+> @XmlRootElement(namespace = "http://jboss.org/jbws2937", name = "user")
+90d91
+<
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/web.xml 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+ <servlet>
+ <servlet-name>Provider</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2937.ProviderImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Provider</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/wsdl/Endpoint.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/wsdl/Endpoint.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2937/WEB-INF/wsdl/Endpoint.wsdl 2010-02-19 10:09:59 UTC (rev 11626)
@@ -0,0 +1,45 @@
+<?xml version='1.0'?>
+<definitions name='ProviderService' targetNamespace='http://jboss.org/jbws2937' xmlns='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:mime='http://schemas.xmlsoap.org/wsdl/mime/' xmlns:tns='http://jboss.org/jbws2937' xmlns:http='http://schemas.xmlsoap.org/wsdl/http/'
+ xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema targetNamespace='http://jboss.org/jbws2937' xmlns:tns='http://jboss.org/jbws2937' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='user' type='tns:UserType'/>
+ <xs:complexType name='UserType'>
+ <xs:sequence>
+ <xs:element name='string' type='xs:string'/>
+ <xs:element name='qname' type='xs:QName'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='echo'>
+ <part element='tns:user' name='user'/>
+ </message>
+ <message name='echoResponse'>
+ <part element='tns:user' name='user'/>
+ </message>
+ <portType name='Provider'>
+ <operation name='echo'>
+ <input message='tns:echo'/>
+ <output message='tns:echoResponse'/>
+ </operation>
+ </portType>
+ <binding name='ProviderBinding' type='tns:Provider'>
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name='echo'>
+ <http:operation location='echo'/>
+ <input>
+ <mime:content type="text/xml"/>
+ </input>
+ <output>
+ <mime:content type="text/xml"/>
+ </output>
+ </operation>
+ </binding>
+ <service name='ProviderService'>
+ <port binding='tns:ProviderBinding' name='ProviderPort'>
+ <http:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
14 years, 4 months
JBossWS SVN: r11625 - in framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws: jbws2917 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-19 04:57:56 -0500 (Fri, 19 Feb 2010)
New Revision: 11625
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2917/JBWS2917TestCase.java
Log:
refactoring XML helper methods
Modified: 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 2010-02-19 09:46:20 UTC (rev 11624)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.java 2010-02-19 09:57:56 UTC (rev 11625)
@@ -21,17 +21,12 @@
*/
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;
@@ -82,7 +77,7 @@
DOMResult dr = new DOMResult();
epr.writeTo(dr);
Node endpointReferenceElement = dr.getNode();
- System.out.println(getXml(endpointReferenceElement));
+ System.out.println(DOMUtils.node2String(endpointReferenceElement));
assertMetaData(endpointReferenceElement);
assertRefParam(endpointReferenceElement, PARAM1_QNAME, "Hello");
assertRefParam(endpointReferenceElement, PARAM2_QNAME, "World");
@@ -104,20 +99,12 @@
DOMResult dr = new DOMResult();
epr.writeTo(dr);
Node endpointReferenceElement = dr.getNode();
- System.out.println(getXml(endpointReferenceElement));
+ System.out.println(DOMUtils.node2String(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);
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2917/JBWS2917TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2917/JBWS2917TestCase.java 2010-02-19 09:46:20 UTC (rev 11624)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2917/JBWS2917TestCase.java 2010-02-19 09:57:56 UTC (rev 11625)
@@ -21,18 +21,13 @@
*/
package org.jboss.test.ws.jaxws.jbws2917;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
import java.io.StringReader;
import javax.xml.transform.stream.StreamSource;
import javax.xml.ws.EndpointReference;
-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;
/**
* [JBWS-2917] We're using buggy xalan version causing namespaces issues
@@ -54,22 +49,14 @@
public void testToString() throws Exception
{
- assertTrue("lost xmlns:wsns namespace declaration", this.getXml(XML_SOURCE).indexOf("xmlns:wsns") != -1);
+ assertTrue("lost xmlns:wsns namespace declaration", this.getXML(XML_SOURCE).indexOf("xmlns:wsns") != -1);
StreamSource source = new StreamSource(new StringReader(XML_SOURCE));
EndpointReference epRef = EndpointReference.readFrom(source);
assertTrue("lost xmlns:wsns namespace declaration", epRef.toString().indexOf("xmlns:wsns") != -1);
}
- private String getXml(final String s) throws Exception
+ private String getXML(final String s) throws Exception
{
- return this.getXml(DOMUtils.parse(s));
+ return DOMUtils.node2String(DOMUtils.parse(s));
}
-
- private String getXml(final Element e) throws Exception
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PrintWriter pw = new PrintWriter(baos);
- new DOMWriter(pw, Constants.DEFAULT_XML_CHARSET).setPrettyprint(true).print(e);
- return baos.toString("utf-8");
- }
}
14 years, 4 months
JBossWS SVN: r11624 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-19 04:46:20 -0500 (Fri, 19 Feb 2010)
New Revision: 11624
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
Log:
[JBWS-2938] fixing JAXB based dispatch to return proper value instead of JAXBElement
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2010-02-19 09:44:52 UTC (rev 11623)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2010-02-19 09:46:20 UTC (rev 11624)
@@ -26,6 +26,7 @@
import java.io.StringReader;
import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.soap.MessageFactory;
@@ -181,6 +182,10 @@
log.debug("JAXB unmarshal: " + DOMWriter.printNode(soapElement, false));
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
retObj = unmarshaller.unmarshal(soapElement);
+ if (retObj instanceof JAXBElement<?>)
+ {
+ retObj = ((JAXBElement<?>)retObj).getValue();
+ }
}
}
catch (RuntimeException rte)
14 years, 4 months
JBossWS SVN: r11623 - stack/native/trunk/src/main/scripts.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-19 04:44:52 -0500 (Fri, 19 Feb 2010)
New Revision: 11623
Modified:
stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml
Log:
Adding explicit reference to junit in assembly-deploy-artifacts.xml for force the jar into the binary distro
Modified: stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2010-02-19 09:40:10 UTC (rev 11622)
+++ stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2010-02-19 09:44:52 UTC (rev 11623)
@@ -51,6 +51,7 @@
<include>com.sun.xml.ws:jaxws-tools:jar</include>
<include>com.sun.xml.ws:jaxws-rt:jar</include>
<include>jboss.jaxbintros:jboss-jaxb-intros:jar</include>
+ <include>junit:junit:jar</include>
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
<include>javax.xml:jaxrpc-api:jar</include>
14 years, 4 months
JBossWS SVN: r11622 - framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-19 04:40:10 -0500 (Fri, 19 Feb 2010)
New Revision: 11622
Modified:
framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml
Log:
Fixing deployment descriptor erroneously including local fs references
Modified: framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml 2010-02-19 08:48:11 UTC (rev 11621)
+++ framework/trunk/testsuite/test/resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jboss-client.xml 2010-02-19 09:40:10 UTC (rev 11622)
@@ -7,7 +7,7 @@
<service-ref>
<service-ref-name>service/TestServiceEJB</service-ref-name>
- <wsdl-override>file:/dati/jbossws/stack/native/trunk/modules/testsuite/native-tests/target/wsdl-publish/jsr109ejb/TestService.wsdl</wsdl-override>
+ <wsdl-override>http://localhost:8080/jaxrpc-samples-jsr109pojo-rpc?wsdl</wsdl-override>
</service-ref>
</jboss-client>
14 years, 4 months
JBossWS SVN: r11621 - in stack/native/trunk: modules/core and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-19 03:48:11 -0500 (Fri, 19 Feb 2010)
New Revision: 11621
Modified:
stack/native/trunk/modules/core/pom.xml
stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/native/trunk/pom.xml
stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml
Log:
[JBWS-2861] Rollbacking commit 11465
Modified: stack/native/trunk/modules/core/pom.xml
===================================================================
--- stack/native/trunk/modules/core/pom.xml 2010-02-18 17:57:39 UTC (rev 11620)
+++ stack/native/trunk/modules/core/pom.xml 2010-02-19 08:48:11 UTC (rev 11621)
@@ -145,6 +145,10 @@
<artifactId>wscommons-policy</artifactId>
</dependency>
<dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-lgpl</artifactId>
+ </dependency>
+ <dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
</dependency>
Modified: stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2010-02-18 17:57:39 UTC (rev 11620)
+++ stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2010-02-19 08:48:11 UTC (rev 11621)
@@ -51,10 +51,12 @@
<include name="**/stax-ex.jar"/>
<include name="**/streambuffer.jar"/>
<include name="**/wsdl4j.jar"/>
+ <include name="**/wstx.jar"/>
</patternset>
<patternset id="jbossws.lib.patternset">
<include name="**/jaxb-impl.jar"/>
+ <include name="**/wstx.jar"/>
</patternset>
<patternset id="jbossws.lib.endorsed.patternset">
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2010-02-18 17:57:39 UTC (rev 11620)
+++ stack/native/trunk/pom.xml 2010-02-19 08:48:11 UTC (rev 11621)
@@ -75,6 +75,7 @@
<sun.fastinfoset.version>1.2.2</sun.fastinfoset.version>
<sun.jaxws.version>2.2</sun.jaxws.version>
<sun.policy.version>2.0-b01</sun.policy.version>
+ <woodstox.version>3.2.6</woodstox.version>
<wscommons.policy.version>1.0</wscommons.policy.version>
<wsdl4j.version>1.6.1</wsdl4j.version>
<xmlsec.version>1.4.3</xmlsec.version>
@@ -393,6 +394,11 @@
<version>${wscommons.policy.version}</version>
</dependency>
<dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-lgpl</artifactId>
+ <version>${woodstox.version}</version>
+ </dependency>
+ <dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>${wsdl4j.version}</version>
Modified: stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2010-02-18 17:57:39 UTC (rev 11620)
+++ stack/native/trunk/src/main/scripts/assembly-deploy-artifacts.xml 2010-02-19 08:48:11 UTC (rev 11621)
@@ -67,6 +67,13 @@
<include>org.apache.ws.policy:wscommons-policy:jar</include>
</includes>
</dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>wstx.jar</outputFileNameMapping>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>org.codehaus.woodstox:wstx-lgpl:jar</include>
+ </includes>
+ </dependencySet>
</dependencySets>
</binaries>
</moduleSet>
14 years, 4 months