[jbossws-commits] JBossWS SVN: r10840 - in stack/cxf/trunk/modules: client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration and 8 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue Oct 6 13:53:59 EDT 2009


Author: alessio.soldano at jboss.com
Date: 2009-10-06 13:53:59 -0400 (Tue, 06 Oct 2009)
New Revision: 10840

Added:
   stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/
   stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java
   stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserEndpoint.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserType.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/Endpoint.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/EndpointBean.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/UserType.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jaxbintros/
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jaxbintros/META-INF/
   stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml
Removed:
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSBeanConfigurer.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/binding/
Modified:
   stack/cxf/trunk/modules/server/pom.xml
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java
   stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-2714] More work on jaxb intro configuration in cxf + testcase


Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java	                        (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.configuration;
+
+import com.sun.xml.bind.api.JAXBRIContext;
+
+public class JAXBBindingCustomization extends org.jboss.wsf.spi.binding.JAXBBindingCustomization
+{
+   private static final long serialVersionUID = -5922902727331798457L;
+
+   // Use an alternative RuntimeAnnotationReader implementation
+   public final static String ANNOTATION_READER = JAXBRIContext.ANNOTATION_READER;
+
+   // Reassign the default namespace URI to something else at the runtime
+   public final static String DEFAULT_NAMESPACE_REMAP = JAXBRIContext.DEFAULT_NAMESPACE_REMAP;
+
+   // Enable the c14n marshalling support in the JAXBContext.
+   public final static String CANONICALIZATION_SUPPORT = JAXBRIContext.CANONICALIZATION_SUPPORT;
+}


Property changes on: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JAXBBindingCustomization.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java	                        (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,136 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.configuration;
+
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.jaxb.JAXBDataBinding;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
+
+/**
+ * A CXF configurer that sets JBossWS stuff / customizations / properties etc. in CXF configurable beans
+ *
+ * @author alessio.soldano at jboss.com
+ * @since 05-Oct-2009
+ */
+public class JBossWSCXFConfigurer implements Configurer
+{
+   private BindingCustomization customization;
+   private Configurer delegate;
+
+   public JBossWSCXFConfigurer(Configurer delegate)
+   {
+      this.delegate = delegate;
+   }
+   
+   public void setBindingCustomization(BindingCustomization customization)
+   {
+      this.customization = customization;
+   }
+   
+   public void configureBean(Object beanInstance)
+   {
+      if (beanInstance instanceof AbstractWSDLBasedEndpointFactory)
+      {
+         configureEndpointFactory((AbstractWSDLBasedEndpointFactory)beanInstance);
+      }
+      else if (beanInstance instanceof ClientProxyFactoryBean)
+      {
+         configureClientProxyFactoryBean((ClientProxyFactoryBean)beanInstance);
+      }
+      //add other beans configuration here below
+      if (delegate != null)
+      {
+         delegate.configureBean(beanInstance);
+      }
+   }
+
+   public void configureBean(String name, Object beanInstance)
+   {
+      if (beanInstance instanceof AbstractWSDLBasedEndpointFactory)
+      {
+         configureEndpointFactory((AbstractWSDLBasedEndpointFactory)beanInstance);
+      }
+      else if (beanInstance instanceof ClientProxyFactoryBean)
+      {
+         configureClientProxyFactoryBean((ClientProxyFactoryBean)beanInstance);
+      }
+      //add other beans configuration here below
+      if (delegate != null)
+      {
+         delegate.configureBean(name, beanInstance);
+      }
+   }
+   
+   /**
+    * Configure the endpoint factory; currently set the binding customization in the databinding (Server Side).
+    * 
+    * @param factory
+    */
+   protected synchronized void configureEndpointFactory(AbstractWSDLBasedEndpointFactory factory)
+   {
+      //Configure binding customization
+      if (customization != null)
+      {
+         //customize default databinding (early pulls in ServiceFactory default databinding and configure it, as it's lazily loaded)
+         setBindingCustomization(factory.getServiceFactory().getDataBinding(), customization);
+         //customize user provided databinding (CXF later overrides the ServiceFactory databinding using the user provided one) 
+         setBindingCustomization(factory.getDataBinding(), customization);
+      }
+      //add other configurations here below
+   }
+   
+   /**
+    * Configure the client proxy factory; currently set the binding customization in the databinding (Client Side).
+    * 
+    * @param factory
+    */
+   protected synchronized void configureClientProxyFactoryBean(ClientProxyFactoryBean factory)
+   {
+      //Configure binding customization
+      if (customization != null)
+      {
+         //customize default databinding (early pulls in ServiceFactory default databinding and configure it, as it's lazily loaded)
+         setBindingCustomization(factory.getServiceFactory().getDataBinding(), customization);
+         //customize user provided databinding (CXF later overrides the ServiceFactory databinding using the user provided one) 
+         setBindingCustomization(factory.getDataBinding(), customization);
+      }
+      //add other configurations here below
+   }
+   
+   protected static void setBindingCustomization(DataBinding db, BindingCustomization customization)
+   {
+      //JAXB
+      if (customization instanceof JAXBBindingCustomization)
+      {
+         if (db != null && db instanceof JAXBDataBinding)
+         {
+            ((JAXBDataBinding)db).setContextProperties(customization);
+         }
+      }
+      //add other binding customizations here below
+   }
+}


Property changes on: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml	2009-10-06 13:01:31 UTC (rev 10839)
+++ stack/cxf/trunk/modules/server/pom.xml	2009-10-06 17:53:59 UTC (rev 10840)
@@ -17,6 +17,12 @@
   <dependencies>
     
     <dependency>
+      <groupId>org.jboss.ws.cxf</groupId>
+      <artifactId>jbossws-cxf-client</artifactId>
+      <version>${version}</version>
+    </dependency>
+    
+    <dependency>
       <groupId>javax.ejb</groupId>
       <artifactId>ejb-api</artifactId>
     </dependency>

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java	2009-10-06 13:01:31 UTC (rev 10839)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -46,11 +46,13 @@
 import org.jboss.wsf.common.ObjectNameFactory;
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.binding.BindingCustomization;
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.spi.invocation.EndpointAssociation;
 import org.jboss.wsf.spi.invocation.RequestHandler;
 import org.jboss.wsf.spi.management.EndpointRegistry;
 import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.GenericApplicationContext;
@@ -123,8 +125,9 @@
    private void loadAdditionalConfigExt(ApplicationContext ctx, ServletConfig servletConfig) throws ServletException
    {
       //Add extension to configure server beans according to JBossWS customizations 
-      Configurer configurer = bus.getExtension(Configurer.class);
-      bus.setExtension(new JBossWSBeanConfigurer(endpoint, configurer), Configurer.class);
+      JBossWSCXFConfigurer jbosswsConfigurer = new JBossWSCXFConfigurer(bus.getExtension(Configurer.class));
+      jbosswsConfigurer.setBindingCustomization(endpoint.getAttachment(BindingCustomization.class));
+      bus.setExtension(jbosswsConfigurer, Configurer.class);
       
       //Load configuration 
       String location = servletConfig.getServletContext().getInitParameter(PARAM_CXF_BEANS_URL);

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java	2009-10-06 13:01:31 UTC (rev 10839)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JAXBIntroDeploymentAspect.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -93,7 +93,7 @@
             JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
             IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
             String defaultNamespace = jaxbIntros.getDefaultNamespace();
-            BindingCustomization jaxbCustomizations = new org.jboss.wsf.stack.cxf.binding.JAXBBindingCustomization();
+            BindingCustomization jaxbCustomizations = new org.jboss.wsf.stack.cxf.client.configuration.JAXBBindingCustomization();
 
             jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
             if(defaultNamespace != null) {

Deleted: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSBeanConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSBeanConfigurer.java	2009-10-06 13:01:31 UTC (rev 10839)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSBeanConfigurer.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf;
-
-import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.databinding.DataBinding;
-import org.apache.cxf.jaxb.JAXBDataBinding;
-import org.apache.cxf.service.Service;
-import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * A CXF configurer that sets JBossWS stuff / customizations / properties etc. in CXF configurable beans
- *
- * @author alessio.soldano at jboss.com
- * @since 05-Oct-2009
- */
-public class JBossWSBeanConfigurer implements Configurer
-{
-   private Endpoint endpoint;
-   private Configurer delegate;
-
-   public JBossWSBeanConfigurer(Endpoint endpoint, Configurer delegate)
-   {
-      this.endpoint = endpoint;
-      this.delegate = delegate;
-   }
-
-   public void configureBean(Object beanInstance)
-   {
-      if (beanInstance instanceof Service)
-      {
-         configureService((Service)beanInstance);
-      }
-      if (delegate != null)
-      {
-         delegate.configureBean(beanInstance);
-      }
-   }
-
-   public void configureBean(String name, Object beanInstance)
-   {
-      if (beanInstance instanceof Service)
-      {
-         configureService((Service)beanInstance);
-      }
-      if (delegate != null)
-      {
-         delegate.configureBean(name, beanInstance);
-      }
-   }
-   
-   private synchronized void configureService(Service service)
-   {
-      //Configure binding customization
-      BindingCustomization customization = endpoint.getAttachment(BindingCustomization.class);
-      if (customization != null)
-      {
-         DataBinding db = service.getDataBinding();
-         //JAXB
-         if (customization instanceof JAXBBindingCustomization)
-         {
-            if (db != null && db instanceof JAXBDataBinding)
-            {
-               ((JAXBDataBinding)db).setContextProperties(customization);
-            }
-         }
-         //add other binding customization here below
-         
-      }
-      //add other configurations here below
-      
-   }
-
-}

Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml	2009-10-06 13:01:31 UTC (rev 10839)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml	2009-10-06 17:53:59 UTC (rev 10840)
@@ -38,6 +38,18 @@
         <include name="**/*" />
       </metainf>
     </jar>
+  	
+    <!-- jaxws-cxf-jaxbintros -->
+    <jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-jaxbintros.jar">
+      <fileset dir="${tests.output.dir}/test-classes">
+        <include name="org/jboss/test/ws/jaxws/cxf/jaxbintros/Endpoint.class"/>
+        <include name="org/jboss/test/ws/jaxws/cxf/jaxbintros/EndpointBean.class"/>
+        <include name="org/jboss/test/ws/jaxws/cxf/jaxbintros/UserType.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/test-resources/jaxws/cxf/jaxbintros/META-INF">
+        <include name="**/*" />
+      </metainf>
+    </jar>
 
     <!-- jaxws-cxf-wsrm-basic-doc -->
     <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-wsrm-basic-doc.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/wsrm/basic-doc/WEB-INF/web.xml">

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserEndpoint.java	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserEndpoint.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jaxbintros;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+ at WebService(name = "EndpointService", targetNamespace = "http://org.jboss.ws/cxf/jaxbintros")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
+public interface AnnotatedUserEndpoint
+{
+   public AnnotatedUserType echo(AnnotatedUserType foo);
+}


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserEndpoint.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserType.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserType.java	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserType.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jaxbintros;
+       
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.namespace.QName;
+
+/**
+ * <p>Java class for UserType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="UserType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="string" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="qname" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlRootElement(namespace = "http://org.jboss.ws/provider", name = "user")
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "UserType", propOrder = { "string", "qname" })
+public class AnnotatedUserType
+{
+
+   @XmlAttribute(required = true)
+   protected String string;
+   @XmlElement(required = true)
+   protected QName qname;
+
+   /**
+    * Gets the value of the string property.
+    *
+    * @return
+    *     possible object is
+    *     {@link String }
+    *
+    */
+   public String getString()
+   {
+      return string;
+   }
+
+   /**
+    * Sets the value of the string property.
+    *
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *
+    */
+   public void setString(String value)
+   {
+      this.string = value;
+   }
+
+   /**
+    * Gets the value of the qname property.
+    *
+    * @return
+    *     possible object is
+    *     {@link javax.xml.namespace.QName }
+    *
+    */
+   public QName getQname()
+   {
+      return qname;
+   }
+
+   /**
+    * Sets the value of the qname property.
+    *
+    * @param value
+    *     allowed object is
+    *     {@link javax.xml.namespace.QName }
+    *
+    */
+   public void setQname(QName value)
+   {
+      this.qname = value;
+   }
+
+}
+


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotatedUserType.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jaxbintros;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.jaxb.intros.IntroductionsAnnotationReader;
+import org.jboss.jaxb.intros.IntroductionsConfigParser;
+import org.jboss.jaxb.intros.configmodel.JaxbIntros;
+import org.jboss.wsf.test.JBossWSTest;
+
+import com.sun.xml.bind.api.JAXBRIContext;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ */
+public class AnnotationReaderTestCase extends JBossWSTest
+{
+   public void testUnmarshal() throws Exception
+   {
+      String reqString = 
+         "   <ns1:user xmlns:ns1='http://org.jboss.ws/provider' string='Kermit'>" + 
+         "      <qname>The Frog</qname>" + 
+         "    </ns1:user>";
+
+      JaxbIntros config = IntroductionsConfigParser.parseConfig(new FileInputStream(getResourceFile("jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml").getPath()));
+
+      IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
+      Map<String, Object> jaxbConfig = new HashMap<String, Object>();
+
+      jaxbConfig.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.ws/provider");
+      jaxbConfig.put(JAXBRIContext.ANNOTATION_READER, reader);
+
+      JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] { UserType.class }, jaxbConfig);
+      Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+
+      JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(reqString.getBytes())
+
+      ), UserType.class);
+
+      UserType ut = (UserType)jbe.getValue();
+      assertEquals("Kermit", ut.getString());
+      assertEquals("The Frog", ut.getQname().getLocalPart());
+
+   }
+}


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/AnnotationReaderTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/Endpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/Endpoint.java	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/Endpoint.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jaxbintros;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+ at WebService(name = "EndpointService", targetNamespace = "http://org.jboss.ws/cxf/jaxbintros")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
+public interface Endpoint
+{
+   public UserType echo(UserType user);
+}


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/Endpoint.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/EndpointBean.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/EndpointBean.java	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/EndpointBean.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jaxbintros;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+ at WebService(name = "EndpointService", targetNamespace = "http://org.jboss.ws/cxf/jaxbintros")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
+ at Stateless
+public class EndpointBean implements Endpoint
+{
+   public UserType echo(UserType user)
+   {
+      System.out.println("user: " + user);
+      return user;
+   }
+}


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/EndpointBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,166 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jaxbintros;
+
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.configuration.Configurer;
+import org.jboss.jaxb.intros.IntroductionsAnnotationReader;
+import org.jboss.jaxb.intros.IntroductionsConfigParser;
+import org.jboss.jaxb.intros.configmodel.JaxbIntros;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.stack.cxf.client.configuration.JAXBBindingCustomization;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+
+import com.sun.xml.bind.api.JAXBRIContext;
+
+/**
+ * Test the JAXBIntroduction features.
+ * 
+ * jaxb-intros.xml can reside under META-INF or WEB-INF and should be
+ * picked up by JAXBIntroduction deployment aspect on server side.
+ *
+ * @author alessio.soldano at jboss.com
+ */
+public class JAXBIntroTestCase extends JBossWSTest
+{
+   private String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-jaxbintros/EndpointBean";
+   private Bus bus;
+   private Configurer originalConfigurer;
+   
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(JAXBIntroTestCase.class, "jaxws-cxf-jaxbintros.jar");
+   }
+                                     
+   @SuppressWarnings("unchecked")
+   public void testWSDLAccess() throws Exception
+   {
+      URL wsdlURL = new URL(endpointAddress + "?wsdl");
+      Element wsdl = DOMUtils.parse(wsdlURL.openStream());
+      assertNotNull(wsdl);
+      Iterator<Element> it = DOMUtils.getChildElements(wsdl, new QName("http://www.w3.org/2001/XMLSchema","attribute"), true);
+      boolean attributeFound = false;
+      while (it.hasNext())
+      {
+         Element el = it.next();
+         if ("string".equals(el.getAttribute("name")))
+         {
+            attributeFound = true;
+         }
+      }
+      assertTrue("<xs:attribute name=\"string\" ..> not found in wsdl", attributeFound);
+   }
+   
+   /**
+    * Both client and server side use plain UserType class but have jaxbintros in place to deal with customizations
+    * 
+    * @throws Exception
+    */
+   public void testEndpoint() throws Exception
+   {
+      try
+      {
+         URL wsdlURL = new URL(endpointAddress + "?wsdl");
+         QName serviceName = new QName("http://org.jboss.ws/cxf/jaxbintros", "EndpointBeanService");
+   
+         setBindingCustomizationOnClientSide();
+         Service service = Service.create(wsdlURL, serviceName);
+         Endpoint port = service.getPort(Endpoint.class);
+         UserType user = new UserType();
+         QName qname = new QName("ns", "local", "prefix");
+         user.setQname(qname);
+         user.setString("Foo");
+         UserType result = port.echo(user);
+         assertEquals("Foo", result.getString());
+         assertEquals(qname, result.getQname());
+      }
+      finally
+      {
+         restoreConfigurer();
+      }
+   }
+   
+   /**
+    * Client side uses the annotated user type class, server side uses the plain one but has jaxintros in place
+    * 
+    * @throws Exception
+    */
+   public void testAnnotatedUserEndpoint() throws Exception
+   {
+      URL wsdlURL = new URL(endpointAddress + "?wsdl");
+      QName serviceName = new QName("http://org.jboss.ws/cxf/jaxbintros", "EndpointBeanService");
+
+      setBindingCustomizationOnClientSide();
+      Service service = Service.create(wsdlURL, serviceName);
+      AnnotatedUserEndpoint port = service.getPort(AnnotatedUserEndpoint.class);
+      AnnotatedUserType user = new AnnotatedUserType();
+      QName qname = new QName("ns", "local", "prefix");
+      user.setQname(qname);
+      user.setString("Foo");
+      AnnotatedUserType result = port.echo(user);
+      assertEquals("Foo", result.getString());
+      assertEquals(qname, result.getQname());
+   }
+   
+   /**
+    * Setup binding customization on client side using the JBossWSCXFConfigurer
+    * 
+    * @throws Exception
+    */
+   private void setBindingCustomizationOnClientSide() throws Exception
+   {
+      JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(getResourceURL("jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml").openStream());
+      IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
+      String defaultNamespace = jaxbIntros.getDefaultNamespace();
+      BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();
+
+      jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
+      if(defaultNamespace != null) {
+         jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
+      }
+      
+      bus = BusFactory.getThreadDefaultBus();
+      originalConfigurer = bus.getExtension(Configurer.class);
+      JBossWSCXFConfigurer configurer = new JBossWSCXFConfigurer(originalConfigurer);
+      configurer.setBindingCustomization(jaxbCustomizations);
+      bus.setExtension(configurer, Configurer.class);
+
+   }
+   
+   private void restoreConfigurer()
+   {
+      bus.setExtension(originalConfigurer, Configurer.class);
+   }
+}


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/UserType.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/UserType.java	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/UserType.java	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.jaxbintros;
+
+import javax.xml.namespace.QName;
+
+/**
+ * <p>Java class for UserType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="UserType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="string" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="qname" type="{http://www.w3.org/2001/XMLSchema}QName"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+public class UserType
+{  
+   protected String string;
+
+   protected QName qname;
+
+   /**
+    * Gets the value of the string property.
+    *
+    * @return
+    *     possible object is
+    *     {@link String }
+    *
+    */
+   public String getString()
+   {
+      return string;
+   }
+
+   /**
+    * Sets the value of the string property.
+    *
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *
+    */
+   public void setString(String value)
+   {
+      this.string = value;
+   }
+
+   /**
+    * Gets the value of the qname property.
+    *
+    * @return
+    *     possible object is
+    *     {@link javax.xml.namespace.QName }
+    *
+    */
+   public QName getQname()
+   {
+      return qname;
+   }
+
+   /**
+    * Sets the value of the qname property.
+    *
+    * @param value
+    *     allowed object is
+    *     {@link javax.xml.namespace.QName }
+    *
+    */
+   public void setQname(QName value)
+   {
+      this.qname = value;
+   }
+
+}


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/UserType.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml	                        (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml	2009-10-06 17:53:59 UTC (rev 10840)
@@ -0,0 +1,27 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros" default-namespace="http://org.jboss.ws/provider">
+
+  <!--
+  Note: how the "name" attributes on class, field and method configs can be regular expressions.
+  -->
+
+  <!--
+ at XmlRootElement(namespace = "http://org.jboss.ws/provider", name = "user")
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "UserType", propOrder = { "string", "qname" })
+public class UserType {}
+  -->
+
+  <!--
+  The type namespaces on the customerOrder are different from the rest of the message...
+  -->
+  <Class name="org.jboss.test.ws.jaxws.cxf.jaxbintros.UserType">
+    <XmlAccessorType value="FIELD"/>   
+    <XmlRootElement name="user" namespace="http://org.jboss.ws/provider"/>
+
+    <Field name="string">
+      <XmlAttribute />
+    </Field>    
+  </Class>
+
+</jaxb-intros>
\ No newline at end of file


Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF



More information about the jbossws-commits mailing list