Author: richard.opalka(a)jboss.com
Date: 2010-05-27 06:19:44 -0400 (Thu, 27 May 2010)
New Revision: 12353
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/DataType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java
framework/trunk/testsuite/test/resources/jaxws/jbws3041/
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3041] providing EPR in WSDL test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-05-27 10:18:36 UTC
(rev 12352)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-05-27 10:19:44 UTC
(rev 12353)
@@ -977,6 +977,19 @@
</webinf>
</war>
+ <!-- jaxws-jbws3041 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3041.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws3041/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3041/service/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3041/service/*.xml" />
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3041/WEB-INF">
+ <include name="wsdl/**" />
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
<!-- 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/jbws3041/DataType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/DataType.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/DataType.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,83 @@
+/*
+ * 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.jbws3041;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for DataType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="DataType">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="param"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataType", propOrder =
+{"param"})
+public class DataType
+{
+
+ @XmlElement(required = true)
+ protected String param;
+
+ /**
+ * Gets the value of the param property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getParam()
+ {
+ return param;
+ }
+
+ /**
+ * Sets the value of the param property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setParam(String value)
+ {
+ this.param = value;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,131 @@
+/*
+ * 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.jbws3041;
+
+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;
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * 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.2
+ *
+ */
+@WebServiceClient(name = "EPRInWsdlTestService", targetNamespace =
"http://eprinwsdltestservice.org/wsdl", wsdlLocation =
"file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl")
+public class EPRInWsdlTestService extends Service
+{
+
+ private final static URL EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+
+ private final static WebServiceException EPRINWSDLTESTSERVICE_EXCEPTION;
+
+ private final static QName EPRINWSDLTESTSERVICE_QNAME = new
QName("http://eprinwsdltestservice.org/wsdl",
+ "EPRInWsdlTestService");
+
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ try
+ {
+ url = new URL(
+
"file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl");
+ }
+ catch (MalformedURLException ex)
+ {
+ e = new WebServiceException(ex);
+ }
+ EPRINWSDLTESTSERVICE_WSDL_LOCATION = url;
+ EPRINWSDLTESTSERVICE_EXCEPTION = e;
+ }
+
+ public EPRInWsdlTestService()
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(WebServiceFeature... features)
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, WebServiceFeature... features)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName, WebServiceFeature...
features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port()
+ {
+ return super.getPort(new
QName("http://eprinwsdltestservice.org/wsdl",
"Test1Port"), Test1.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.
Supported features not in the <code>features</code> parameter will have their
default values.
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port(WebServiceFeature... features)
+ {
+ return super.getPort(new
QName("http://eprinwsdltestservice.org/wsdl",
"Test1Port"), Test1.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (EPRINWSDLTESTSERVICE_EXCEPTION != null)
+ {
+ throw EPRINWSDLTESTSERVICE_EXCEPTION;
+ }
+ return EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,146 @@
+/*
+ * 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.jbws3041;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+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;
+import org.w3c.dom.NodeList;
+
+/**
+ * [JBWS-3041] support for EPRs specified in WSDL.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class JBWS3041TestCase extends JBossWSTest
+{
+
+ private static final WebServiceFeature[] ADDRESSING_ENABLED = { new
AddressingFeature(true) };
+ private EPRInWsdlTestService service;
+ private W3CEndpointReference epr;
+ private Test1 port;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3041TestCase.class,
"jaxws-jbws3041.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (this.port == null)
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3041/Endpoint?wsdl");
+ this.service = new EPRInWsdlTestService(wsdlURL);
+ this.port = (Test1) this.service.getPort(Test1.class, ADDRESSING_ENABLED);
+ final BindingProvider bp = (BindingProvider) this.port;
+ this.epr = (W3CEndpointReference) bp.getEndpointReference();
+ }
+ }
+
+ public void testGetEPRAndVerifyMetaDataAndRefParamsTest1() throws Exception
+ {
+ final Holder<DataType> holder =
this.newHolder("GetEPRAndVerifyMetaDataAndRefParamsTest1");
+
+ this.port.testOperation(holder);
+ }
+
+ public void testGetPortAndVerifyRefParamsAreSentTest1() throws Exception
+ {
+ final Holder<DataType> holder =
this.newHolder("GetPortAndVerifyRefParamsAreSentTest1");
+ final Test1 testPort = (Test1) this.service.getPort(Test1.class,
ADDRESSING_ENABLED);
+
+ testPort.testOperation(holder);
+ }
+
+ public void testGetPortAndVerifyRefParamsAreSentTest2() throws Exception
+ {
+ final Holder<DataType> holder =
this.newHolder("GetPortAndVerifyRefParamsAreSentTest2");
+ final Test1 testPort = (Test1) this.service.getPort(this.epr, Test1.class,
ADDRESSING_ENABLED);
+
+ testPort.testOperation(holder);
+ }
+
+ public void testGetPortAndVerifyModifiedRefParamsAreSentTest3() throws Exception
+ {
+ final Holder<DataType> holder =
this.newHolder("GetPortAndVerifyModifiedRefParamsAreSentTest3");
+ final W3CEndpointReference epr = this.newModifiedEPR();
+ final Test1 testPort = (Test1) this.service.getPort(epr, Test1.class,
ADDRESSING_ENABLED);
+
+ testPort.testOperation(holder);
+ }
+
+ private W3CEndpointReference newModifiedEPR()
+ {
+ final DOMResult temp = new DOMResult();
+ this.epr.writeTo(temp);
+ final Node eprElement = temp.getNode();
+ this.changeNodeValue(eprElement, new
QName("http://eprinwsdltestservice.org/myns1", "MyParam1"),
"MyValue1");
+ this.changeNodeValue(eprElement, new
QName("http://eprinwsdltestservice.org/myns2", "MyParam2"),
"MyValue2");
+
+ return (W3CEndpointReference) EndpointReference.readFrom(new
DOMSource(eprElement));
+ }
+
+ private Holder<DataType> newHolder(final String param)
+ {
+ final DataType datatype = new DataType();
+ datatype.setParam(param);
+ final Holder<DataType> data = new Holder<DataType>();
+ data.value = datatype;
+
+ return data;
+ }
+
+ private void changeNodeValue(Node eprElement, QName paramQName, String newValue)
+ {
+ final Element paramElement = DOMUtils.getFirstChildElement(eprElement, paramQName,
true);
+
+ if (paramElement != null)
+ {
+ NodeList nl = paramElement.getChildNodes();
+ for (int i = 0; i < nl.getLength(); i++)
+ {
+ Node node = nl.item(i);
+ if (node.getNodeType() == Node.TEXT_NODE)
+ {
+ node.setNodeValue(newValue);
+ break;
+ }
+ }
+ }
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,76 @@
+/*
+ * 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.jbws3041;
+
+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.jbws3041 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 _DataType_QNAME = new
QName("http://eprinwsdltestservice.org/xsd", "DataType");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.jbws3041
+ *
+ */
+ public ObjectFactory()
+ {
+ }
+
+ /**
+ * Create an instance of {@link DataType }
+ *
+ */
+ public DataType createDataType()
+ {
+ return new DataType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link DataType }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://eprinwsdltestservice.org/xsd", name =
"DataType")
+ public JAXBElement<DataType> createDataType(DataType value)
+ {
+ return new JAXBElement<DataType>(_DataType_QNAME, DataType.class, null,
value);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,52 @@
+/*
+ * 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.jbws3041;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Holder;
+
+/**
+ * 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.2
+ *
+ */
+@WebService(name = "Test1", targetNamespace =
"http://eprinwsdltestservice.org/wsdl")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+@XmlSeeAlso(
+{ObjectFactory.class})
+public interface Test1
+{
+
+ /**
+ *
+ * @param data
+ */
+ @WebMethod(operationName = "TestOperation")
+ public void testOperation(
+ @WebParam(name = "DataType", targetNamespace =
"http://eprinwsdltestservice.org/xsd", mode = WebParam.Mode.INOUT, partName =
"data") Holder<DataType> data);
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://eprinwsdltestservice.org/xsd", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.jbws3041;
+
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,83 @@
+/*
+ * 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.jbws3041.service;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for DataType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="DataType">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="param"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataType", propOrder =
+{"param"})
+public class DataType
+{
+
+ @XmlElement(required = true)
+ protected String param;
+
+ /**
+ * Gets the value of the param property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getParam()
+ {
+ return param;
+ }
+
+ /**
+ * Sets the value of the param property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setParam(String value)
+ {
+ this.param = value;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,133 @@
+/*
+ * 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.jbws3041.service;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+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;
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * 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.2
+ *
+ */
+@WebServiceClient(name = "EPRInWsdlTestService", targetNamespace =
"http://eprinwsdltestservice.org/wsdl", wsdlLocation =
"file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl")
+@HandlerChain(file = "EPRInWsdlTestService_handler.xml")
+public class EPRInWsdlTestService extends Service
+{
+
+ private final static URL EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+
+ private final static WebServiceException EPRINWSDLTESTSERVICE_EXCEPTION;
+
+ private final static QName EPRINWSDLTESTSERVICE_QNAME = new
QName("http://eprinwsdltestservice.org/wsdl",
+ "EPRInWsdlTestService");
+
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ try
+ {
+ url = new URL(
+
"file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl");
+ }
+ catch (MalformedURLException ex)
+ {
+ e = new WebServiceException(ex);
+ }
+ EPRINWSDLTESTSERVICE_WSDL_LOCATION = url;
+ EPRINWSDLTESTSERVICE_EXCEPTION = e;
+ }
+
+ public EPRInWsdlTestService()
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(WebServiceFeature... features)
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, WebServiceFeature... features)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName, WebServiceFeature...
features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port()
+ {
+ return super.getPort(new
QName("http://eprinwsdltestservice.org/wsdl",
"Test1Port"), Test1.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.
Supported features not in the <code>features</code> parameter will have their
default values.
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port(WebServiceFeature... features)
+ {
+ return super.getPort(new
QName("http://eprinwsdltestservice.org/wsdl",
"Test1Port"), Test1.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (EPRINWSDLTESTSERVICE_EXCEPTION != null)
+ {
+ throw EPRINWSDLTESTSERVICE_EXCEPTION;
+ }
+ return EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><handler-chains
xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerSOAPHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxws.jbws3041.service.ServerSOAPHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,76 @@
+/*
+ * 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.jbws3041.service;
+
+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.jbws3041.service 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 _DataType_QNAME = new
QName("http://eprinwsdltestservice.org/xsd", "DataType");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.jbws3041.service
+ *
+ */
+ public ObjectFactory()
+ {
+ }
+
+ /**
+ * Create an instance of {@link DataType }
+ *
+ */
+ public DataType createDataType()
+ {
+ return new DataType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link DataType }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://eprinwsdltestservice.org/xsd", name =
"DataType")
+ public JAXBElement<DataType> createDataType(DataType value)
+ {
+ return new JAXBElement<DataType>(_DataType_QNAME, DataType.class, null,
value);
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,112 @@
+/*
+ * 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.jbws3041.service;
+
+import java.util.List;
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.test.ws.jaxws.common.Handler_Util;
+import org.jboss.test.ws.jaxws.common.JAXWS_Util;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Element;
+
+@SuppressWarnings("unchecked")
+public class ServerSOAPHandler extends GenericSOAPHandler
+{
+
+ public boolean handleInbound(MessageContext context)
+ {
+ SOAPMessage msg = ((SOAPMessageContext) context).getMessage();
+ JAXWS_Util.dumpSOAPMessage(msg, true);
+ JAXWS_Util.dumpSOAPMessage(msg, false);
+
+ if (Handler_Util.checkForMsg(context,
"GetEPRAndVerifyMetaDataAndRefParamsTest1")
+ || Handler_Util.checkForMsg(context,
"GetPortAndVerifyRefParamsAreSentTest1")
+ || Handler_Util.checkForMsg(context,
"GetPortAndVerifyRefParamsAreSentTest2")
+ || Handler_Util.checkForMsg(context,
"GetPortAndVerifyModifiedRefParamsAreSentTest3"))
+ {
+ List<Element> rp = (List<Element>)
context.get(MessageContext.REFERENCE_PARAMETERS);
+ boolean result1 = false;
+ boolean result2 = false;
+ if (Handler_Util.checkForMsg(context,
"GetPortAndVerifyModifiedRefParamsAreSentTest3"))
+ {
+ result1 = assertReferenceParameter(rp, "MyParam1",
"MyValue1");
+ result2 = assertReferenceParameter(rp, "MyParam2",
"MyValue2");
+ }
+ else
+ {
+ result1 = assertReferenceParameter(rp, "MyParam1",
"Hello");
+ result2 = assertReferenceParameter(rp, "MyParam2",
"There");
+ }
+
+ if ((!result1) && (!result2))
+ {
+ throw new RuntimeException(
+ "Reference Parameter MyParam1 and MyParam2 were either not found
or their values were wrong");
+ }
+ else if (!result1)
+ {
+ throw new RuntimeException("Reference Parameter MyParam1 was not found
or it's value was wrong");
+ }
+ else if (!result2)
+ {
+ throw new RuntimeException("Reference Parameter MyParam2 was not found
or it's value was wrong");
+ }
+ }
+
+ return true;
+ }
+
+ private boolean assertReferenceParameter(final List<Element> refParams, final
String paramName,
+ final String expectedValue)
+ {
+ System.out.println("Searching for Reference Parameter '" + paramName
+ "' with value '" + expectedValue + "'");
+
+ for (int i = 0; i < refParams.size(); i++)
+ {
+ final Element paramElement = (Element) refParams.get(i);
+ boolean found = this.assertReferenceParameterValue(paramElement, paramName,
expectedValue);
+ if (found)
+ {
+ System.out.println("Found Reference Parameter '" + paramName +
"' with value '" + expectedValue + "'");
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private boolean assertReferenceParameterValue(final Element paramElement, final String
refParamName,
+ final String expectedValue)
+ {
+ if (!paramElement.getLocalName().equals(refParamName))
+ return false;
+
+ final String actualValue = DOMUtils.getTextContent(paramElement);
+
+ return expectedValue.equals(actualValue);
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,54 @@
+/*
+ * 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.jbws3041.service;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Holder;
+
+/**
+ * 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.2
+ *
+ */
+@WebService(name = "Test1", targetNamespace =
"http://eprinwsdltestservice.org/wsdl")
+@HandlerChain(file = "Test1_handler.xml")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+@XmlSeeAlso(
+{ObjectFactory.class})
+public interface Test1
+{
+
+ /**
+ *
+ * @param data
+ */
+ @WebMethod(operationName = "TestOperation")
+ public void testOperation(
+ @WebParam(name = "DataType", targetNamespace =
"http://eprinwsdltestservice.org/xsd", mode = WebParam.Mode.INOUT, partName =
"data") Holder<DataType> data);
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><handler-chains
xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerSOAPHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxws.jbws3041.service.ServerSOAPHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,40 @@
+/*
+ * 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.jbws3041.service;
+
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.Holder;
+import javax.xml.ws.soap.Addressing;
+import javax.xml.ws.soap.SOAPBinding;
+
+@WebService(portName = "Test1Port", serviceName =
"EPRInWsdlTestService", targetNamespace =
"http://eprinwsdltestservice.org/wsdl", wsdlLocation =
"WEB-INF/wsdl/EPRInWsdlTestService.wsdl", endpointInterface =
"org.jboss.test.ws.jaxws.jbws3041.service.Test1")
+@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
+@Addressing(enabled = true, required = false)
+public class TestImpl1 implements Test1
+{
+
+ public void testOperation(Holder<DataType> data)
+ {
+ System.out.println("Test operation invoked");
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://eprinwsdltestservice.org/xsd", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.jbws3041.service;
+
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws3041</context-root>
+</jboss-web>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
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">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3041.service.TestImpl1</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions
+ name="EPRInWsdlTestService"
+
targetNamespace="http://eprinwsdltestservice.org/wsdl"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:tns="http://eprinwsdltestservice.org/wsdl"
+
xmlns:s="http://eprinwsdltestservice.org/xsd"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://www.w3.org/ns/ws-policy"
+
xmlns:wsa="http://www.w3.org/2005/08/addressing"
+
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+
+ <types>
+ <schema
xmlns="http://www.w3.org/2001/XMLSchema"
+
targetNamespace="http://eprinwsdltestservice.org/xsd"
+
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+ elementFormDefault="qualified">
+
+ <complexType name="DataType">
+ <sequence>
+ <element name="param" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="DataType" type="s:DataType"/>
+ </schema>
+ </types>
+ <message name="Request">
+ <part name="data" element="s:DataType"/>
+ </message>
+ <message name="Response">
+ <part name="data" element="s:DataType"/>
+ </message>
+
+ <portType name="Test1">
+ <operation name="TestOperation">
+ <input message="tns:Request" />
+ <output message="tns:Response" />
+ </operation>
+ </portType>
+
+ <binding name="Test1Binding" type="tns:Test1">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="TestOperation">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="EPRInWsdlTestService">
+ <port name="Test1Port" binding="tns:Test1Binding">
+ <soap:address location="http://foo:9999/bar"/>
+ <wsa:EndpointReference
+
xmlns:wsa="http://www.w3.org/2005/08/addressing"
+
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+
xmlns:tns="http://eprinwsdltestservice.org/wsdl">
+ <
wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
+ <wsa:ReferenceParameters>
+ <myns1:MyParam1
xmlns:myns1="http://eprinwsdltestservice.org/myns1">Hello<...
+ <myns2:MyParam2
xmlns:myns2="http://eprinwsdltestservice.org/myns2">There<...
+ </wsa:ReferenceParameters>
+ <wsa:Metadata>
+ <wsam:ServiceName
EndpointName="Test1Port">tns:EPRInWsdlTestService</wsam:ServiceName>
+ <wsam:InterfaceName>tns:Test1</wsam:InterfaceName>
+ </wsa:Metadata>
+ </wsa:EndpointReference>
+ </port>
+ </service>
+</definitions>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+
+<bindings wsdlLocation="EPRInWsdlTestService.wsdl"
+
xmlns="http://java.sun.com/xml/ns/jaxws"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
+
+ <bindings node="wsdl:definitions"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <package name="org.jboss.test.ws.jaxws.jbws3041"/>
+ </bindings>
+
+ <bindings
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://eprinwsdltestservice.org/xsd']"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <jxb:schemaBindings
xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
+ <jxb:package name="org.jboss.test.ws.jaxws.jbws3041"/>
+ </jxb:schemaBindings>
+ </bindings>
+
+</bindings>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml 2010-05-27
10:19:44 UTC (rev 12353)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+
+<bindings wsdlLocation="EPRInWsdlTestService.wsdl"
+
xmlns="http://java.sun.com/xml/ns/jaxws"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
+
+ <bindings node="wsdl:definitions"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <package name="org.jboss.test.ws.jaxws.jbws3041.service"/>
+ </bindings>
+
+ <bindings
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://eprinwsdltestservice.org/xsd']"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <jxb:schemaBindings
xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
+ <jxb:package
name="org.jboss.test.ws.jaxws.jbws3041.service"/>
+ </jxb:schemaBindings>
+ </bindings>
+
+ <bindings>
+ <handler-chains
xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerSOAPHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxws.jbws3041.service.ServerSOAPHandler</handler-class>
+ </handler>
+ </handler-chain>
+ </handler-chains>
+ </bindings>
+
+</bindings>
+