Author: darran.lofthouse(a)jboss.com
Date: 2008-07-22 14:00:38 -0400 (Tue, 22 Jul 2008)
New Revision: 7886
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/JBWS2234TestCase.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/ObjectFactory.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpoint.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpointImpl.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException_Exception.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestHandler.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/package-info.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/jboss-web.xml
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/web.xml
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/wsdl/
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/wsdl/TestService.wsdl
Modified:
stack/native/branches/dlofthouse/JBWS-2234/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws2234/JBWS2234TestCase.java
Log:
Added JAX-WS test and further JAX-WS fixes.
Modified:
stack/native/branches/dlofthouse/JBWS-2234/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2008-07-22
15:36:18 UTC (rev 7885)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -23,6 +23,7 @@
import javax.xml.soap.MessageFactory;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFault;
@@ -55,6 +56,8 @@
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.w3c.dom.Element;
+import com.ibm.wsdl.extensions.soap12.SOAP12Constants;
+
/**
* Helper methods to translate between SOAPFault and SOAPFaultException
* as well as between Exception and SOAPMessage containing a fault.
@@ -278,6 +281,16 @@
{
MessageFactoryImpl factory = (MessageFactoryImpl)MessageFactory.newInstance();
+ if (isSOAP12() == true)
+ {
+ factory.setEnvNamespace(Constants.NS_SOAP12_ENV);
+ }
+
+ return (SOAPMessageImpl)factory.createMessage();
+ }
+
+ private static boolean isSOAP12()
+ {
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext != null)
{
@@ -285,12 +298,11 @@
String bindingId = emd.getBindingId();
if (SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId) ||
SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bindingId))
{
- factory.setEnvNamespace(Constants.NS_SOAP12_ENV);
+ return true;
}
-
}
- return (SOAPMessageImpl)factory.createMessage();
+ return false;
}
private static Name getFallbackFaultCode()
@@ -298,7 +310,14 @@
/* faultcode
* X. SOAPFaultException.getFault().getFaultCodeAsQName()
* 2. env:Server (Subcode omitted for SOAP 1.2) */
- return new NameImpl(Constants.SOAP11_FAULT_CODE_SERVER);
+ if (isSOAP12() == false)
+ {
+ return new NameImpl(Constants.SOAP11_FAULT_CODE_SERVER);
+ }
+ else
+ {
+ return new NameImpl(SOAPConstants.SOAP_RECEIVER_FAULT);
+ }
}
private static String getFallbackFaultString(Exception ex)
Modified:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2008-07-22
15:36:18 UTC (rev 7885)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2008-07-22
18:00:38 UTC (rev 7886)
@@ -339,6 +339,18 @@
</metainf>
</jar>
+ <!-- jaxws-jbws2234 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2234.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2234/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2234/*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws2234/JBWS2234TestCase.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws2234/WEB-INF">
+ <include name="jboss-web.xml"/>
+ <include name="wsdl/*"/>
+ </webinf>
+ </war>
+
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war"
webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws2234/JBWS2234TestCase.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws2234/JBWS2234TestCase.java 2008-07-22
15:36:18 UTC (rev 7885)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws2234/JBWS2234TestCase.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -31,8 +31,11 @@
import org.jboss.wsf.test.JBossWSTestSetup;
/**
+ * [JBWS-2234] SOAP 1.2 Endpoint sends SOAP 1.1 messages
+ *
* @author darran.lofthouse(a)jboss.com
* @since June 21, 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-2234
*/
public class JBWS2234TestCase extends JBossWSTest
{
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/JBWS2234TestCase.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/JBWS2234TestCase.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/JBWS2234TestCase.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.jbws2234;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2234] SOAP 1.2 Endpoint sends SOAP 1.1 messages
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since June 21, 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-2234
+ */
+public class JBWS2234TestCase extends JBossWSTest
+{
+
+ private static TestEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2234TestCase.class,
"jaxws-jbws2234.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2234?wsdl");
+ QName serviceName = new QName("http://org.jboss.test.ws/jbws2234",
"TestService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(TestEndpoint.class);
+
+ BindingProvider bindingProvider = (BindingProvider)port;
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.add(new TestHandler());
+ bindingProvider.getBinding().setHandlerChain(handlerChain);
+ }
+
+ public void testCall() throws Exception
+ {
+ final String message = "Hello!!";
+ String response = port.echo(message);
+
+ assertEquals(message, response);
+ }
+
+ public void testCheckedException() throws Exception
+ {
+ try
+ {
+ port.echo(TestEndpointImpl.TEST_EXCEPTION);
+ fail("Excpected TestException not thrown.");
+ }
+ catch (TestException_Exception te)
+ {
+ }
+ }
+
+ public void testRuntimeException()
+ {
+ try
+ {
+ port.echo(TestEndpointImpl.RUNTIME_EXCEPTION);
+ fail("Excpected Exception not thrown.");
+ }
+ catch (Exception e)
+ {
+ assertEquals("Simulated failure", e.getMessage());
+ }
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/JBWS2234TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/ObjectFactory.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/ObjectFactory.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/ObjectFactory.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.jbws2234;
+
+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.jbws2234 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 _TestException_QNAME = new
QName("http://org.jboss.test.ws/jbws2234/types", "TestException");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.jbws2234
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link TestException }
+ *
+ */
+ public TestException createTestException() {
+ return new TestException();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestException }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://org.jboss.test.ws/jbws2234/types", name
= "TestException")
+ public JAXBElement<TestException> createTestException(TestException value) {
+ return new JAXBElement<TestException>(_TestException_QNAME,
TestException.class, null, value);
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpoint.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpoint.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpoint.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.jbws2234;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.BindingType;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "TestEndpoint", targetNamespace =
"http://org.jboss.test.ws/jbws2234")
+@BindingType("http://www.w3.org/2003/05/soap/bindings/HTTP/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TestEndpoint {
+
+
+ /**
+ *
+ * @param string1
+ * @return
+ * returns java.lang.String
+ * @throws TestException_Exception
+ */
+ @WebMethod
+ @WebResult(name = "result", partName = "result")
+ public String echo(
+ @WebParam(name = "String_1", partName = "String_1")
+ String string1)
+ throws TestException_Exception
+ ;
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpointImpl.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpointImpl.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpointImpl.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.jbws2234;
+
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+
+/**
+ * Test Endpoint implementation.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since July 22, 2008
+ */
+@WebService(name = "TestEndpoint", portName="TestEndpointPort",
targetNamespace = "http://org.jboss.test.ws/jbws2234", endpointInterface =
"org.jboss.test.ws.jaxws.jbws2234.TestEndpoint",
wsdlLocation="WEB-INF/wsdl/TestService.wsdl")
+@BindingType("http://www.w3.org/2003/05/soap/bindings/HTTP/")
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public static final String TEST_EXCEPTION = "TestException";
+
+ public static final String RUNTIME_EXCEPTION = "RuntimeException";
+
+ public String echo(String message) throws TestException_Exception
+ {
+ if (TEST_EXCEPTION.equals(message))
+ {
+ TestException te = new TestException();
+ throw new TestException_Exception(message, te);
+ }
+ else if (RUNTIME_EXCEPTION.equals(message))
+ {
+ throw new RuntimeException("Simulated failure");
+ }
+ return message;
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.jbws2234;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for TestException complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="TestException">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TestException")
+public class TestException {
+
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException_Exception.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException_Exception.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException_Exception.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.jbws2234;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.0
+ *
+ */
+@WebFault(name = "TestException", targetNamespace =
"http://org.jboss.test.ws/jbws2234/types")
+public class TestException_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private TestException faultInfo;
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ */
+ public TestException_Exception(String message, TestException faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ * @param cause
+ */
+ public TestException_Exception(String message, TestException faultInfo, Throwable
cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean: org.jboss.test.ws.jaxws.jbws2234.TestException
+ */
+ public TestException getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestException_Exception.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestHandler.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestHandler.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestHandler.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.jbws2234;
+
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since June 21, 2008
+ */
+public class TestHandler implements Handler
+{
+
+ private static final String SOAP_1_2 =
"http://www.w3.org/2003/05/soap-envelope";
+
+ public void close(MessageContext context)
+ {
+ }
+
+ public boolean handleFault(MessageContext context)
+ {
+ return handleMessage(context);
+ }
+
+ public boolean handleMessage(MessageContext context)
+ {
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)context).getMessage();
+ SOAPPart part = soapMessage.getSOAPPart();
+ SOAPEnvelope envelope = part.getEnvelope();
+
+ String namespace = envelope.getNamespaceURI();
+ if (SOAP_1_2.equals(namespace) == false)
+ {
+ throw new RuntimeException("Expected '" + SOAP_1_2 +
"' namespace, actual '" + namespace + "'");
+ }
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException(e);
+ }
+ return true;
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/TestHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/package-info.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/package-info.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/package-info.java 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://org.jboss.test.ws/jbws2234/types")
+package org.jboss.test.ws.jaxws.jbws2234;
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2234/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/jboss-web.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/jboss-web.xml
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/jboss-web.xml 2008-07-22
18:00:38 UTC (rev 7886)
@@ -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-jbws2234</context-root>
+</jboss-web>
\ No newline at end of file
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/web.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/web.xml
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/web.xml 2008-07-22
18:00:38 UTC (rev 7886)
@@ -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>TestEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2234.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/wsdl/TestService.wsdl
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/wsdl/TestService.wsdl
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/wsdl/TestService.wsdl 2008-07-22
18:00:38 UTC (rev 7886)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService'
targetNamespace='http://org.jboss.test.ws/jbws2234'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:ns1='http://org.jboss.test.ws/jbws2234/types'
xmlns:soap12='http://schemas.xmlsoap.org/wsdl/soap12/'
xmlns:tns='http://org.jboss.test.ws/jbws2234'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://org.jboss.test.ws/jbws2234/types'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://org.jboss.test.ws/jbws2234/types'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <complexType name='TestException'>
+ <sequence/>
+ </complexType>
+ <element name='TestException' type='tns:TestException'/>
+ </schema>
+ </types>
+ <message name='TestEndpoint_echo'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <message name='TestException'>
+ <part element='ns1:TestException' name='TestException'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echo' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echo'/>
+ <output message='tns:TestEndpoint_echoResponse'/>
+ <fault message='tns:TestException' name='TestException'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap12:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echo'>
+ <soap12:operation soapAction=''/>
+ <input>
+ <soap12:body namespace='http://org.jboss.test.ws/jbws2234'
use='literal'/>
+ </input>
+ <output>
+ <soap12:body namespace='http://org.jboss.test.ws/jbws2234'
use='literal'/>
+ </output>
+ <fault name='TestException'>
+ <soap12:fault name='TestException' use='literal'/>
+ </fault>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap12:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
stack/native/branches/dlofthouse/JBWS-2234/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2234/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF