[jboss-cvs] JBossAS SVN: r97120 - in projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk: src/test/java/org/jboss/test/osgi/jbossxb and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Nov 28 02:55:51 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-11-28 02:55:50 -0500 (Sat, 28 Nov 2009)
New Revision: 97120

Added:
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/refresh/
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/refresh/RefreshServiceTestCase.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/BasicXMLBindingTestCase.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/BookingActivator.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CompanyType.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/ContactType.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CourseBooking.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/StudentType.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-booking.bnd
Removed:
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CompanyType.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/ContactType.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CourseBooking.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/StudentType.java
Modified:
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/scripts/antrun-test-jars.xml
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xsd
   projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-unmarshaller.bnd
Log:
Add refresh test case

Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/scripts/antrun-test-jars.xml	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/scripts/antrun-test-jars.xml	2009-11-28 07:55:50 UTC (rev 97120)
@@ -45,7 +45,8 @@
 
     <!-- Please add alphabetically -->
 
-    <!-- simple-unmarshaller -->
+    <!-- simple -->
+    <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/simple-booking.jar" files="${tests.resources.dir}/simple/simple-booking.bnd" />
     <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/simple-unmarshaller.jar" files="${tests.resources.dir}/simple/simple-unmarshaller.bnd" />
   	
     <!-- Please add alphabetically -->

Deleted: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -1,111 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.jbossxb;
-
-//$Id$
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assume.assumeNotNull;
-
-import java.net.URL;
-
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.RuntimeContext;
-import org.jboss.osgi.jbossxb.UnmarshallerService;
-import org.jboss.osgi.jbossxb.XMLBindingCapability;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.test.osgi.jbossxb.simple.CourseBooking;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Test XMLBindingService
- * 
- * @author thomas.diesler at jboss.com
- * @since 26-Nov-2009
- */
-public class BasicXMLBindingTestCase extends OSGiTest
-{
-   @RuntimeContext
-   public BundleContext context;
-
-   private OSGiRuntime runtime;
-
-   @Before
-   public void setUp() throws Exception
-   {
-      if (context == null)
-      {
-         runtime = getDefaultRuntime();
-         runtime.addCapability(new HuskyCapability());
-         runtime.addCapability(new XMLBindingCapability());
-         
-         OSGiBundle bundle = runtime.installBundle("simple-unmarshaller.jar");
-         bundle.start();
-      }
-   }
-
-   @After
-   public void tearDown() throws BundleException
-   {
-      if (context == null)
-         runtime.shutdown();
-   }
-
-   @Test
-   public void testUnmarshaller() throws Exception
-   {
-      if (context == null)
-         BridgeFactory.getBridge().run();
-      
-      assumeNotNull(context);
-      
-      ServiceReference sref = context.getServiceReference(UnmarshallerService.class.getName());
-      assertNotNull("UnmarshallerService available", sref);
-      
-      UnmarshallerService unmarshaller = (UnmarshallerService)context.getService(sref);
-      unmarshaller.setSchemaValidation(true);
-      unmarshaller.setNamespaceAware(true);
-      unmarshaller.setValidation(true);
-      
-      Bundle bundle = context.getBundle();
-      URL xsdurl = bundle.getEntry("booking.xsd");
-      assertNotNull("booking.xsd available", xsdurl);
-      
-      URL xmlurl = bundle.getEntry("booking.xml");
-      assertNotNull("booking.xml available", xmlurl);
-      
-      unmarshaller.registerSchemaLocation("http://org.jboss.test.osgi.jbossxb.simple/booking.xsd", xsdurl.toExternalForm());
-      unmarshaller.addClassBinding(CourseBooking.NAMESPACE_XML_SIMPLE, CourseBooking.class);
-      
-      CourseBooking booking = (CourseBooking)unmarshaller.unmarshal(xmlurl.toExternalForm());
-      assertNotNull("booking not null", booking);
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/apitest/UnmarshallerTestCase.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -28,7 +28,7 @@
 import java.net.URL;
 
 import org.jboss.osgi.testing.OSGiTest;
-import org.jboss.test.osgi.jbossxb.simple.CourseBooking;
+import org.jboss.test.osgi.jbossxb.simple.bundle.CourseBooking;
 import org.jboss.util.xml.JBossEntityResolver;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;

Added: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/refresh/RefreshServiceTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/refresh/RefreshServiceTestCase.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/refresh/RefreshServiceTestCase.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.jbossxb.refresh;
+
+//$Id: BasicXMLBindingTestCase.java 97031 2009-11-26 14:54:08Z thomas.diesler at jboss.com $
+
+import static org.junit.Assert.*;
+import static org.junit.Assume.assumeNotNull;
+
+import org.jboss.osgi.husky.BridgeFactory;
+import org.jboss.osgi.husky.HuskyCapability;
+import org.jboss.osgi.husky.RuntimeContext;
+import org.jboss.osgi.jbossxb.XMLBindingCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiPackageAdmin;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.test.osgi.jbossxb.simple.bundle.BookingActivator;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * Test XMLBindingService
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 26-Nov-2009
+ */
+public class RefreshServiceTestCase extends OSGiTest
+{
+   @Test
+   public void testUnmarshaller() throws Exception
+   {
+      OSGiRuntime runtime = getDefaultRuntime();
+      try
+      {
+         runtime.addCapability(new XMLBindingCapability());
+         
+         OSGiBundle serviceBundle = runtime.getBundle("jboss-osgi-xml-binding", null);
+         serviceBundle.start();
+         
+         OSGiBundle userBundle = runtime.installBundle("simple-booking.jar");
+         userBundle.start();
+         userBundle.uninstall();
+
+         serviceBundle.uninstall();
+         
+         OSGiPackageAdmin packageAdmin = runtime.getPackageAdmin();
+         packageAdmin.refreshPackages(null);
+
+         serviceBundle = runtime.installBundle("bundles/jboss-osgi-xml-binding.jar");
+         serviceBundle.start();
+         
+         userBundle = runtime.installBundle("simple-booking.jar");
+         userBundle.start();
+      }
+      finally
+      {
+         runtime.shutdown();
+      }
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/BasicXMLBindingTestCase.java (from rev 97114, projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/BasicXMLBindingTestCase.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/BasicXMLBindingTestCase.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/BasicXMLBindingTestCase.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.jbossxb.simple;
+
+//$Id$
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assume.assumeNotNull;
+
+import java.net.URL;
+
+import org.jboss.osgi.husky.BridgeFactory;
+import org.jboss.osgi.husky.HuskyCapability;
+import org.jboss.osgi.husky.RuntimeContext;
+import org.jboss.osgi.jbossxb.UnmarshallerService;
+import org.jboss.osgi.jbossxb.XMLBindingCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.test.osgi.jbossxb.simple.bundle.CourseBooking;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Test XMLBindingService
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 26-Nov-2009
+ */
+public class BasicXMLBindingTestCase extends OSGiTest
+{
+   @RuntimeContext
+   public BundleContext context;
+
+   private OSGiRuntime runtime;
+
+   @Before
+   public void setUp() throws Exception
+   {
+      if (context == null)
+      {
+         runtime = getDefaultRuntime();
+         runtime.addCapability(new HuskyCapability());
+         runtime.addCapability(new XMLBindingCapability());
+         
+         OSGiBundle bundle = runtime.installBundle("simple-unmarshaller.jar");
+         bundle.start();
+      }
+   }
+
+   @After
+   public void tearDown() throws BundleException
+   {
+      if (context == null)
+         runtime.shutdown();
+   }
+
+   @Test
+   public void testUnmarshaller() throws Exception
+   {
+      if (context == null)
+         BridgeFactory.getBridge().run();
+      
+      assumeNotNull(context);
+      
+      ServiceReference sref = context.getServiceReference(UnmarshallerService.class.getName());
+      assertNotNull("UnmarshallerService available", sref);
+      
+      UnmarshallerService unmarshaller = (UnmarshallerService)context.getService(sref);
+      unmarshaller.setSchemaValidation(true);
+      unmarshaller.setNamespaceAware(true);
+      unmarshaller.setValidation(true);
+      
+      Bundle bundle = context.getBundle();
+      URL xsdurl = bundle.getEntry("booking.xsd");
+      assertNotNull("booking.xsd available", xsdurl);
+      
+      URL xmlurl = bundle.getEntry("booking.xml");
+      assertNotNull("booking.xml available", xmlurl);
+      
+      unmarshaller.registerSchemaLocation("http://org.jboss.test.osgi.jbossxb.simple/booking.xsd", xsdurl.toExternalForm());
+      unmarshaller.addClassBinding(CourseBooking.NAMESPACE_XML_SIMPLE, CourseBooking.class);
+      
+      CourseBooking booking = (CourseBooking)unmarshaller.unmarshal(xmlurl.toExternalForm());
+      assertNotNull("booking not null", booking);
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CompanyType.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CompanyType.java	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CompanyType.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -1,126 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.21 at 10:48:55 AM CEST 
-//
-
-
-package org.jboss.test.osgi.jbossxb.simple;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-
-/**
- * <p>Java class for companyType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="companyType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="address" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
- *         &lt;element ref="{}contact"/>
- *       &lt;/sequence>
- *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "companyType", propOrder = {
-    "address",
-    "contact"
-})
-public class CompanyType {
-
-    @XmlElement(required = true)
-    protected Object address;
-    @XmlElement(required = true)
-    protected ContactType contact;
-    @XmlAttribute
-    protected String name;
-
-    /**
-     * Gets the value of the address property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Object }
-     *     
-     */
-    public Object getAddress() {
-        return address;
-    }
-
-    /**
-     * Sets the value of the address property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Object }
-     *     
-     */
-    public void setAddress(Object value) {
-        this.address = value;
-    }
-
-    /**
-     * Gets the value of the contact property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link ContactType }
-     *     
-     */
-    public ContactType getContact() {
-        return contact;
-    }
-
-    /**
-     * Sets the value of the contact property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link ContactType }
-     *     
-     */
-    public void setContact(ContactType value) {
-        this.contact = value;
-    }
-
-    /**
-     * Gets the value of the name property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the value of the name property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setName(String value) {
-        this.name = value;
-    }
-
-}

Deleted: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/ContactType.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/ContactType.java	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/ContactType.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -1,119 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.21 at 10:48:55 AM CEST 
-//
-
-
-package org.jboss.test.osgi.jbossxb.simple;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for contactType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="contactType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="telephone" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="email" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "contactType", propOrder = {})
-public class ContactType {
-
-    @XmlAttribute(required = true)
-    protected String name;
-    @XmlAttribute(required = true)
-    protected String telephone;
-    @XmlAttribute(required = true)
-    protected String email;
-
-    /**
-     * Gets the value of the name property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the value of the name property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setName(String value) {
-        this.name = value;
-    }
-
-    /**
-     * Gets the value of the telephone property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getTelephone() {
-        return telephone;
-    }
-
-    /**
-     * Sets the value of the telephone property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setTelephone(String value) {
-        this.telephone = value;
-    }
-
-    /**
-     * Gets the value of the email property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getEmail() {
-        return email;
-    }
-
-    /**
-     * Sets the value of the email property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setEmail(String value) {
-        this.email = value;
-    }
-
-}

Deleted: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CourseBooking.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CourseBooking.java	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CourseBooking.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -1,231 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.21 at 10:48:55 AM CEST 
-//
-
-package org.jboss.test.osgi.jbossxb.simple;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.datatype.XMLGregorianCalendar;
-
-import org.jboss.xb.annotations.JBossXmlSchema;
-
-/**
- * <p>Java class for courseBooking complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="courseBooking">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element ref="{}company"/>
- *         &lt;element ref="{}student" maxOccurs="unbounded"/>
- *       &lt;/sequence>
- *       &lt;attribute name="courseReference" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="courseDate" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
- *       &lt;attribute name="invoiceReference" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="totalPrice" use="required" type="{http://www.w3.org/2001/XMLSchema}decimal" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at JBossXmlSchema(namespace = CourseBooking.NAMESPACE_XML_SIMPLE, elementFormDefault = XmlNsForm.QUALIFIED)
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "courseBooking", propOrder = { "company", "student" })
-public class CourseBooking
-{
-   public static final String NAMESPACE_XML_SIMPLE = "http://org.jboss.test.osgi.jbossxb.simple";
-
-   @XmlElement(required = true)
-   protected CompanyType company;
-   @XmlElement(required = true)
-   protected List<StudentType> student;
-   @XmlAttribute(required = true)
-   protected String courseReference;
-   @XmlAttribute(required = true)
-   @XmlSchemaType(name = "date")
-   protected XMLGregorianCalendar courseDate;
-   @XmlAttribute(required = true)
-   protected String invoiceReference;
-   @XmlAttribute(required = true)
-   protected BigDecimal totalPrice;
-
-   /**
-    * Gets the value of the company property.
-    * 
-    * @return
-    *     possible object is
-    *     {@link CompanyType }
-    *     
-    */
-   public CompanyType getCompany()
-   {
-      return company;
-   }
-
-   /**
-    * Sets the value of the company property.
-    * 
-    * @param value
-    *     allowed object is
-    *     {@link CompanyType }
-    *     
-    */
-   public void setCompany(CompanyType value)
-   {
-      this.company = value;
-   }
-
-   /**
-    * Gets the value of the student property.
-    * 
-    * <p>
-    * This accessor method returns a reference to the live list,
-    * not a snapshot. Therefore any modification you make to the
-    * returned list will be present inside the JAXB object.
-    * This is why there is not a <CODE>set</CODE> method for the student property.
-    * 
-    * <p>
-    * For example, to add a new item, do as follows:
-    * <pre>
-    *    getStudent().add(newItem);
-    * </pre>
-    * 
-    * 
-    * <p>
-    * Objects of the following type(s) are allowed in the list
-    * {@link StudentType }
-    * 
-    * 
-    */
-   public List<StudentType> getStudent()
-   {
-      if (student == null)
-      {
-         student = new ArrayList<StudentType>();
-      }
-      return this.student;
-   }
-
-   /**
-    * Gets the value of the courseReference property.
-    * 
-    * @return
-    *     possible object is
-    *     {@link String }
-    *     
-    */
-   public String getCourseReference()
-   {
-      return courseReference;
-   }
-
-   /**
-    * Sets the value of the courseReference property.
-    * 
-    * @param value
-    *     allowed object is
-    *     {@link String }
-    *     
-    */
-   public void setCourseReference(String value)
-   {
-      this.courseReference = value;
-   }
-
-   /**
-    * Gets the value of the courseDate property.
-    * 
-    * @return
-    *     possible object is
-    *     {@link XMLGregorianCalendar }
-    *     
-    */
-   public XMLGregorianCalendar getCourseDate()
-   {
-      return courseDate;
-   }
-
-   /**
-    * Sets the value of the courseDate property.
-    * 
-    * @param value
-    *     allowed object is
-    *     {@link XMLGregorianCalendar }
-    *     
-    */
-   public void setCourseDate(XMLGregorianCalendar value)
-   {
-      this.courseDate = value;
-   }
-
-   /**
-    * Gets the value of the invoiceReference property.
-    * 
-    * @return
-    *     possible object is
-    *     {@link String }
-    *     
-    */
-   public String getInvoiceReference()
-   {
-      return invoiceReference;
-   }
-
-   /**
-    * Sets the value of the invoiceReference property.
-    * 
-    * @param value
-    *     allowed object is
-    *     {@link String }
-    *     
-    */
-   public void setInvoiceReference(String value)
-   {
-      this.invoiceReference = value;
-   }
-
-   /**
-    * Gets the value of the totalPrice property.
-    * 
-    * @return
-    *     possible object is
-    *     {@link BigDecimal }
-    *     
-    */
-   public BigDecimal getTotalPrice()
-   {
-      return totalPrice;
-   }
-
-   /**
-    * Sets the value of the totalPrice property.
-    * 
-    * @param value
-    *     allowed object is
-    *     {@link BigDecimal }
-    *     
-    */
-   public void setTotalPrice(BigDecimal value)
-   {
-      this.totalPrice = value;
-   }
-
-}

Deleted: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/StudentType.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/StudentType.java	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/StudentType.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -1,92 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.21 at 10:48:55 AM CEST 
-//
-
-
-package org.jboss.test.osgi.jbossxb.simple;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for studentType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="studentType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;attribute name="firstName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="surname" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "studentType", propOrder = {})
-public class StudentType {
-
-    @XmlAttribute(required = true)
-    protected String firstName;
-    @XmlAttribute(required = true)
-    protected String surname;
-
-    /**
-     * Gets the value of the firstName property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getFirstName() {
-        return firstName;
-    }
-
-    /**
-     * Sets the value of the firstName property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setFirstName(String value) {
-        this.firstName = value;
-    }
-
-    /**
-     * Gets the value of the surname property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getSurname() {
-        return surname;
-    }
-
-    /**
-     * Sets the value of the surname property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setSurname(String value) {
-        this.surname = value;
-    }
-
-}

Added: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/BookingActivator.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/BookingActivator.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/BookingActivator.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.jbossxb.simple.bundle;
+
+//$Id: BasicXMLBindingTestCase.java 97031 2009-11-26 14:54:08Z thomas.diesler at jboss.com $
+
+import java.net.URL;
+
+import org.jboss.osgi.jbossxb.UnmarshallerService;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A bundle activator that uses the unmarshaller service
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 26-Nov-2009
+ */
+public class BookingActivator implements BundleActivator
+{
+   public void start(BundleContext context) throws Exception
+   {
+      ServiceReference sref = context.getServiceReference(UnmarshallerService.class.getName());
+      UnmarshallerService unmarshaller = (UnmarshallerService)context.getService(sref);
+      unmarshaller.setSchemaValidation(true);
+      unmarshaller.setNamespaceAware(true);
+      unmarshaller.setValidation(true);
+      
+      Bundle bundle = context.getBundle();
+      URL xsdurl = bundle.getEntry("booking.xsd");
+      URL xmlurl = bundle.getEntry("booking.xml");
+      
+      unmarshaller.registerSchemaLocation("http://org.jboss.test.osgi.jbossxb.simple/booking.xsd", xsdurl.toExternalForm());
+      unmarshaller.addClassBinding(CourseBooking.NAMESPACE_XML_SIMPLE, CourseBooking.class);
+      
+      unmarshaller.unmarshal(xmlurl.toExternalForm());
+   }
+
+   public void stop(BundleContext context) throws Exception
+   {
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CompanyType.java (from rev 97114, projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CompanyType.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CompanyType.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CompanyType.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,126 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.21 at 10:48:55 AM CEST 
+//
+
+
+package org.jboss.test.osgi.jbossxb.simple.bundle;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+
+/**
+ * <p>Java class for companyType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="companyType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="address" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
+ *         &lt;element ref="{}contact"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "companyType", propOrder = {
+    "address",
+    "contact"
+})
+public class CompanyType {
+
+    @XmlElement(required = true)
+    protected Object address;
+    @XmlElement(required = true)
+    protected ContactType contact;
+    @XmlAttribute
+    protected String name;
+
+    /**
+     * Gets the value of the address property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getAddress() {
+        return address;
+    }
+
+    /**
+     * Sets the value of the address property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setAddress(Object value) {
+        this.address = value;
+    }
+
+    /**
+     * Gets the value of the contact property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ContactType }
+     *     
+     */
+    public ContactType getContact() {
+        return contact;
+    }
+
+    /**
+     * Sets the value of the contact property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ContactType }
+     *     
+     */
+    public void setContact(ContactType value) {
+        this.contact = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Copied: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/ContactType.java (from rev 97114, projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/ContactType.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/ContactType.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/ContactType.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,119 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.21 at 10:48:55 AM CEST 
+//
+
+
+package org.jboss.test.osgi.jbossxb.simple.bundle;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for contactType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="contactType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="telephone" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="email" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "contactType", propOrder = {})
+public class ContactType {
+
+    @XmlAttribute(required = true)
+    protected String name;
+    @XmlAttribute(required = true)
+    protected String telephone;
+    @XmlAttribute(required = true)
+    protected String email;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the telephone property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTelephone() {
+        return telephone;
+    }
+
+    /**
+     * Sets the value of the telephone property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTelephone(String value) {
+        this.telephone = value;
+    }
+
+    /**
+     * Gets the value of the email property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getEmail() {
+        return email;
+    }
+
+    /**
+     * Sets the value of the email property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setEmail(String value) {
+        this.email = value;
+    }
+
+}

Copied: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CourseBooking.java (from rev 97114, projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/CourseBooking.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CourseBooking.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/CourseBooking.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,233 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.21 at 10:48:55 AM CEST 
+//
+
+package org.jboss.test.osgi.jbossxb.simple.bundle;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * <p>Java class for courseBooking complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="courseBooking">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{}company"/>
+ *         &lt;element ref="{}student" maxOccurs="unbounded"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="courseReference" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="courseDate" use="required" type="{http://www.w3.org/2001/XMLSchema}date" />
+ *       &lt;attribute name="invoiceReference" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="totalPrice" use="required" type="{http://www.w3.org/2001/XMLSchema}decimal" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at JBossXmlSchema(namespace = CourseBooking.NAMESPACE_XML_SIMPLE, elementFormDefault = XmlNsForm.QUALIFIED)
+ at XmlRootElement(name = "booking")
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "courseBooking", propOrder = { "company", "student" })
+public class CourseBooking
+{
+   public static final String NAMESPACE_XML_SIMPLE = "http://org.jboss.test.osgi.jbossxb.simple";
+
+   @XmlElement(required = true)
+   protected CompanyType company;
+   @XmlElement(required = true)
+   protected List<StudentType> student;
+   @XmlAttribute(required = true)
+   protected String courseReference;
+   @XmlAttribute(required = true)
+   @XmlSchemaType(name = "date")
+   protected XMLGregorianCalendar courseDate;
+   @XmlAttribute(required = true)
+   protected String invoiceReference;
+   @XmlAttribute(required = true)
+   protected BigDecimal totalPrice;
+
+   /**
+    * Gets the value of the company property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link CompanyType }
+    *     
+    */
+   public CompanyType getCompany()
+   {
+      return company;
+   }
+
+   /**
+    * Sets the value of the company property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link CompanyType }
+    *     
+    */
+   public void setCompany(CompanyType value)
+   {
+      this.company = value;
+   }
+
+   /**
+    * Gets the value of the student property.
+    * 
+    * <p>
+    * This accessor method returns a reference to the live list,
+    * not a snapshot. Therefore any modification you make to the
+    * returned list will be present inside the JAXB object.
+    * This is why there is not a <CODE>set</CODE> method for the student property.
+    * 
+    * <p>
+    * For example, to add a new item, do as follows:
+    * <pre>
+    *    getStudent().add(newItem);
+    * </pre>
+    * 
+    * 
+    * <p>
+    * Objects of the following type(s) are allowed in the list
+    * {@link StudentType }
+    * 
+    * 
+    */
+   public List<StudentType> getStudent()
+   {
+      if (student == null)
+      {
+         student = new ArrayList<StudentType>();
+      }
+      return this.student;
+   }
+
+   /**
+    * Gets the value of the courseReference property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getCourseReference()
+   {
+      return courseReference;
+   }
+
+   /**
+    * Sets the value of the courseReference property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setCourseReference(String value)
+   {
+      this.courseReference = value;
+   }
+
+   /**
+    * Gets the value of the courseDate property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link XMLGregorianCalendar }
+    *     
+    */
+   public XMLGregorianCalendar getCourseDate()
+   {
+      return courseDate;
+   }
+
+   /**
+    * Sets the value of the courseDate property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link XMLGregorianCalendar }
+    *     
+    */
+   public void setCourseDate(XMLGregorianCalendar value)
+   {
+      this.courseDate = value;
+   }
+
+   /**
+    * Gets the value of the invoiceReference property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link String }
+    *     
+    */
+   public String getInvoiceReference()
+   {
+      return invoiceReference;
+   }
+
+   /**
+    * Sets the value of the invoiceReference property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link String }
+    *     
+    */
+   public void setInvoiceReference(String value)
+   {
+      this.invoiceReference = value;
+   }
+
+   /**
+    * Gets the value of the totalPrice property.
+    * 
+    * @return
+    *     possible object is
+    *     {@link BigDecimal }
+    *     
+    */
+   public BigDecimal getTotalPrice()
+   {
+      return totalPrice;
+   }
+
+   /**
+    * Sets the value of the totalPrice property.
+    * 
+    * @param value
+    *     allowed object is
+    *     {@link BigDecimal }
+    *     
+    */
+   public void setTotalPrice(BigDecimal value)
+   {
+      this.totalPrice = value;
+   }
+
+}

Copied: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/StudentType.java (from rev 97114, projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/StudentType.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/StudentType.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/java/org/jboss/test/osgi/jbossxb/simple/bundle/StudentType.java	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,92 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.21 at 10:48:55 AM CEST 
+//
+
+
+package org.jboss.test.osgi.jbossxb.simple.bundle;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for studentType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="studentType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;attribute name="firstName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="surname" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "studentType", propOrder = {})
+public class StudentType {
+
+    @XmlAttribute(required = true)
+    protected String firstName;
+    @XmlAttribute(required = true)
+    protected String surname;
+
+    /**
+     * Gets the value of the firstName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getFirstName() {
+        return firstName;
+    }
+
+    /**
+     * Sets the value of the firstName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setFirstName(String value) {
+        this.firstName = value;
+    }
+
+    /**
+     * Gets the value of the surname property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSurname() {
+        return surname;
+    }
+
+    /**
+     * Sets the value of the surname property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSurname(String value) {
+        this.surname = value;
+    }
+
+}

Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xml	2009-11-28 07:55:50 UTC (rev 97120)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<course-booking xmlns="http://org.jboss.test.osgi.jbossxb.simple" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<booking xmlns="http://org.jboss.test.osgi.jbossxb.simple" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://org.jboss.test.osgi.jbossxb.simple http://org.jboss.test.osgi.jbossxb.simple/booking.xsd"
   courseReference="Course100" courseDate="2009-11-26" invoiceReference="Ref100" totalPrice="100">
   <company name="ACME Consulting">
@@ -8,4 +8,4 @@
   </company>
   <student firstName="Jane" surname="Dow" />
   <student firstName="John" surname="Doe" />
-</course-booking>  
+</booking>  

Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xsd
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xsd	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/booking.xsd	2009-11-28 07:55:50 UTC (rev 97120)
@@ -13,7 +13,7 @@
   elementFormDefault="qualified" attributeFormDefault="unqualified"
   version="1.0.0">
   
-  <xsd:element name="course-booking" type="courseBooking" />
+  <xsd:element name="booking" type="courseBooking" />
   <xsd:complexType name="courseBooking">
     <xsd:sequence>
       <xsd:element ref="company" />

Added: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-booking.bnd
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-booking.bnd	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-booking.bnd	2009-11-28 07:55:50 UTC (rev 97120)
@@ -0,0 +1,16 @@
+# bnd build -classpath target/test-classes -output target/test-libs/simple-booking.jar src/test/resources/simple/simple-booking.bnd
+
+Bundle-SymbolicName: simple-booking
+Bundle-Activator: org.jboss.test.osgi.jbossxb.simple.bundle.BookingActivator
+Private-Package: org.jboss.test.osgi.jbossxb.simple.bundle
+
+Import-Package: \
+    javax.xml.bind.annotation, \
+    javax.xml.datatype, \
+    org.jboss.osgi.jbossxb, \
+	org.jboss.osgi.spi.capability, \
+	org.jboss.xb.annotations, \
+	org.osgi.framework
+
+Include-Resource: booking.xml, booking.xsd
+

Modified: projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-unmarshaller.bnd
===================================================================
--- projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-unmarshaller.bnd	2009-11-28 01:27:10 UTC (rev 97119)
+++ projects/jboss-osgi/projects/bundles/jboss-xml-binding/trunk/src/test/resources/simple/simple-unmarshaller.bnd	2009-11-28 07:55:50 UTC (rev 97120)
@@ -1,8 +1,8 @@
 # bnd build -classpath target/test-classes -output target/test-libs/simple-unmarshaller.jar src/test/resources/simple/simple-unmarshaller.bnd
 
 Bundle-SymbolicName: simple-unmarshaller
-Export-Package: org.jboss.test.osgi.jbossxb
-Private-Package: org.jboss.test.osgi.jbossxb.simple
+Export-Package: org.jboss.test.osgi.jbossxb.simple
+Private-Package: org.jboss.test.osgi.jbossxb.simple.bundle
 
 Import-Package: \
     javax.xml.bind.annotation, \
@@ -18,4 +18,4 @@
 Include-Resource: booking.xml, booking.xsd
 
 # Tell Husky that there are test cases in this package
-Test-Package: org.jboss.test.osgi.jbossxb
+Test-Package: org.jboss.test.osgi.jbossxb.simple




More information about the jboss-cvs-commits mailing list