diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/ant-import/build-samples-jaxws.xml jbossws-samples-1.2.0.GA/ant-import/build-samples-jaxws.xml
--- jbossws-samples-1.2.0.GA.orig/ant-import/build-samples-jaxws.xml	2007-03-02 13:45:46.000000000 +0100
+++ jbossws-samples-1.2.0.GA/ant-import/build-samples-jaxws.xml	2007-03-07 21:07:47.990973900 +0100
@@ -94,6 +94,17 @@
       </metainf>
     </jar>
     
+    <!-- jaxws-samples-jaxb20 -->
+    <jar jarfile="${tests.output.dir}/libs/jaxws-samples-jaxb20.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/jaxb20/**/*.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/resources/jaxws/samples/jaxb20/META-INF">
+        <include name="jboss-wsse-server.xml"/>
+        <include name="wsse.*"/>
+      </metainf>
+    </jar>
+
     <!-- jaxws-samples-jsr181pojo -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-jsr181pojo.war" webxml="${tests.output.dir}/resources/jaxws/samples/jsr181pojo/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AClass.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AClass.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AClass.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AClass.java	2007-03-07 21:00:44.784315900 +0100
@@ -0,0 +1,12 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.a;
+
+public class AClass {
+	int a;
+	
+	public int getA() {
+		return a;
+	}
+	public void setA(int testInt) {
+		this.a = testInt;
+	}
+}
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AException.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AException.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AException.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/AException.java	2007-03-07 21:00:50.691409900 +0100
@@ -0,0 +1,17 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.a;
+
+public class AException extends Exception {
+	int ae;
+	
+	public AException() {
+		super();
+	}
+	public int getAe() {
+		return ae;
+	}
+
+	public void setAe(int parentInt) {
+		this.ae = parentInt;
+	}
+	
+}
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/TestEnumeration.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/TestEnumeration.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/TestEnumeration.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/TestEnumeration.java	2007-03-07 21:00:56.925809900 +0100
@@ -0,0 +1,5 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.a;
+
+public enum TestEnumeration {
+	A,B,C;
+}
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/package-info.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/package-info.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/package-info.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/a/package-info.java	2007-03-07 21:01:55.326551900 +0100
@@ -0,0 +1,3 @@
+@javax.xml.bind.annotation.XmlSchema(
+		namespace = "http://test.org/wsclient/a" )
+package org.jboss.test.ws.jaxws.samples.jaxb20.a;
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BClass.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BClass.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BClass.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BClass.java	2007-03-07 22:11:38.094613900 +0100
@@ -0,0 +1,12 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.b;
+
+public class BClass extends org.jboss.test.ws.jaxws.samples.jaxb20.a.AClass  {
+	String b;
+	
+	public String getB() {
+		return b;
+	}
+	public void setB(String testString) {
+		this.b = testString;
+	}
+}
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BException.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BException.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BException.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/BException.java	2007-03-07 21:01:29.329103900 +0100
@@ -0,0 +1,14 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.b;
+
+import org.jboss.test.ws.jaxws.samples.jaxb20.a.AException;
+
+public class BException extends AException {
+	int be;
+	
+	public int getBe() {
+		return be;
+	}
+	public void setBe(int testInt) {
+		this.be = testInt;
+	}
+}
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/package-info.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/package-info.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/package-info.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/b/package-info.java	2007-03-07 21:01:42.623961900 +0100
@@ -0,0 +1,2 @@
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://test.org/wsclient/b" )
+package org.jboss.test.ws.jaxws.samples.jaxb20.b;
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20StatelessTestBean.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20StatelessTestBean.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20StatelessTestBean.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20StatelessTestBean.java	2007-03-07 22:08:08.805805900 +0100
@@ -0,0 +1,36 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.c;
+
+import java.rmi.RemoteException;
+import javax.xml.ws.Holder;
+
+import org.jboss.test.ws.jaxws.samples.jaxb20.b.BClass;
+import org.jboss.test.ws.jaxws.samples.jaxb20.b.BException;
+
+import org.jboss.test.ws.jaxws.samples.jaxb20.a.AClass;
+import org.jboss.test.ws.jaxws.samples.jaxb20.a.TestEnumeration;
+
+@javax.ejb.Stateless
+@javax.jws.WebService(
+	endpointInterface = "org.jboss.test.ws.jaxws.samples.jaxb20.c.Jaxb20TestWSInterface",
+	targetNamespace = "http://org.jboss.ws/samples/c", 
+	serviceName = "WebServiceTestService",
+	portName = "WebServiceTestPort"
+	)
+@org.jboss.ws.annotation.WebContext(		
+	contextRoot = "/jaxwstest" 
+	, urlPattern="/Jaxb20StatelessTestBean/*"
+	, secureWSDLAccess=false
+	)
+public class Jaxb20StatelessTestBean  implements Jaxb20TestWSInterface {
+	
+	public TestEnumeration testMethod(BClass input) throws BException, RemoteException {
+		System.out.println("Got input: "+input +": a="+input.getA()+", b="+input.getB());
+		if (input.getA()==0) {
+			BException ex = new BException();
+			ex.setAe(11);
+			ex.setBe(13);
+			throw ex;
+		}
+		return TestEnumeration.A;
+	}
+}
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestCase.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestCase.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestCase.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestCase.java	2007-03-07 22:08:23.191683900 +0100
@@ -0,0 +1,58 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.c;
+
+import java.io.File;
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+import org.jboss.test.ws.jaxws.samples.jaxb20.a.*;
+import org.jboss.test.ws.jaxws.samples.jaxb20.b.*;
+
+public class Jaxb20TestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxwstest/Jaxb20StatelessTestBean";
+
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(JSR181WebServiceEJB3TestCase.class, "jaxws-samples-jaxb20.jar");
+   }
+
+   public void testWebService() throws Exception
+   {
+	   URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS);
+	   System.out.println("wsdl URL:"+wsdlURL);
+	   
+	   QName serviceName = new QName("http://org.jboss.ws/samples/c", "WebServiceTestService");
+	   Service service = Service.create(wsdlURL, serviceName);
+	   Jaxb20TestWSInterface port = (Jaxb20TestWSInterface)service.getPort(Jaxb20TestWSInterface.class);
+
+	   BindingProvider bindingProvider = (BindingProvider)port;
+	   Map<String, Object> reqContext = bindingProvider.getRequestContext();
+	   reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, TARGET_ENDPOINT_ADDRESS);
+	   reqContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+	   reqContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+      
+	   TestEnumeration res=null;
+	   BClass input = new BClass();
+	   input.setA(1);
+	   input.setB("hello service");
+		try {
+			res = port.testMethod(input);
+			assertEquals(res, TestEnumeration.A);
+		} catch (BException e) {
+			fail("Caught unexpeced TestException: "+e);
+		} catch (RemoteException e) {
+			fail("Caught unexpeced RemoteException: "+e);
+		} 
+		assertNotNull(res);
+   }
+}
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestWSInterface.java jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestWSInterface.java
--- jbossws-samples-1.2.0.GA.orig/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestWSInterface.java	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/java/org/jboss/test/ws/jaxws/samples/jaxb20/c/Jaxb20TestWSInterface.java	2007-03-07 22:08:43.515827900 +0100
@@ -0,0 +1,28 @@
+package org.jboss.test.ws.jaxws.samples.jaxb20.c;
+
+import java.rmi.RemoteException;
+
+import javax.xml.ws.Holder;
+
+import org.jboss.test.ws.jaxws.samples.jaxb20.b.BClass;
+import org.jboss.test.ws.jaxws.samples.jaxb20.b.BException;
+
+import org.jboss.test.ws.jaxws.samples.jaxb20.a.AClass;
+import org.jboss.test.ws.jaxws.samples.jaxb20.a.TestEnumeration;
+
+@javax.jws.WebService(
+		targetNamespace = "http://org.jboss.ws/samples/c" 
+	)
+@javax.jws.soap.SOAPBinding(
+	style = javax.jws.soap.SOAPBinding.Style.DOCUMENT, 
+	use = javax.jws.soap.SOAPBinding.Use.LITERAL, 
+	parameterStyle = javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED)
+public interface Jaxb20TestWSInterface extends java.rmi.Remote {
+
+	@javax.jws.WebMethod(operationName = "TestMethod")
+    public @javax.jws.WebResult(name="result") TestEnumeration testMethod(
+    		@javax.jws.WebParam(name="input", mode=javax.jws.WebParam.Mode.IN)
+    		BClass input
+    		) throws BException, RemoteException;
+
+}
\ No newline at end of file
diff -uNr --exclude '*~' jbossws-samples-1.2.0.GA.orig/src/main/resources/jaxws/samples/jaxb20/META-INF/wsdl/TestService.wsdl jbossws-samples-1.2.0.GA/src/main/resources/jaxws/samples/jaxb20/META-INF/wsdl/TestService.wsdl
--- jbossws-samples-1.2.0.GA.orig/src/main/resources/jaxws/samples/jaxb20/META-INF/wsdl/TestService.wsdl	1970-01-01 01:00:00.000000000 +0100
+++ jbossws-samples-1.2.0.GA/src/main/resources/jaxws/samples/jaxb20/META-INF/wsdl/TestService.wsdl	2007-03-07 20:30:30.137507000 +0100
@@ -0,0 +1,35 @@
+<!--
+	wsimport -keep -p org.jboss.test.ws.jaxws.samples.bertl META-INF/wsdl/TestService.wsdl
+-->
+<definitions name='TestService' targetNamespace='http://org.jboss.ws/samples/bertl' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/bertl' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types></types>
+ <message name='EndpointInterface_echoResponse'>
+  <part name='result' type='xsd:string'/>
+ </message>
+ <message name='EndpointInterface_echo'>
+  <part name='String_1' type='xsd:string'/>
+ </message>
+ <portType name='EndpointInterface'>
+  <operation name='echo' parameterOrder='String_1'>
+   <input message='tns:EndpointInterface_echo'/>
+   <output message='tns:EndpointInterface_echoResponse'/>
+  </operation>
+ </portType>
+ <binding name='EndpointInterfaceBinding' type='tns:EndpointInterface'>
+  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='echo'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body namespace='http://org.jboss.ws/samples/bertl' use='literal'/>
+   </input>
+   <output>
+    <soap:body namespace='http://org.jboss.ws/samples/bertl' use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ <service name='TestService'>
+  <port binding='tns:EndpointInterfaceBinding' name='EndpointInterfacePort'>
+   <soap:address location='http://@jbosstest.host.name@:8080/jaxws-samples-bertl/EJB3Bean01'/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file
