[jbossws-commits] JBossWS SVN: r8417 - in stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276: src/main/java/org/jboss/ws/core/binding and 8 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Oct 9 11:14:50 EDT 2008


Author: darran.lofthouse at jboss.com
Date: 2008-10-09 11:14:50 -0400 (Thu, 09 Oct 2008)
New Revision: 8417

Added:
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml
Removed:
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml
Modified:
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-jars-jaxws.xml
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-testsuite.xml
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
   stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/resources/jbossws-native-config.xml
Log:
[JBPAPP-1276] JAXBIntros are not taken into consideration when generating the WSDL.

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-jars-jaxws.xml	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-jars-jaxws.xml	2008-10-09 15:14:50 UTC (rev 8417)
@@ -395,6 +395,16 @@
       </metainf>
     </jar>
     
+    <!-- jaxws-jbws1809 -->
+    <jar destfile="${tests.output.dir}/libs/jaxws-jbws1809.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/jbws1809/*.class"/>
+        <exclude name="org/jboss/test/ws/jaxws/jbws1809/*TestCase.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/resources/jaxws/jbws1809/META-INF"/>
+    </jar>
+
+
     <!-- jaxws namespace -->
     <war warfile="${tests.output.dir}/libs/jaxws-namespace.war" webxml="${tests.output.dir}/resources/jaxws/namespace/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-testsuite.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-testsuite.xml	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/ant-import-tests/build-testsuite.xml	2008-10-09 15:14:50 UTC (rev 8417)
@@ -178,7 +178,7 @@
 			<classpath location="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy"/>
 		</taskdef>
 
-		<wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurity" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean"/>
+		<wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurity" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean" verbose="true"/>
 		<wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurityAnnotatedpolicy" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy.HelloJavaBean"/>
 	</target>
 

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -21,8 +21,11 @@
  */
 package org.jboss.ws.core.binding;
 
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.soap.MessageContextAssociation;
 
-
 // $Id$
 
 /**
@@ -34,4 +37,14 @@
 public abstract class ComplexTypeDeserializer extends DeserializerSupport
 {
 
+   protected BindingCustomization getBindingCustomization()
+   {
+      BindingCustomization bindingCustomization = null;
+      EndpointMetaData epMetaData = MessageContextAssociation.peekMessageContext().getEndpointMetaData();
+      if(epMetaData instanceof ServerEndpointMetaData)
+      {
+         bindingCustomization = ((ServerEndpointMetaData)epMetaData).getEndpoint().getAttachment(BindingCustomization.class);
+      }
+      return bindingCustomization;
+   }
 }

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -21,9 +21,11 @@
  */
 package org.jboss.ws.core.binding;
 
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.soap.MessageContextAssociation;
 
-
-
 // $Id: ComplexTypeSerializer.java 1757 2006-12-22 15:40:24Z thomas.diesler at jboss.com $
 
 /**
@@ -34,5 +36,14 @@
  */
 public abstract class ComplexTypeSerializer extends SerializerSupport
 {
-
+   protected BindingCustomization getBindingCustomization()
+   {
+      BindingCustomization bindingCustomization = null;
+      EndpointMetaData epMetaData = MessageContextAssociation.peekMessageContext().getEndpointMetaData();
+      if(epMetaData instanceof ServerEndpointMetaData)
+      {
+         bindingCustomization = ((ServerEndpointMetaData)epMetaData).getEndpoint().getAttachment(BindingCustomization.class);
+      }
+      return bindingCustomization;
+   }
 }

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -21,18 +21,25 @@
  */
 package org.jboss.ws.core.jaxws;
 
+import com.sun.xml.bind.api.JAXBRIContext;
+import com.sun.xml.bind.api.TypeReference;
+import com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader;
+import org.jboss.logging.Logger;
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointAssociation;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
-import java.util.Iterator;
+import java.util.Collection;
 
 /**
  * The default factory checks if a {@link JAXBBindingCustomization} exists
  * and uses it to customize the JAXBContext that will be created.
+ * <p>
+ * It uses the {@link org.jboss.wsf.spi.invocation.EndpointAssociation} to access customizations
+ * if they are not passed explicitly.
  *
  * @see org.jboss.wsf.spi.deployment.Endpoint
  * @see org.jboss.wsf.spi.binding.BindingCustomization
@@ -46,45 +53,68 @@
  */
 public class CustomizableJAXBContextFactory extends JAXBContextFactory
 {
+   protected Logger log = Logger.getLogger(CustomizableJAXBContextFactory.class);
+
+   public JAXBContext createContext(Class clazz) throws WSException
+   {
+      return createContext(new Class[] {clazz});
+   }
+
    public JAXBContext createContext(Class[] clazzes) throws WSException
    {
       try
       {
          BindingCustomization customization = getCustomization();
+
+         JAXBContext jaxbCtx;         
          if(null == customization)
-            return JAXBContext.newInstance(clazzes);
+            jaxbCtx = JAXBContext.newInstance(clazzes);
          else
-            return JAXBContext.newInstance(clazzes, customization);
+            jaxbCtx = createContext(clazzes, customization);
+
+         return jaxbCtx;
       }
       catch (JAXBException e) {
          throw new WSException("Failed to create JAXBContext", e);
       }
    }
 
-   public JAXBContext createContext(Class clazz) throws WSException
+   public JAXBContext createContext(Class[] clazzes, BindingCustomization bindingCustomization) throws WSException
    {
-      return createContext(new Class[] {clazz});
+      try
+      {
+         return JAXBContext.newInstance(clazzes, bindingCustomization);
+      }
+      catch (JAXBException e) {
+         throw new WSException("Failed to create JAXBContext", e);
+      }
    }
 
-   private BindingCustomization getCustomization()
+   public JAXBRIContext createContext(
+     Class[] classes, Collection<TypeReference> typeReferences,
+     String defaultNamespaceRemap, boolean c14nSupport, BindingCustomization bindingCustomization)
    {
-      BindingCustomization customization = null;
+      try
+      {
+         RuntimeAnnotationReader runtimeAnnotations = bindingCustomization!=null ?
+           (RuntimeAnnotationReader)bindingCustomization.get(JAXBRIContext.ANNOTATION_READER) : null;
 
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      if(msgContext!=null) // may not be available anytime
-      {
-         Iterator<BindingCustomization> it = msgContext.getEndpointMetaData().getBindingCustomizations().iterator();
-         while(it.hasNext())
-         {
-            BindingCustomization current = it.next();
-            if(current instanceof JAXBBindingCustomization)
-            {
-               customization = current;
-               break;
-            }
-         }
+         return JAXBRIContext.newInstance(
+           classes, typeReferences,
+           null,
+           defaultNamespaceRemap, c14nSupport ,
+           runtimeAnnotations
+         );
+
       }
+      catch (JAXBException e) {
+         throw new WSException("Failed to create JAXBContext", e);
+      }
+   }
 
-      return customization;
+   private BindingCustomization getCustomization()
+   {
+      Endpoint threadLocal = EndpointAssociation.getEndpoint();
+      return threadLocal!=null ? threadLocal.getAttachment(BindingCustomization.class):null;      
    }
 }

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -23,9 +23,15 @@
 
 import org.jboss.ws.WSException;
 import org.jboss.wsf.spi.util.ServiceLoader;
+import org.jboss.wsf.spi.binding.BindingCustomization;
 
 import javax.xml.bind.JAXBContext;
 
+import com.sun.xml.bind.api.TypeReference;
+import com.sun.xml.bind.api.JAXBRIContext;
+
+import java.util.Collection;
+
 /**
  * Creates JAXBContext's.<p>
  *
@@ -36,10 +42,16 @@
 
    public final static String DEFAULT_JAXB_CONTEXT_FACTORY = "org.jboss.ws.core.jaxws.CustomizableJAXBContextFactory";
 
+   public abstract JAXBContext createContext(Class[] clazzes, BindingCustomization bindingCustomization) throws WSException;
+
    public abstract JAXBContext createContext(Class[] clazzes) throws WSException;
 
    public abstract JAXBContext createContext(Class clazz) throws WSException;
 
+   public abstract JAXBRIContext createContext(
+     Class[] classes, Collection<TypeReference> typeReferences,
+     String defaultNamespaceRemap, boolean c14nSupport, BindingCustomization bindingCustomization);
+
    /**
     * Retrieve JAXBContextFactory instance through the {@link org.jboss.wsf.spi.util.ServiceLoader}.
     * Defaults to {@link CustomizableJAXBContextFactory}

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -28,7 +28,12 @@
 import org.jboss.ws.core.binding.TypeMappingImpl;
 import org.jboss.ws.core.binding.ComplexTypeDeserializer;
 import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
 import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.binding.BindingCustomization;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
@@ -88,11 +93,13 @@
     * @return JAXBContext
     */
    private JAXBContext getJAXBContext(Class[] types){
+
       JAXBContextCache cache = JAXBContextCache.getContextCache();
       JAXBContext context = cache.get(types);
       if(null==context)
       {
-         context = JAXBContextFactory.newInstance().createContext(types);
+         BindingCustomization bindingCustomization = getBindingCustomization();
+         context = JAXBContextFactory.newInstance().createContext(types, bindingCustomization);
          cache.add(types, context);
       }
       return context;

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -29,6 +29,7 @@
 import org.jboss.ws.core.binding.ComplexTypeSerializer;
 import org.jboss.ws.core.binding.SerializationContext;
 import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.wsf.spi.binding.BindingCustomization;
 import org.w3c.dom.NamedNodeMap;
 
 import javax.xml.bind.JAXBContext;
@@ -99,7 +100,8 @@
       JAXBContext context = cache.get(types);
       if(null==context)
       {
-         context = JAXBContextFactory.newInstance().createContext(types);
+         BindingCustomization bindingCustomization = getBindingCustomization();
+         context = JAXBContextFactory.newInstance().createContext(types, bindingCustomization);
          cache.add(types, context);
       }
       return context;

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -23,42 +23,13 @@
 
 // $Id$
 
-import java.io.File;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import javax.jws.HandlerChain;
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPMessageHandlers;
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.ws.BindingType;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-import javax.xml.ws.WebFault;
-import javax.xml.ws.addressing.Action;
-import javax.xml.ws.addressing.AddressingProperties;
-
+import com.sun.xml.bind.api.JAXBRIContext;
+import com.sun.xml.bind.api.TypeReference;
 import org.jboss.logging.Logger;
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
 import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
+import org.jboss.ws.core.jaxws.JAXBContextFactory;
 import org.jboss.ws.core.jaxws.WrapperGenerator;
 import org.jboss.ws.core.soap.Style;
 import org.jboss.ws.core.soap.Use;
@@ -75,6 +46,7 @@
 import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
 import org.jboss.ws.metadata.umdm.OperationMetaData;
 import org.jboss.ws.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
 import org.jboss.ws.metadata.umdm.TypeMappingMetaData;
 import org.jboss.ws.metadata.umdm.TypesMetaData;
 import org.jboss.ws.metadata.umdm.WrappedParameter;
@@ -83,18 +55,47 @@
 import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
 import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
 import org.jboss.ws.metadata.wsdl.WSDLMIMEPart;
+import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.spi.binding.BindingCustomization;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.HandlerChainsObjectFactory;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.xb.binding.ObjectModelFactory;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;
 
-import com.sun.xml.bind.api.JAXBRIContext;
-import com.sun.xml.bind.api.TypeReference;
+import javax.jws.HandlerChain;
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.jws.soap.SOAPMessageHandlers;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+import javax.xml.ws.WebFault;
+import javax.xml.ws.addressing.Action;
+import javax.xml.ws.addressing.AddressingProperties;
+import java.io.File;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Abstract class that represents a JAX-WS metadata builder.
@@ -918,9 +919,27 @@
          String targetNS = epMetaData.getPortTypeName().getNamespaceURI().intern();
          if (log.isDebugEnabled())
             log.debug("JAXBContext [types=" + javaTypes + ",tns=" + targetNS + "]");
-         jaxbCtx = JAXBRIContext.newInstance(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false);
+
+         JAXBContextFactory factory = JAXBContextFactory.newInstance();
+
+
+         // JAXBIntros may mofiy the WSDL being generated
+         // only true for server side invocation, tooling (WSProvide) doesnt support this
+         BindingCustomization bindingCustomization = null;
+         if(epMetaData instanceof ServerEndpointMetaData)
+         {
+            Endpoint endpoint = ((ServerEndpointMetaData)epMetaData).getEndpoint();
+            bindingCustomization = endpoint!=null ? endpoint.getAttachment(BindingCustomization.class) : null;
+         }
+
+         jaxbCtx = factory.createContext(
+           javaTypes.toArray(new Class[0]),
+           typeRefs,
+           targetNS,
+           false, bindingCustomization
+         );
       }
-      catch (JAXBException ex)
+      catch (WSException ex)
       {
          throw new IllegalStateException("Cannot build JAXB context", ex);
       }

Modified: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/resources/jbossws-native-config.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/resources/jbossws-native-config.xml	2008-10-09 15:12:03 UTC (rev 8416)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/main/resources/jbossws-native-config.xml	2008-10-09 15:14:50 UTC (rev 8417)
@@ -61,7 +61,7 @@
   </bean>
   
   <bean name="WSNativePublishContractDeploymentAspect" class="org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect">
-    <property name="requires">UnifiedMetaDataModel</property>
+    <property name="requires">UnifiedMetaDataModel, JAXBIntros</property>
     <property name="provides">PublishedContract</property>
   </bean>
   
@@ -70,12 +70,12 @@
   </bean>
   
   <bean name="WSNativeUnifiedMetaDataDeploymentAspect" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
-    <property name="requires">RuntimeLoader, ContainerMetaData, URLPattern, VFSRoot</property>
+    <property name="requires">RuntimeLoader, ContainerMetaData, URLPattern, VFSRoot, JAXBIntros</property>
     <property name="provides">UnifiedMetaDataModel</property>
   </bean>
 
-  <bean name="WSJAXBIntroDeploymentAspect" class="org.jboss.wsf.stack.jbws.JAXBIntroDeploymentAspect">
-    <property name="requires">UnifiedMetaDataModel, RuntimeLoader</property>
+  <bean name="WSJAXBIntroDeploymentAspect" class="org.jboss.wsf.stack.jbws.JAXBIntroDeploymentAspect">    
+    <property name="provides">JAXBIntros</property>
   </bean>
 
       <!-- Deployment aspect installers -->

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809 (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809)

Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java	2008-05-09 20:59:29 UTC (rev 6995)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.jbws1809;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
-public class DocRequest
-{
-   String value;
-
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-}

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java	                        (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.jbws1809;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class DocRequest
+{
+   String value;
+
+   public String getValue()
+   {
+      return value;
+   }
+
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+}

Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java	2008-05-09 20:59:29 UTC (rev 6995)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.jbws1809;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
-public class DocResponse
-{
-   String value;
-
-
-   public String getValue()
-   {
-      return value;
-   }
-
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-}

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java	                        (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.jbws1809;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class DocResponse
+{
+   String value;
+
+
+   public String getValue()
+   {
+      return value;
+   }
+
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+}

Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java	2008-05-09 20:59:29 UTC (rev 6995)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.jbws1809;
-
-import javax.ejb.Remote;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
- at Remote
- at WebService(targetNamespace = "http://org.jboss.ws/jaxbintro/wsdl")
- at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
-public interface Endpoint
-{
-   DocResponse processDocument(DocRequest req);
-}

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java	                        (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.jbws1809;
+
+import javax.ejb.Remote;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+ at Remote
+ at WebService(targetNamespace = "http://org.jboss.ws/jaxbintro/wsdl")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface Endpoint
+{
+   DocResponse processDocument(DocRequest req);
+}

Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java	2008-05-09 20:59:29 UTC (rev 6995)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.jbws1809;
-
-import javax.ejb.Stateless;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
- at Stateless
- at WebService(
-  targetNamespace = "http://org.jboss.ws/jaxbintro/wsdl",
-  endpointInterface = "org.jboss.test.ws.jaxws.jbws1809.Endpoint"
-)
- at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
-public class EndpointImpl implements Endpoint
-{
-   public DocResponse processDocument(DocRequest req)
-   {
-      DocResponse res = new DocResponse();
-      res.setValue(req.getValue()+"Response");
-      return res;  
-   }
-}

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java	                        (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.jbws1809;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+ at Stateless
+ at WebService(
+  targetNamespace = "http://org.jboss.ws/jaxbintro/wsdl",
+  endpointInterface = "org.jboss.test.ws.jaxws.jbws1809.Endpoint"
+)
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public class EndpointImpl implements Endpoint
+{
+   public DocResponse processDocument(DocRequest req)
+   {
+      DocResponse res = new DocResponse();
+      res.setValue(req.getValue()+"Response");
+      return res;  
+   }
+}

Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java	2008-05-09 20:59:29 UTC (rev 6995)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -1,92 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.jbws1809;
-
-import junit.framework.Test;
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.metadata.wsdl.DOMTypes;
-import org.jboss.ws.metadata.wsdl.XSModelTypes;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.Iterator;
-
-/**
- * Test the JAXBIntroduction features.
- *
- * Check if the WSDL is generated correctly.
- * The introduction should turn a property into a xsd:attribute declaration.
- *
- * @author heiko.braun at jboss.com
- */
-public class JBWS1809TestCase extends JBossWSTest
-{
-   public static Test suite()
-   {
-      return new JBossWSTestSetup(JBWS1809TestCase.class, "jaxws-jbws1809.jar");
-   }
-
-   public void testWSDLAccess() throws Exception
-   {
-      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1809/EndpointImpl?wsdl");
-      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
-      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
-      assertNotNull("Unable to read WSDL definitions", wsdlDefinitions);
-
-      XSModelTypes wsdlTypes = (XSModelTypes)wsdlDefinitions.getWsdlTypes();
-
-      // convert XSModelTypes to dom representation
-      // it's easier to consume...
-
-      Element types = DOMUtils.parse(wsdlTypes.getSchemaModel().serialize());            
-      Iterator it = DOMUtils.getChildElements(types, "complexType");
-
-      boolean foundAttributeDeclaration = false;
-      while(it.hasNext())
-      {
-         Element next = (Element)it.next();
-         if(DOMUtils.getAttributeValue(next, "name").equals("docRequest"))
-         {
-            Iterator it2 = DOMUtils.getChildElements(next, "attribute");
-
-            while(it2.hasNext())
-            {
-               Element next2 = (Element)it2.next();
-               if(DOMUtils.getAttributeValue(next2, "name").equals("value"))
-               {
-                  foundAttributeDeclaration = true;
-               }
-            }
-         }
-      }
-
-      assertTrue("JAXBIntros should turn the 'docRequest.name' property into a XML attribute", foundAttributeDeclaration);
-
-   }
-}

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java	                        (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java	2008-10-09 15:14:50 UTC (rev 8417)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.jbws1809;
+
+import junit.framework.Test;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.metadata.wsdl.DOMTypes;
+import org.jboss.ws.metadata.wsdl.XSModelTypes;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.util.Iterator;
+
+/**
+ * Test the JAXBIntroduction features.
+ *
+ * Check if the WSDL is generated correctly.
+ * The introduction should turn a property into a xsd:attribute declaration.
+ *
+ * @author heiko.braun at jboss.com
+ */
+public class JBWS1809TestCase extends JBossWSTest
+{
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(JBWS1809TestCase.class, "jaxws-jbws1809.jar");
+   }
+
+   public void testWSDLAccess() throws Exception
+   {
+      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1809/EndpointImpl?wsdl");
+      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+      assertNotNull("Unable to read WSDL definitions", wsdlDefinitions);
+
+      XSModelTypes wsdlTypes = (XSModelTypes)wsdlDefinitions.getWsdlTypes();
+
+      // convert XSModelTypes to dom representation
+      // it's easier to consume...
+
+      Element types = DOMUtils.parse(wsdlTypes.getSchemaModel().serialize());            
+      Iterator it = DOMUtils.getChildElements(types, "complexType");
+
+      boolean foundAttributeDeclaration = false;
+      while(it.hasNext())
+      {
+         Element next = (Element)it.next();
+         if(DOMUtils.getAttributeValue(next, "name").equals("docRequest"))
+         {
+            Iterator it2 = DOMUtils.getChildElements(next, "attribute");
+
+            while(it2.hasNext())
+            {
+               Element next2 = (Element)it2.next();
+               if(DOMUtils.getAttributeValue(next2, "name").equals("value"))
+               {
+                  foundAttributeDeclaration = true;
+               }
+            }
+         }
+      }
+
+      assertTrue("JAXBIntros should turn the 'docRequest.name' property into a XML attribute", foundAttributeDeclaration);
+
+   }
+}

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809 (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1809)

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1809/META-INF)

Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml	2008-05-09 20:59:29 UTC (rev 6995)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml	2008-10-09 15:14:50 UTC (rev 8417)
@@ -1,26 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros" default-namespace="http://org.jboss.ws/jaxbintro/wsdl">
-
-  <!--
-  The XSD for the schema can be found at:
-  http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/extras/jaxbintros/src/main/resources/jaxb-intros.xsd
-  Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
-  -->
-
-  <!--
-  Note: how the "name" attributes on class, field and method configs can be regular expressions.
-  -->
-
-  <!--
-  The type namespaces on the customerOrder are different from the rest of the message...
-  -->
-  <Class name="org.jboss.test.ws.jaxws.jbws1809.DocRequest">
-    <XmlAccessorType value="FIELD"/>   
-    <XmlRootElement name="request" namespace="http://org.jboss.ws/jaxbintro/wsdl"/>
-
-    <Field name="value">
-      <XmlAttribute />
-    </Field>    
-  </Class>
-
-</jaxb-intros>

Copied: stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml (from rev 6995, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml	                        (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-1276/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml	2008-10-09 15:14:50 UTC (rev 8417)
@@ -0,0 +1,26 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros" default-namespace="http://org.jboss.ws/jaxbintro/wsdl">
+
+  <!--
+  The XSD for the schema can be found at:
+  http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/extras/jaxbintros/src/main/resources/jaxb-intros.xsd
+  Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
+  -->
+
+  <!--
+  Note: how the "name" attributes on class, field and method configs can be regular expressions.
+  -->
+
+  <!--
+  The type namespaces on the customerOrder are different from the rest of the message...
+  -->
+  <Class name="org.jboss.test.ws.jaxws.jbws1809.DocRequest">
+    <XmlAccessorType value="FIELD"/>   
+    <XmlRootElement name="request" namespace="http://org.jboss.ws/jaxbintro/wsdl"/>
+
+    <Field name="value">
+      <XmlAttribute />
+    </Field>    
+  </Class>
+
+</jaxb-intros>




More information about the jbossws-commits mailing list