JBossWS SVN: r10858 - common/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 05:21:45 -0400 (Thu, 08 Oct 2009)
New Revision: 10858
Modified:
common/trunk/pom.xml
Log:
[JBWS-2714] Moving jaxbintros dependency to common (filtering out the jaxb-impl transitive dependency)
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2009-10-08 09:20:07 UTC (rev 10857)
+++ common/trunk/pom.xml 2009-10-08 09:21:45 UTC (rev 10858)
@@ -26,6 +26,7 @@
<!-- Properties -->
<properties>
+ <jboss.jaxbintros.version>1.0.1-SNAPSHOT</jboss.jaxbintros.version>
<jaxws.api.version>2.1</jaxws.api.version>
<jboss.common.core.version>2.2.14.GA</jboss.common.core.version>
<jboss.ejb.api.version>3.0.0.GA</jboss.ejb.api.version>
@@ -37,13 +38,28 @@
<!-- Dependencies -->
<dependencies>
-
+
<!-- jbossws dependencies -->
<dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-spi</artifactId>
<version>${jbossws.spi.version}</version>
</dependency>
+ <dependency>
+ <groupId>jboss.jaxbintros</groupId>
+ <artifactId>jboss-jaxb-intros</artifactId>
+ <version>${jboss.jaxbintros.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<!-- provided apis -->
<dependency>
15 years, 3 months
JBossWS SVN: r10857 - spi/trunk/src/main/java/org/jboss/wsf/spi/binding.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 05:20:07 -0400 (Thu, 08 Oct 2009)
New Revision: 10857
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java
spi/trunk/src/main/java/org/jboss/wsf/spi/binding/JAXBBindingCustomization.java
Log:
[JBWS-2714] making JAXBBindingCustomization non abstract
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java 2009-10-08 09:18:25 UTC (rev 10856)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/binding/BindingCustomization.java 2009-10-08 09:20:07 UTC (rev 10857)
@@ -30,7 +30,6 @@
* <p>
* Supported properties need to be documented in subclasses.
*
- *
* @author Heiko.Braun(a)jboss.com
* Created: Jun 28, 2007
*/
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/binding/JAXBBindingCustomization.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/binding/JAXBBindingCustomization.java 2009-10-08 09:18:25 UTC (rev 10856)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/binding/JAXBBindingCustomization.java 2009-10-08 09:20:07 UTC (rev 10857)
@@ -29,7 +29,7 @@
* @author alessio.soldano(a)jboss.com
* @since 05-Oct-2009
*/
-public abstract class JAXBBindingCustomization extends BindingCustomization
+public class JAXBBindingCustomization extends BindingCustomization
{
private static final long serialVersionUID = 5547146387872057974L;
15 years, 3 months
JBossWS SVN: r10856 - projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-08 05:18:25 -0400 (Thu, 08 Oct 2009)
New Revision: 10856
Modified:
projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java
Log:
[JBAS-7319] Adding another convenient method to BindingCustomizationFactory
Modified: projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java
===================================================================
--- projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java 2009-10-07 17:24:32 UTC (rev 10855)
+++ projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java 2009-10-08 09:18:25 UTC (rev 10856)
@@ -41,22 +41,33 @@
*/
public class BindingCustomizationFactory
{
- public static Map<String, Object> getBindingCustomization(InputStream introsConfigStream)
- {
- return getBindingCustomization(introsConfigStream, null);
- }
-
- public static Map<String, Object> getBindingCustomization(InputStream introsConfigStream, String namespace)
- {
- JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
- IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
- String defaultNamespace = namespace != null ? namespace : jaxbIntros.getDefaultNamespace();
- Map<String, Object> jaxbCustomizations = new HashMap<String, Object>();
+ public static Map<String, Object> getBindingCustomization(InputStream introsConfigStream)
+ {
+ return getBindingCustomization(introsConfigStream, null);
+ }
- jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
- if(defaultNamespace != null) {
- jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
- }
- return jaxbCustomizations;
- }
+ public static Map<String, Object> getBindingCustomization(InputStream introsConfigStream, String namespace)
+ {
+ Map<String, Object> jaxbCustomizations = new HashMap<String, Object>();
+ populateBindingCustomization(introsConfigStream, namespace, jaxbCustomizations);
+ return jaxbCustomizations;
+ }
+
+ public static void populateBindingCustomization(InputStream introsConfigStream, Map<String, Object> customization)
+ {
+ populateBindingCustomization(introsConfigStream, null, customization);
+ }
+
+ public static void populateBindingCustomization(InputStream introsConfigStream, String namespace, Map<String, Object> customization)
+ {
+ JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
+ IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
+ String defaultNamespace = namespace != null ? namespace : jaxbIntros.getDefaultNamespace();
+
+ customization.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
+ if (defaultNamespace != null)
+ {
+ customization.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
+ }
+ }
}
15 years, 3 months
JBossWS SVN: r10855 - in projects/jaxbintros/trunk: src/main/java/org/jboss/jaxb/intros and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-07 13:24:32 -0400 (Wed, 07 Oct 2009)
New Revision: 10855
Added:
projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java
Modified:
projects/jaxbintros/trunk/pom.xml
Log:
[JBAS-7319] Adding BindingCustomizationFactory + fixing dependencies in pom.xml
Modified: projects/jaxbintros/trunk/pom.xml
===================================================================
--- projects/jaxbintros/trunk/pom.xml 2009-10-07 16:37:16 UTC (rev 10854)
+++ projects/jaxbintros/trunk/pom.xml 2009-10-07 17:24:32 UTC (rev 10855)
@@ -46,24 +46,20 @@
<!-- Dependencies -->
<dependencies>
- <!-- provided apis -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.api.version}</version>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.impl.version}</version>
- <scope>provided</scope>
</dependency>
<!-- test dependencies -->
Added: projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java
===================================================================
--- projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java (rev 0)
+++ projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java 2009-10-07 17:24:32 UTC (rev 10855)
@@ -0,0 +1,62 @@
+/*
+ * 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.jaxb.intros;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.jaxb.intros.configmodel.JaxbIntros;
+
+import com.sun.xml.bind.api.JAXBRIContext;
+
+/**
+ * A factory class that creates BindingCustomization instances using JAXBIntros.
+ * This basically a convenient class for getting a binding customizations
+ * ready for being installed in a jaxb context while hiding the internals
+ * of jaxb-impl.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 07-Oct-2009
+ *
+ */
+public class BindingCustomizationFactory
+{
+ public static Map<String, Object> getBindingCustomization(InputStream introsConfigStream)
+ {
+ return getBindingCustomization(introsConfigStream, null);
+ }
+
+ public static Map<String, Object> getBindingCustomization(InputStream introsConfigStream, String namespace)
+ {
+ JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
+ IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
+ String defaultNamespace = namespace != null ? namespace : jaxbIntros.getDefaultNamespace();
+ Map<String, Object> jaxbCustomizations = new HashMap<String, Object>();
+
+ jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
+ if(defaultNamespace != null) {
+ jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
+ }
+ return jaxbCustomizations;
+ }
+}
Property changes on: projects/jaxbintros/trunk/src/main/java/org/jboss/jaxb/intros/BindingCustomizationFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 3 months
JBossWS SVN: r10854 - projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-07 12:37:16 -0400 (Wed, 07 Oct 2009)
New Revision: 10854
Removed:
projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-01.xml
projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-02.xml
projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-03.xml
projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/order-message.xml
Log:
[JBAS-7317] Removing useless copies of resources
Deleted: projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-01.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-01.xml 2009-10-07 16:36:10 UTC (rev 10853)
+++ projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-01.xml 2009-10-07 16:37:16 UTC (rev 10854)
@@ -1,24 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros"
- default-namespace="http://jbossesb.x.jboss.org">
-
- <!--
- The XSD for the schema can be found at:
- http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/src/main/resou...
- Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
- -->
-
- <Class name="org.jboss.jaxb.intros.TestBean1">
- <XmlType namespace="http://jbossesb.y.jboss.org" />
- <Method name="getOrderDate">
- <XmlAttribute namespace="http://jbossesb.z.jboss.org" required="false"/>
- </Method>
- </Class>
-
- <Class name="org.jboss.jaxb.intros.TestBean2">
- <Field name="orderNumber">
- <XmlElement name="OrderNum" nillable="true" />
- </Field>
- </Class>
-
-</jaxb-intros>
Deleted: projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-02.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-02.xml 2009-10-07 16:36:10 UTC (rev 10853)
+++ projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-02.xml 2009-10-07 16:37:16 UTC (rev 10854)
@@ -1,24 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros"
- default-namespace="http://jbossesb.x.jboss.org">
-
- <!--
- The XSD for the schema can be found at:
- http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/src/main/resou...
- Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
- -->
-
- <Class name="org.jboss.jaxb.intros.TestBean1">
- <XmlType namespace="http://jbossesb.y.jboss.org" propOrder="a,b,c" factoryClass="org.jboss.jaxb.intros.TestBean1" />
- <Method name="getOrderDate">
- <XmlAttribute namespace="http://jbossesb.z.jboss.org" required="false"/>
- </Method>
- </Class>
-
- <Class name="org.jboss.jaxb.intros.TestBean2">
- <Field name="orderNumber">
- <XmlElement name="OrderNum" nillable="true" type="org.jboss.jaxb.intros.TestBean2" />
- </Field>
- </Class>
-
-</jaxb-intros>
Deleted: projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-03.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-03.xml 2009-10-07 16:36:10 UTC (rev 10853)
+++ projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/intro-config-03.xml 2009-10-07 16:37:16 UTC (rev 10854)
@@ -1,51 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros">
-
- <!--
- The XSD for the schema can be found at:
- http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/src/main/resou...
- 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.jaxb.intros.testbeans.CustomerOrder">
- <Method name="get.*">
- <XmlElement namespace="http://org.jboss.esb/ns" />
- </Method>
- </Class>
-
- <Class name="org.jboss.jaxb.intros.testbeans.OrderHeader">
- <Method name="getOrderDate">
- <XmlAttribute name="date" namespace="http://org.jboss.esb/ns" />
- </Method>
- <Method name="get.*">
- <XmlElement namespace="http://org.jboss.esb/ns1" />
- </Method>
- </Class>
-
- <Class name="org.jboss.jaxb.intros.testbeans.Address">
- <XmlAccessorType value="FIELD" />
- <Field name="zip">
- <XmlAttribute />
- </Field>
- <Field name=".*">
- <XmlElement namespace="http://org.jboss.esb/ns1" />
- </Field>
- </Class>
-
- <!--
- More general namespace config...
- -->
- <Class name="org.jboss.jaxb.intros.testbeans.*">
- <Method name="get.*">
- <XmlElement namespace="http://org.jboss.esb/ns1" />
- </Method>
- </Class>
-
-</jaxb-intros>
Deleted: projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/order-message.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/order-message.xml 2009-10-07 16:36:10 UTC (rev 10853)
+++ projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/order-message.xml 2009-10-07 16:37:16 UTC (rev 10854)
@@ -1,47 +0,0 @@
-<ns:customerOrder xmlns:ns="http://org.jboss.esb/ns" xmlns:ns1="http://org.jboss.esb/ns1">
- <ns:header ns:date="2006-05-01T00:00:00.000Z">
- <ns1:billTerms/>
- <ns1:billTo>
- <ns1:address zip="06484">
- <ns1:city>Shelton</ns1:city>
- <ns1:state>CT</ns1:state>
- <ns1:street1>160 Active Lane</ns1:street1>
- <ns1:street2/>
- </ns1:address>
- <ns1:company>Active Steel</ns1:company>
- <ns1:contact>
- <ns1:email>bob(a)activeSteel.com</ns1:email>
- <ns1:fax>(203) 555-1235</ns1:fax>
- <ns1:name>Bob Active</ns1:name>
- <ns1:phone>(203) 555-1234</ns1:phone>
- </ns1:contact>
- </ns1:billTo>
- <ns1:customerNumber>123456</ns1:customerNumber>
- <ns1:orderTotal>88500.00</ns1:orderTotal>
- <ns1:poNumber>PO000123</ns1:poNumber>
- <ns1:shipTerms/>
- <ns1:shipTo>
- <ns1:address>
- <ns1:city>Shelton</ns1:city>
- <ns1:state>CT</ns1:state>
- <ns1:street1>160 Active Lane</ns1:street1>
- <ns1:street2/>
- <ns1:zip>06484</ns1:zip>
- </ns1:address>
- <ns1:company>Active Steel</ns1:company>
- <ns1:contact>
- <ns1:email>bob(a)activeSteel.com</ns1:email>
- <ns1:fax>(203) 555-1235</ns1:fax>
- <ns1:name>Bob Active</ns1:name>
- <ns1:phone>(203) 555-1234</ns1:phone>
- </ns1:contact>
- </ns1:shipTo>
- </ns:header>
- <ns:items>
- <ns1:description>Flat 16 feet 100 count</ns1:description>
- <ns1:extensionAmount>24500.00</ns1:extensionAmount>
- <ns1:partNumber>FLT16100</ns1:partNumber>
- <ns1:price>490.00</ns1:price>
- <ns1:quantity>50</ns1:quantity>
- </ns:items>
-</ns:customerOrder>
\ No newline at end of file
15 years, 3 months
JBossWS SVN: r10853 - in projects/jaxbintros/trunk: src/main and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-07 12:36:10 -0400 (Wed, 07 Oct 2009)
New Revision: 10853
Added:
projects/jaxbintros/trunk/pom.xml
projects/jaxbintros/trunk/src/main/ant/
projects/jaxbintros/trunk/src/main/ant/build-install.xml
projects/jaxbintros/trunk/src/test/resources/intro-config-01.xml
projects/jaxbintros/trunk/src/test/resources/intro-config-02.xml
projects/jaxbintros/trunk/src/test/resources/intro-config-03.xml
projects/jaxbintros/trunk/src/test/resources/order-message.xml
Removed:
projects/jaxbintros/trunk/ant-import/
projects/jaxbintros/trunk/ant.properties.example
Modified:
projects/jaxbintros/trunk/src/main/etc/component-info.xml
projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsAnnotationReaderUnitTest.java
projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsConfigParserUnitTest.java
Log:
[JBAS-7317] Mavenize JaxbIntros
Deleted: projects/jaxbintros/trunk/ant.properties.example
===================================================================
--- projects/jaxbintros/trunk/ant.properties.example 2009-10-07 13:33:45 UTC (rev 10852)
+++ projects/jaxbintros/trunk/ant.properties.example 2009-10-07 16:36:10 UTC (rev 10853)
@@ -1,26 +0,0 @@
-#
-# A sample ant properties file
-#
-# $Id: ant.properties.example 3995 2007-07-26 08:52:45Z thomas.diesler(a)jboss.com $
-
-# JBoss Home
-#jboss42.home=/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA
-
-# The JBoss settings
-jboss.server.instance=default
-
-# JBoss Repository
-#jboss.repository=file:/home/tdiesler/svn/jboss.local.repository
-jboss.repository=http://repository.jboss.org
-
-# JBossWS Release
-jboss.local.repository=/home/tdiesler/svn/jboss.local.repository
-
-# Force thirdparty HTTP get
-#force.thirdparty.get=true
-
-# Java Compiler options
-javac.debug=yes
-javac.deprecation=no
-javac.fail.onerror=yes
-javac.verbose=no
Added: projects/jaxbintros/trunk/pom.xml
===================================================================
--- projects/jaxbintros/trunk/pom.xml (rev 0)
+++ projects/jaxbintros/trunk/pom.xml 2009-10-07 16:36:10 UTC (rev 10853)
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBoss JAXB Introductions</name>
+ <groupId>jboss.jaxbintros</groupId>
+ <artifactId>jboss-jaxb-intros</artifactId>
+ <packaging>jar</packaging>
+
+ <version>1.0.1-SNAPSHOT</version>
+
+ <!-- Source Control Management -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/projects/jaxbintros/trunk</developerConnection>
+ <url>http://fisheye.jboss.com/viewrep/JBossWS/projects/jaxbintros/trunk</url>
+ </scm>
+
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <!-- IssueManagement -->
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.jboss.org/jira/browse/JBWS</url>
+ </issueManagement>
+
+ <!-- licenses -->
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+
+ <!-- Properties -->
+ <properties>
+ <commons.logging.version>1.1.1</commons.logging.version>
+ <junit.version>3.8.2</junit.version>
+ <jaxb.api.version>2.1</jaxb.api.version>
+ <jaxb.impl.version>2.1.9</jaxb.impl.version>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <!-- provided apis -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons.logging.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>${jaxb.api.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>${jaxb.impl.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <resources>
+ <resource>
+ <targetPath>../etc</targetPath>
+ <directory>src/main/etc</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>install</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="version.id" value="${project.version}" />
+ <property name="jboss.local.repository" value="${jboss.local.repository}" />
+ <ant antfile="src/main/ant/build-install.xml" target="install" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-8</version>
+ <configuration>
+ <scmCommentPrefix>[${jira.issue}] :</scmCommentPrefix>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <!-- PluginManagement -->
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2.SP1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <!-- Reporting -->
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <!-- Repositories -->
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <url>http://snapshots.jboss.org/maven2</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <!-- PluginRepositories -->
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>snapshots.jboss.org</id>
+ <url>http://snapshots.jboss.org/maven2</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <!-- DistributionManagement -->
+ <distributionManagement>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Maven Repository</name>
+ <url>file://${jboss.maven.repository}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <profiles>
+ <profile>
+ <id>download-sources</id>
+ <activation>
+ <property>
+ <name>jbossws-download-sources</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>download-sources</id>
+ <goals>
+ <goal>sources</goal>
+ </goals>
+ <configuration>
+ <silent>true</silent>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Property changes on: projects/jaxbintros/trunk/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jaxbintros/trunk/src/main/ant/build-install.xml
===================================================================
--- projects/jaxbintros/trunk/src/main/ant/build-install.xml (rev 0)
+++ projects/jaxbintros/trunk/src/main/ant/build-install.xml 2009-10-07 16:36:10 UTC (rev 10853)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<project>
+
+ <!-- ================================================================== -->
+ <!-- Setup -->
+ <!-- ================================================================== -->
+
+ <property name="common.dir" value="${basedir}"/>
+ <property name="common.etc.dir" value="${common.dir}/src/main/etc"/>
+ <property name="common.target.dir" value="${common.dir}/target"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="init">
+ <property name="repository.id" value="${version.id}"/>
+ <echo message="version.id=${version.id}"/>
+ <echo message="repository.id=${repository.id}"/>
+ <echo message="jboss.local.repository=${jboss.local.repository}"/>
+ </target>
+
+ <target name="check-properties" depends="init">
+ <available property="jboss.local.repository.available" type="dir" file="${jboss.local.repository}"/>
+ <fail message="Cannot find directory ${jboss.local.repository}. Did you copy profiles-example.xml?" unless="jboss.local.repository.available"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Installation -->
+ <!-- ================================================================== -->
+
+ <!-- Install to jboss.local.repository -->
+ <target name="install" depends="check-properties" description="Install to jboss.local.repository">
+
+ <!-- Check if the target jar is available -->
+ <available property="jboss-jaxb-intros.jar.available" file="${common.target.dir}/jboss-jaxb-intros-${version.id}.jar"/>
+ <fail message="Cannot find jboss-jaxb-intros-${version.id}.jar. Did you run 'mvn package'?" unless="jboss-jaxb-intros.jar.available"/>
+
+ <!-- Check if the source jar is available -->
+ <available property="jboss-jaxb-intros.sources.jar.available" file="${common.target.dir}/jboss-jaxb-intros-${version.id}-sources.jar"/>
+ <fail message="Cannot find jboss-jaxb-intros-${version.id}-sources.jar. Did you run 'mvn source:jar'?" unless="jboss-jaxb-intros.sources.jar.available"/>
+
+ <!-- jboss/jboss-jaxb-intros -->
+ <property name="jboss.repository.dir" value="${jboss.local.repository}/jboss/jboss-jaxb-intros/${repository.id}"/>
+ <mkdir dir="${jboss.repository.dir}/lib"/>
+ <copy file="${common.target.dir}/jboss-jaxb-intros-${version.id}.jar" tofile="${jboss.repository.dir}//lib/jboss-jaxb-intros.jar" overwrite="true"/>
+ <copy file="${common.target.dir}/jboss-jaxb-intros-${version.id}-sources.jar" tofile="${jboss.repository.dir}/lib/jboss-jaxb-intros-src.jar" overwrite="true"/>
+ <copy file="${common.target.dir}/etc/component-info.xml" tofile="${jboss.repository.dir}/component-info.xml" overwrite="true"/>
+ </target>
+
+</project>
Property changes on: projects/jaxbintros/trunk/src/main/ant/build-install.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jaxbintros/trunk/src/main/etc/component-info.xml
===================================================================
--- projects/jaxbintros/trunk/src/main/etc/component-info.xml 2009-10-07 13:33:45 UTC (rev 10852)
+++ projects/jaxbintros/trunk/src/main/etc/component-info.xml 2009-10-07 16:36:10 UTC (rev 10853)
@@ -4,18 +4,6 @@
<artifact id="jboss-jaxb-intros.jar"/>
- <import componentref="jboss/jbossws-native42">
- <compatible version="@jbossws-native@"/>
- </import>
-
- <import componentref="jboss/jbossws-spi">
- <compatible version="@jbossws-spi@"/>
- </import>
-
- <import componentref="sun-jaxb">
- <compatible version="@sun-jaxb@"/>
- </import>
-
<export>
</export>
Modified: projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsAnnotationReaderUnitTest.java
===================================================================
--- projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsAnnotationReaderUnitTest.java 2009-10-07 13:33:45 UTC (rev 10852)
+++ projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsAnnotationReaderUnitTest.java 2009-10-07 16:36:10 UTC (rev 10853)
@@ -31,6 +31,9 @@
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.transform.stream.StreamSource;
+
+import java.io.File;
+import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Map;
@@ -44,8 +47,8 @@
*/
public class IntroductionsAnnotationReaderUnitTest extends TestCase {
- public void test_annotation_intro() throws ConfigurationException, NoSuchMethodException, NoSuchFieldException {
- JaxbIntros config = IntroductionsConfigParser.parseConfig(getClass().getResourceAsStream("intro-config-02.xml"));
+ public void test_annotation_intro() throws ConfigurationException, NoSuchMethodException, NoSuchFieldException, IOException {
+ JaxbIntros config = IntroductionsConfigParser.parseConfig(new File("target/test-classes/intro-config-02.xml").toURL().openStream());
IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
Method testBean1Method = TestBean1.class.getMethod("getOrderDate");
Field testBean2Field = TestBean2.class.getField("orderNumber");
@@ -72,8 +75,8 @@
assertEquals("http://jbossesb.org", xmlAttribute.namespace());
}
- public void test_jaxb_unmarshal() throws ConfigurationException, JAXBException {
- JaxbIntros config = IntroductionsConfigParser.parseConfig(getClass().getResourceAsStream("intro-config-03.xml"));
+ public void test_jaxb_unmarshal() throws ConfigurationException, JAXBException, IOException {
+ JaxbIntros config = IntroductionsConfigParser.parseConfig(new File("target/test-classes/intro-config-03.xml").toURL().openStream());
IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
Map<String, Object> jaxbConfig = new HashMap<String, Object>();
@@ -83,7 +86,7 @@
JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] {CustomerOrder.class}, jaxbConfig);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(getClass().getResourceAsStream("order-message.xml")), CustomerOrder.class);
+ JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(new File("target/test-classes/order-message.xml").toURL().openStream()), CustomerOrder.class);
CustomerOrder order = (CustomerOrder) jbe.getValue();
assertNotNull("null Order", order);
Modified: projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsConfigParserUnitTest.java
===================================================================
--- projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsConfigParserUnitTest.java 2009-10-07 13:33:45 UTC (rev 10852)
+++ projects/jaxbintros/trunk/src/test/java/org/jboss/jaxb/intros/IntroductionsConfigParserUnitTest.java 2009-10-07 16:36:10 UTC (rev 10853)
@@ -19,6 +19,10 @@
*/
package org.jboss.jaxb.intros;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
import junit.framework.TestCase;
import org.jboss.jaxb.intros.configmodel.JaxbIntros;
import org.jboss.jaxb.intros.configmodel.ClassIntroConfig;
@@ -28,8 +32,8 @@
*/
public class IntroductionsConfigParserUnitTest extends TestCase {
- public void test() throws ConfigurationException {
- JaxbIntros config = IntroductionsConfigParser.parseConfig(getClass().getResourceAsStream("intro-config-01.xml"));
+ public void test() throws ConfigurationException, IOException {
+ JaxbIntros config = IntroductionsConfigParser.parseConfig(new File("target/test-classes/intro-config-01.xml").toURL().openStream());
assertEquals("http://jbossesb.x.jboss.org", config.getDefaultNamespace());
assertEquals(2, config.getClazz().size());
Added: projects/jaxbintros/trunk/src/test/resources/intro-config-01.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/resources/intro-config-01.xml (rev 0)
+++ projects/jaxbintros/trunk/src/test/resources/intro-config-01.xml 2009-10-07 16:36:10 UTC (rev 10853)
@@ -0,0 +1,24 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros"
+ default-namespace="http://jbossesb.x.jboss.org">
+
+ <!--
+ The XSD for the schema can be found at:
+ http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/src/main/resou...
+ Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
+ -->
+
+ <Class name="org.jboss.jaxb.intros.TestBean1">
+ <XmlType namespace="http://jbossesb.y.jboss.org" />
+ <Method name="getOrderDate">
+ <XmlAttribute namespace="http://jbossesb.z.jboss.org" required="false"/>
+ </Method>
+ </Class>
+
+ <Class name="org.jboss.jaxb.intros.TestBean2">
+ <Field name="orderNumber">
+ <XmlElement name="OrderNum" nillable="true" />
+ </Field>
+ </Class>
+
+</jaxb-intros>
Property changes on: projects/jaxbintros/trunk/src/test/resources/intro-config-01.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jaxbintros/trunk/src/test/resources/intro-config-02.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/resources/intro-config-02.xml (rev 0)
+++ projects/jaxbintros/trunk/src/test/resources/intro-config-02.xml 2009-10-07 16:36:10 UTC (rev 10853)
@@ -0,0 +1,24 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros"
+ default-namespace="http://jbossesb.x.jboss.org">
+
+ <!--
+ The XSD for the schema can be found at:
+ http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/src/main/resou...
+ Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
+ -->
+
+ <Class name="org.jboss.jaxb.intros.TestBean1">
+ <XmlType namespace="http://jbossesb.y.jboss.org" propOrder="a,b,c" factoryClass="org.jboss.jaxb.intros.TestBean1" />
+ <Method name="getOrderDate">
+ <XmlAttribute namespace="http://jbossesb.z.jboss.org" required="false"/>
+ </Method>
+ </Class>
+
+ <Class name="org.jboss.jaxb.intros.TestBean2">
+ <Field name="orderNumber">
+ <XmlElement name="OrderNum" nillable="true" type="org.jboss.jaxb.intros.TestBean2" />
+ </Field>
+ </Class>
+
+</jaxb-intros>
Property changes on: projects/jaxbintros/trunk/src/test/resources/intro-config-02.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jaxbintros/trunk/src/test/resources/intro-config-03.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/resources/intro-config-03.xml (rev 0)
+++ projects/jaxbintros/trunk/src/test/resources/intro-config-03.xml 2009-10-07 16:36:10 UTC (rev 10853)
@@ -0,0 +1,51 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros">
+
+ <!--
+ The XSD for the schema can be found at:
+ http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/src/main/resou...
+ 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.jaxb.intros.testbeans.CustomerOrder">
+ <Method name="get.*">
+ <XmlElement namespace="http://org.jboss.esb/ns" />
+ </Method>
+ </Class>
+
+ <Class name="org.jboss.jaxb.intros.testbeans.OrderHeader">
+ <Method name="getOrderDate">
+ <XmlAttribute name="date" namespace="http://org.jboss.esb/ns" />
+ </Method>
+ <Method name="get.*">
+ <XmlElement namespace="http://org.jboss.esb/ns1" />
+ </Method>
+ </Class>
+
+ <Class name="org.jboss.jaxb.intros.testbeans.Address">
+ <XmlAccessorType value="FIELD" />
+ <Field name="zip">
+ <XmlAttribute />
+ </Field>
+ <Field name=".*">
+ <XmlElement namespace="http://org.jboss.esb/ns1" />
+ </Field>
+ </Class>
+
+ <!--
+ More general namespace config...
+ -->
+ <Class name="org.jboss.jaxb.intros.testbeans.*">
+ <Method name="get.*">
+ <XmlElement namespace="http://org.jboss.esb/ns1" />
+ </Method>
+ </Class>
+
+</jaxb-intros>
Property changes on: projects/jaxbintros/trunk/src/test/resources/intro-config-03.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jaxbintros/trunk/src/test/resources/order-message.xml
===================================================================
--- projects/jaxbintros/trunk/src/test/resources/order-message.xml (rev 0)
+++ projects/jaxbintros/trunk/src/test/resources/order-message.xml 2009-10-07 16:36:10 UTC (rev 10853)
@@ -0,0 +1,47 @@
+<ns:customerOrder xmlns:ns="http://org.jboss.esb/ns" xmlns:ns1="http://org.jboss.esb/ns1">
+ <ns:header ns:date="2006-05-01T00:00:00.000Z">
+ <ns1:billTerms/>
+ <ns1:billTo>
+ <ns1:address zip="06484">
+ <ns1:city>Shelton</ns1:city>
+ <ns1:state>CT</ns1:state>
+ <ns1:street1>160 Active Lane</ns1:street1>
+ <ns1:street2/>
+ </ns1:address>
+ <ns1:company>Active Steel</ns1:company>
+ <ns1:contact>
+ <ns1:email>bob(a)activeSteel.com</ns1:email>
+ <ns1:fax>(203) 555-1235</ns1:fax>
+ <ns1:name>Bob Active</ns1:name>
+ <ns1:phone>(203) 555-1234</ns1:phone>
+ </ns1:contact>
+ </ns1:billTo>
+ <ns1:customerNumber>123456</ns1:customerNumber>
+ <ns1:orderTotal>88500.00</ns1:orderTotal>
+ <ns1:poNumber>PO000123</ns1:poNumber>
+ <ns1:shipTerms/>
+ <ns1:shipTo>
+ <ns1:address>
+ <ns1:city>Shelton</ns1:city>
+ <ns1:state>CT</ns1:state>
+ <ns1:street1>160 Active Lane</ns1:street1>
+ <ns1:street2/>
+ <ns1:zip>06484</ns1:zip>
+ </ns1:address>
+ <ns1:company>Active Steel</ns1:company>
+ <ns1:contact>
+ <ns1:email>bob(a)activeSteel.com</ns1:email>
+ <ns1:fax>(203) 555-1235</ns1:fax>
+ <ns1:name>Bob Active</ns1:name>
+ <ns1:phone>(203) 555-1234</ns1:phone>
+ </ns1:contact>
+ </ns1:shipTo>
+ </ns:header>
+ <ns:items>
+ <ns1:description>Flat 16 feet 100 count</ns1:description>
+ <ns1:extensionAmount>24500.00</ns1:extensionAmount>
+ <ns1:partNumber>FLT16100</ns1:partNumber>
+ <ns1:price>490.00</ns1:price>
+ <ns1:quantity>50</ns1:quantity>
+ </ns:items>
+</ns:customerOrder>
\ No newline at end of file
Property changes on: projects/jaxbintros/trunk/src/test/resources/order-message.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 3 months
JBossWS SVN: r10852 - stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-07 09:33:45 -0400 (Wed, 07 Oct 2009)
New Revision: 10852
Modified:
stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java
stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
Log:
[JBWS-2674][JBWS-2754] don't use proprietary API (WIP)
Modified: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java 2009-10-07 13:32:00 UTC (rev 10851)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java 2009-10-07 13:33:45 UTC (rev 10852)
@@ -39,23 +39,20 @@
import org.jboss.logging.Logger;
import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.http.HttpContext;
-import org.jboss.wsf.spi.http.HttpServer;
-import org.jboss.wsf.spi.http.HttpServerFactory;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
- * Test Endpoint deployment
+ * Tests Endpoint deployment in J2EE environment.
*
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-Jul-2006
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public class EndpointServlet extends HttpServlet
{
- private Endpoint endpoint;
+
+ private Endpoint endpoint1;
+ private Endpoint endpoint2;
private static final String TEST_ELEMENT = "<fabrikam:CustomerKey xmlns:fabrikam='http://example.com/fabrikam'>123456789</fabrikam:CustomerKey>";
@Override
@@ -63,25 +60,16 @@
{
super.init(config);
- // Create the endpoint
- EndpointBean epImpl = new EndpointBean();
- endpoint = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, epImpl);
-
- // Create and start the HTTP server
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).getHttpServer();
- httpServer.start();
-
- // Create the context and publish the endpoint
- HttpContext context = httpServer.createContext("/jaxws-endpoint");
- endpoint.publish(context);
+ endpoint1 = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, new EndpointBean());
+ endpoint1.publish("http://localhost:8080/jaxws-endpoint");
+ endpoint2 = Endpoint.publish("http://localhost:8080/jaxws-endpoint2/endpoint/long/path", EndpointBean.class);
}
@Override
public void destroy()
{
- // Stop the endpoint
- endpoint.stop();
+ endpoint1.stop();
+ endpoint2.stop();
super.destroy();
}
@@ -99,16 +87,15 @@
String retStr = port.echo(param);
//Test epr
- assertEndpointReference(endpoint.getEndpointReference(DOMUtils.parse(TEST_ELEMENT)), TEST_ELEMENT);
- assertEndpointReference(endpoint.getEndpointReference(W3CEndpointReference.class, (Element[])null), null);
+ assertEndpointReference(endpoint1.getEndpointReference(DOMUtils.parse(TEST_ELEMENT)), TEST_ELEMENT);
+ assertEndpointReference(endpoint1.getEndpointReference(W3CEndpointReference.class, (Element[])null), null);
// Return the result
PrintWriter pw = new PrintWriter(res.getWriter());
pw.print(retStr);
+ pw.close();
}
-
-
private void assertEndpointReference(EndpointReference epr, String refPar) throws IOException
{
Logger.getLogger(this.getClass()).info("epr: "+epr);
@@ -121,7 +108,6 @@
assert("http://127.0.0.1:8080/jaxws-endpoint".equals(addresses.item(0).getFirstChild().getNodeValue()));
if (refPar != null)
{
- //TODO enhance this check
assert(epr.toString().contains(refPar));
}
}
Modified: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2009-10-07 13:32:00 UTC (rev 10851)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2009-10-07 13:33:45 UTC (rev 10852)
@@ -57,12 +57,10 @@
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-endpoint?wsdl");
- WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
- assertNotNull(wsdlDefinition);
+ readWSDL(new URL("http://" + getServerHost() + ":8080/jaxws-endpoint?wsdl"));
+ readWSDL(new URL("http://" + getServerHost() + ":8080/jaxws-endpoint2/endpoint/long/path?wsdl"));
}
-
+
public void testClientAccess() throws Exception
{
// Create the port
@@ -83,4 +81,11 @@
assertEquals("hello-world", br.readLine());
}
+ private void readWSDL(URL wsdlURL) throws Exception
+ {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
+ assertNotNull(wsdlDefinition);
+ }
+
}
15 years, 3 months
JBossWS SVN: r10851 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-07 09:32:00 -0400 (Wed, 07 Oct 2009)
New Revision: 10851
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java
Log:
Extends new JAXBBindingCustomization class in spi
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java 2009-10-07 13:16:21 UTC (rev 10850)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBBindingCustomization.java 2009-10-07 13:32:00 UTC (rev 10851)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.core.jaxws;
-import org.jboss.wsf.spi.binding.BindingCustomization;
-
import com.sun.xml.bind.api.JAXBRIContext;
/**
@@ -33,7 +31,7 @@
* @author Heiko.Braun(a)jboss.com
* Created: Jun 28, 2007
*/
-public class JAXBBindingCustomization extends BindingCustomization
+public class JAXBBindingCustomization extends org.jboss.wsf.spi.binding.JAXBBindingCustomization
{
// Use an alternative RuntimeAnnotationReader implementation
public final static String ANNOTATION_READER = JAXBRIContext.ANNOTATION_READER;
15 years, 3 months
JBossWS SVN: r10850 - stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-07 09:16:21 -0400 (Wed, 07 Oct 2009)
New Revision: 10850
Modified:
stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
Log:
[JBWS-2674][JBWS-2754] refactoring test (WIP)
Modified: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java 2009-10-07 12:19:30 UTC (rev 10849)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java 2009-10-07 13:16:21 UTC (rev 10850)
@@ -21,11 +21,9 @@
*/
package org.jboss.test.ws.jaxws.endpoint.jse;
-import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.URL;
@@ -56,25 +54,12 @@
private static int port1 = 8871;
private static int port2 = 8872;
-
-@Override
- protected void setUp() throws Exception
+ public void testDifferentPorts() throws Exception
{
-// System.setProperty(Constants.HTTP_KEEP_ALIVE, "false");
- }
-
- @Override
- protected void tearDown() throws Exception
- {
-// System.getProperties().remove(Constants.HTTP_KEEP_ALIVE);
- }
-
- public void testTwoPorts() throws Exception
- {
- String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint1";
+ String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint";
Endpoint endpoint1 = publishEndpoint1(Endpoint1Impl.class, publishURL1);
- String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint2";
+ String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint";
Endpoint endpoint2 = publishEndpoint2(new Endpoint1Impl(), publishURL2);
invokeEndpoint1(publishURL1);
@@ -84,12 +69,12 @@
endpoint2.stop();
}
- public void testTwoPortsAndLongPaths() throws Exception
+ public void testDifferentPortsAndLongPaths() throws Exception
{
- String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
+ String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/long/path";
Endpoint endpoint1 = publishEndpoint3(Endpoint1Impl.class, publishURL1);
- String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/number2";
+ String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/long/path";
Endpoint endpoint2 = publishEndpoint1(new Endpoint1Impl(), publishURL2);
invokeEndpoint1(publishURL1);
@@ -99,7 +84,7 @@
endpoint2.stop();
}
- public void testTwoPortsAndAlmostIdenticalLongPaths() throws Exception
+ public void testSamePortsAndAlmostIdenticalLongPaths() throws Exception
{
String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
Endpoint endpoint1 = publishEndpoint2(Endpoint1Impl.class, publishURL1);
@@ -114,7 +99,7 @@
endpoint2.stop();
}
- public void testTwoPortsAndIdenticalPaths() throws Exception
+ public void testDifferentPortsAndIdenticalPaths() throws Exception
{
String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
Endpoint endpoint1 = publishEndpoint1(Endpoint1Impl.class, publishURL1);
@@ -129,7 +114,7 @@
endpoint2.stop();
}
- public void testEndpointException() throws Exception
+ public void testEndpointThrowingException() throws Exception
{
String publishURL = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
Endpoint endpoint = publishEndpoint3(Endpoint1Impl.class, publishURL);
@@ -137,7 +122,7 @@
endpoint.stop();
}
- public void testAttachments() throws Exception
+ public void testEndpointProcessingAttachments() throws Exception
{
for (int i = 0; i < 2; i++)
{
@@ -211,37 +196,18 @@
DataSource ds = new DataSource()
{
-
- public String getContentType()
- {
- return "text/plain";
- }
-
- public InputStream getInputStream() throws IOException
- {
- return new ByteArrayInputStream("some string".getBytes());
- }
-
- public String getName()
- {
- return "unspecified";
- }
-
- public OutputStream getOutputStream() throws IOException
- {
- throw new UnsupportedOperationException();
- }
-
+ public String getContentType() { return "text/plain"; }
+ public InputStream getInputStream() throws IOException { return new ByteArrayInputStream("some string".getBytes()); }
+ public String getName() { return "none"; }
+ public OutputStream getOutputStream() throws IOException { return null; }
};
-
DataHandler dh = new DataHandler(ds);
DHResponse response = port.echoDataHandler(new DHRequest(dh));
assertNotNull(response);
- Object content = getContent(response.getDataHandler());
- String contentType = response.getDataHandler().getContentType();
-
+ Object content = response.getDataHandler().getContent();
assertEquals("Server data", content);
+ String contentType = response.getDataHandler().getContentType();
assertEquals("text/plain", contentType);
}
@@ -258,23 +224,4 @@
return (Endpoint1Iface)service.getPort(Endpoint1Iface.class, features);
}
- private Object getContent(DataHandler dh) throws IOException
- {
- Object content = dh.getContent();
-
- // Metro returns an ByteArrayInputStream
- if (content instanceof InputStream)
- {
- try
- {
- BufferedReader br = new BufferedReader(new InputStreamReader((InputStream)content));
- return br.readLine();
- }
- finally
- {
- ((InputStream)content).close();
- }
- }
- return content;
- }
}
15 years, 3 months