servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r650577 [1/3] - in /servicemix/smx4/specs: ./ branches/ tags/ trunk/ trunk/jaxb-api/ trunk/jaxb-api/src/ trunk/jaxb-api/src/main/ trunk/jaxb-api/src/main/java/ trunk/jaxb-api/src/main/java/javax/ trunk/jaxb-api/src/main/java/javax/xml/ trun...
Date Tue, 22 Apr 2008 17:09:39 GMT
Author: gnodet
Date: Tue Apr 22 10:09:14 2008
New Revision: 650577

URL: http://svn.apache.org/viewvc?rev=650577&view=rev
Log:
SMX4-15: Make JEE specs that use the services discovery mechanism work in OSGi

Added:
    servicemix/smx4/specs/
    servicemix/smx4/specs/branches/
    servicemix/smx4/specs/tags/
    servicemix/smx4/specs/trunk/   (with props)
    servicemix/smx4/specs/trunk/jaxb-api/   (with props)
    servicemix/smx4/specs/trunk/jaxb-api/pom.xml
    servicemix/smx4/specs/trunk/jaxb-api/src/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Binder.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ContextFinder.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverter.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Element.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBContext.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBElement.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBException.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBIntrospector.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/MarshalException.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Marshaller.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ParseConversionEvent.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PrintConversionEvent.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PropertyException.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/SchemaOutputResolver.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/TypeConstraintException.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshalException.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Unmarshaller.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshallerHandler.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEvent.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventHandler.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventLocator.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationException.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Validator.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/DomHandler.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/W3CDomHandler.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessOrder.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessType.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorOrder.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorType.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyAttribute.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyElement.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttachmentRef.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttribute.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElement.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementDecl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRef.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRefs.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementWrapper.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElements.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnum.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlEnumValue.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlID.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlIDREF.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlInlineBinaryData.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlList.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMimeType.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlMixed.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNs.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlNsForm.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRegistry.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlRootElement.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchema.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaType.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlSchemaTypes.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlTransient.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlType.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlValue.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlAdapter.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentMarshaller.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/attachment/AttachmentUnmarshaller.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractMarshallerImpl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/DefaultValidationEventHandler.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/NotIdentifiableEventImpl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ParseConversionEventImpl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/PrintConversionEventImpl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventImpl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/helpers/ValidationEventLocatorImpl.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBResult.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/JAXBSource.java
    servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/util/ValidationEventCollector.java
    servicemix/smx4/specs/trunk/jaxws-api/   (with props)
    servicemix/smx4/specs/trunk/jaxws-api/pom.xml
    servicemix/smx4/specs/trunk/jaxws-api/src/
    servicemix/smx4/specs/trunk/jaxws-api/src/main/
    servicemix/smx4/specs/trunk/jaxws-api/src/main/java/
    servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/
    servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/
    servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/ws/
    servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/ws/spi/
    servicemix/smx4/specs/trunk/jaxws-api/src/main/java/javax/xml/ws/spi/FactoryFinder.java
    servicemix/smx4/specs/trunk/locator/
    servicemix/smx4/specs/trunk/locator/pom.xml
    servicemix/smx4/specs/trunk/locator/src/
    servicemix/smx4/specs/trunk/locator/src/main/
    servicemix/smx4/specs/trunk/locator/src/main/java/
    servicemix/smx4/specs/trunk/locator/src/main/java/org/
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/OsgiLocator.java
    servicemix/smx4/specs/trunk/pom.xml
    servicemix/smx4/specs/trunk/saaj-api/   (with props)
    servicemix/smx4/specs/trunk/saaj-api/pom.xml
    servicemix/smx4/specs/trunk/saaj-api/src/
    servicemix/smx4/specs/trunk/saaj-api/src/main/
    servicemix/smx4/specs/trunk/saaj-api/src/main/java/
    servicemix/smx4/specs/trunk/saaj-api/src/main/java/javax/
    servicemix/smx4/specs/trunk/saaj-api/src/main/java/javax/xml/
    servicemix/smx4/specs/trunk/saaj-api/src/main/java/javax/xml/soap/
    servicemix/smx4/specs/trunk/saaj-api/src/main/java/javax/xml/soap/FactoryFinder.java
    servicemix/smx4/specs/trunk/stax-api/   (with props)
    servicemix/smx4/specs/trunk/stax-api/pom.xml
    servicemix/smx4/specs/trunk/stax-api/src/
    servicemix/smx4/specs/trunk/stax-api/src/main/
    servicemix/smx4/specs/trunk/stax-api/src/main/java/
    servicemix/smx4/specs/trunk/stax-api/src/main/java/javax/
    servicemix/smx4/specs/trunk/stax-api/src/main/java/javax/xml/
    servicemix/smx4/specs/trunk/stax-api/src/main/java/javax/xml/stream/
    servicemix/smx4/specs/trunk/stax-api/src/main/java/javax/xml/stream/FactoryLocator.java

Propchange: servicemix/smx4/specs/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Apr 22 10:09:14 2008
@@ -0,0 +1,9 @@
+target
+*.iml
+*.ipr
+*.iws
+.classpath
+.project
+.settings
+
+

Propchange: servicemix/smx4/specs/trunk/jaxb-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Apr 22 10:09:14 2008
@@ -0,0 +1,9 @@
+target
+*.iml
+*.ipr
+*.iws
+.classpath
+.project
+.settings
+
+

Added: servicemix/smx4/specs/trunk/jaxb-api/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/pom.xml?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/pom.xml (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/pom.xml Tue Apr 22 10:09:14 2008
@@ -0,0 +1,83 @@
+<?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">
+
+  <!--
+
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+  -->
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+      <groupId>org.apache.servicemix.specs</groupId>
+      <artifactId>specs</artifactId>
+      <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.servicemix.specs</groupId>
+  <artifactId>org.apache.servicemix.specs.jaxb-api-2.0</artifactId>
+  <packaging>bundle</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>Apache ServiceMix Specs :: JAXB API</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicemix.specs</groupId>
+      <artifactId>org.apache.servicemix.specs.locator</artifactId>
+      <version>${project.version}</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+      <version>${geronimo.stax.version}</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-activation_1.1_spec</artifactId>
+      <version>${geronimo.activation.version}</version>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+
+  <build>
+      <plugins>
+          <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <executions>
+                  <execution>
+                      <goals>
+                          <goal>bundle</goal>
+                      </goals>
+                  </execution>
+              </executions>
+              <configuration>
+                  <instructions>
+                      <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                      <Export-Package>javax.xml.bind*;version=2.0;-split-package:=merge-first</Export-Package>
+                      <Import-Package>*</Import-Package>
+                      <Private-Package>org.apache.servicemix.specs.locator</Private-Package>
+                      <Bundle-Activator>org.apache.servicemix.specs.locator.Activator</Bundle-Activator>
+                  </instructions>
+                  <unpackBundle>true</unpackBundle>
+              </configuration>
+          </plugin>
+      </plugins>
+  </build>
+
+</project>

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Binder.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Binder.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Binder.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Binder.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,43 @@
+package javax.xml.bind;
+
+import javax.xml.validation.Schema;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:36:09 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class Binder<XmlNode> {
+
+    public abstract ValidationEventHandler getEventHandler() throws JAXBException;
+
+    public abstract Object getJAXBNode(XmlNode xmlNode);
+
+    public abstract Object getProperty(String name) throws PropertyException;
+
+    public abstract Schema getSchema();
+
+    public abstract XmlNode getXmlNode(Object jaxbObject);
+
+    public abstract void marshal(Object jaxbObject, XmlNode xmlNode) throws JAXBException;
+
+    public abstract void setEventHandler(ValidationEventHandler handler) throws JAXBException;
+
+    public abstract void setProperty(String name, Object value) throws PropertyException;
+
+    public abstract void setSchema(Schema schema);
+
+    public abstract Object unmarshal(XmlNode xmlNode) throws JAXBException;
+
+    public abstract <T> JAXBElement<T> unmarshal(XmlNode xmlNode, Class<T> declaredType) throws JAXBException;
+
+    public abstract Object updateJAXB(XmlNode xmlNode) throws JAXBException;
+
+    public abstract XmlNode updateXML(Object jaxbObject) throws JAXBException;
+
+    public abstract XmlNode updateXML(Object jaxbObject, XmlNode xmlNode) throws JAXBException; 
+
+    
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ContextFinder.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ContextFinder.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ContextFinder.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ContextFinder.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,279 @@
+package javax.xml.bind;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+import java.util.logging.ConsoleHandler;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.BufferedReader;
+import java.io.UnsupportedEncodingException;
+import java.io.InputStreamReader;
+
+class ContextFinder {
+
+    private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "com.sun.xml.bind.v2.ContextFactory";
+    private static final String JAXB_CONTEXT_PROPERTY = JAXBContext.class.getName();
+    private static final String JAXB_CONTEXT_FACTORY = JAXBContext.JAXB_CONTEXT_FACTORY;
+
+    ContextFinder() {
+    }
+
+    public static JAXBContext find(String contextPath, ClassLoader classLoader, Map properties) throws JAXBException {
+        String factoryClassName = null;
+
+        // Searching jaxb.properties
+        if (factoryClassName == null) {
+            StringTokenizer packages = new StringTokenizer(contextPath, ":");
+            if (!packages.hasMoreTokens()) {
+                throw new JAXBException("No package name is given");
+            }
+            while (packages.hasMoreTokens()) {
+                String packageName = packages.nextToken(":").replace('.', '/');
+                String propFileName = packageName + "/jaxb.properties";
+                Properties props = loadJAXBProperties(classLoader, propFileName);
+                if (props != null) {
+                    if (props.containsKey(JAXB_CONTEXT_FACTORY)) {
+                        factoryClassName = props.getProperty(JAXB_CONTEXT_FACTORY);
+                        break;
+                    } else {
+                        throw new JAXBException("jaxb.properties in package " + packageName + " does not contain the "
+                                                    + JAXB_CONTEXT_FACTORY + " property");
+                    }
+                }
+            }
+        }
+
+        // Searching the system property
+        if (factoryClassName == null) {
+            factoryClassName = System.getProperty(JAXB_CONTEXT_PROPERTY, null);
+        }
+
+        // Searching META-INF/services
+        if (factoryClassName == null) {
+            try {
+                String resource = "META-INF/services/" + JAXB_CONTEXT_PROPERTY;
+                InputStream resourceStream = classLoader.getResourceAsStream(resource);
+                if (resourceStream != null) {
+                    BufferedReader r = new BufferedReader(new InputStreamReader(resourceStream, "UTF-8"));
+                    factoryClassName = r.readLine().trim();
+                }
+            } catch (IOException e) {
+                throw new JAXBException(e);
+            }
+        }
+
+        // Trying to create the platform default provider
+        if (factoryClassName == null) {
+            factoryClassName = PLATFORM_DEFAULT_FACTORY_CLASS;
+        }
+
+        // Create the jaxb context
+        return newInstance(contextPath, factoryClassName, classLoader, properties);
+    }
+
+
+    public static JAXBContext find(Class classes[], Map properties) throws JAXBException {
+        String factoryClassName = null;
+
+        // Checking the packages
+        if (factoryClassName ==  null) {
+            for (Class c : classes) {
+                ClassLoader classLoader = c.getClassLoader();
+                Package pkg = c.getPackage();
+                if (pkg == null) {
+                    continue;
+                }
+                String packageName = pkg.getName().replace('.', '/');
+                String resourceName = packageName + "/jaxb.properties";
+                Properties props = loadJAXBProperties(classLoader, resourceName);
+                if (props == null) {
+                    continue;
+                }
+                if (props.containsKey(JAXBContext.JAXB_CONTEXT_FACTORY)) {
+                    factoryClassName = props.getProperty(JAXBContext.JAXB_CONTEXT_FACTORY).trim();
+                    break;
+                } else {
+                    throw new JAXBException("jaxb.properties in package " + packageName + " does not contain the " + JAXBContext.JAXB_CONTEXT_FACTORY + " property");
+                }
+            }
+        }
+
+        // Checking system property JAXB_CONTEXT_PROPERTY
+        if (factoryClassName == null) {
+            factoryClassName = System.getProperty(JAXB_CONTEXT_PROPERTY, null);
+        }
+
+        // Checking META-INF/services
+        if (factoryClassName == null) {
+            try {
+                String resource = "META-INF/services/" + JAXB_CONTEXT_PROPERTY;
+                ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+                URL resourceURL;
+                if (classLoader == null) {
+                    resourceURL = ClassLoader.getSystemResource(resource);
+                } else {
+                    resourceURL = classLoader.getResource(resource);
+                }
+                if (resourceURL != null) {
+                    BufferedReader r = new BufferedReader(new InputStreamReader(resourceURL.openStream(), "UTF-8"));
+                    factoryClassName = r.readLine().trim();
+                }
+            } catch (IOException e) {
+                throw new JAXBException(e);
+            }
+        }
+
+        // Trying to create the platform default provider
+        if (factoryClassName == null) {
+            factoryClassName = PLATFORM_DEFAULT_FACTORY_CLASS;
+        }
+
+        // Create the jaxb context
+        return newInstance(classes, properties, factoryClassName);
+    }
+
+    private static JAXBContext newInstance(String contextPath, String className, ClassLoader classLoader, Map properties) throws JAXBException {
+        Class spiClass = loadSpiClass(className, classLoader);
+        try {
+            Object context = null;
+            try {
+                Method m = spiClass.getMethod("createContext", new Class[] { String.class, ClassLoader.class, Map.class });
+                context = m.invoke(null, new Object[] { contextPath, classLoader, properties });
+            }
+            catch(NoSuchMethodException e) { }
+            if (context == null) {
+                Method m = spiClass.getMethod("createContext", new Class[] { String.class, ClassLoader.class });
+                context = m.invoke(null, new Object[] { contextPath, classLoader });
+            }
+            if (!(context instanceof JAXBContext)) {
+                handleClassCastException(context.getClass(), JAXBContext.class);
+            }
+            return (JAXBContext)context;
+        } catch(InvocationTargetException x) {
+            handleInvocationTargetException(x);
+            Throwable e = x;
+            if (x.getTargetException() != null) {
+                e = x.getTargetException();
+            }
+            throw new JAXBException("Provider " + className + " coult not be instanciated: " + e, e);
+        } catch (RuntimeException x) {
+            throw x;
+        } catch (Exception x) {
+            throw new JAXBException("Provider " + className + " coult not be instanciated: " + x, x);
+        }
+    }
+
+    private static Class loadSpiClass(String className, ClassLoader cl) throws JAXBException {
+        Class spiClass;
+        try {
+            // If inside an OSGi context, leverage it
+            spiClass = org.apache.servicemix.specs.locator.OsgiLocator.locate(JAXBContext.class.getName());
+            if (spiClass != null) {
+                return spiClass;
+            }
+        } catch (Throwable t) {
+        }
+        try {
+            if(cl != null) {
+                spiClass = cl.loadClass(className);
+            } else {
+                spiClass = Class.forName(className);
+            }
+        } catch(ClassNotFoundException e) {
+            throw new JAXBException("Provider " + className + " not found", e);
+        }
+        return spiClass;
+    }
+
+    private static JAXBContext newInstance(Class classes[], Map properties, String className) throws JAXBException {
+        Class spiClass = loadSpiClass(className, Thread.currentThread().getContextClassLoader());
+        return newInstance(classes, properties, spiClass);
+    }
+
+    private static JAXBContext newInstance(Class classes[], Map properties, Class spiClass) throws JAXBException {
+        Method m;
+        try {
+            m = spiClass.getMethod("createContext", new Class[] { Class[].class, Map.class });
+        } catch(NoSuchMethodException e) {
+            throw new JAXBException(e);
+        }
+        try {
+            Object context = m.invoke(null, new Object[] { classes, properties });
+            if (!(context instanceof JAXBContext)) {
+                handleClassCastException(context.getClass(), JAXBContext.class);
+            }
+            return (JAXBContext)context;
+        } catch(IllegalAccessException e) {
+            throw new JAXBException(e);
+        } catch(InvocationTargetException e) {
+            handleInvocationTargetException(e);
+            Throwable x = e;
+            if(e.getTargetException() != null) {
+                x = e.getTargetException();
+            }
+            throw new JAXBException(x);
+        }
+    }
+
+    private static Properties loadJAXBProperties(ClassLoader classLoader, String propFileName) throws JAXBException {
+        Properties props = null;
+        try {
+            URL url;
+            if (classLoader == null) {
+                url = ClassLoader.getSystemResource(propFileName);
+            } else {
+                url = classLoader.getResource(propFileName);
+            }
+            if (url != null) {
+                props = new Properties();
+                InputStream is = url.openStream();
+                props.load(is);
+                is.close();
+            }
+        } catch(IOException ioe) {
+            throw new JAXBException(ioe.toString(), ioe);
+        }
+        return props;
+    }
+
+    private static URL which(Class clazz, ClassLoader loader) {
+        String classnameAsResource = clazz.getName().replace('.', '/') + ".class";
+        if (loader == null) {
+            loader = ClassLoader.getSystemClassLoader();
+        }
+        return loader.getResource(classnameAsResource);
+    }
+
+    private static URL which(Class clazz) {
+        return which(clazz, clazz.getClassLoader());
+    }
+
+    private static void handleInvocationTargetException(InvocationTargetException x) throws JAXBException {
+        Throwable t = x.getTargetException();
+        if (t != null) {
+            if (t instanceof JAXBException) {
+                throw (JAXBException) t;
+            }
+            if (t instanceof RuntimeException) {
+                throw (RuntimeException) t;
+            }
+            if (t instanceof Error) {
+                throw (Error) t;
+            }
+        }
+    }
+
+    private static void handleClassCastException(Class originalType, Class targetType) throws JAXBException {
+        URL targetTypeURL = which(targetType);
+        throw new JAXBException("ClassCastException: attempting to cast " +
+                                originalType.getClass().getClassLoader().getResource("javax/xml/bind/JAXBContext.class").toString() +
+                                " to " + targetTypeURL.toString() + ".  Please make sure that you are specifying the proper ClassLoader.");
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverter.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverter.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverter.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverter.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,185 @@
+package javax.xml.bind;
+
+import java.util.Calendar;
+import java.math.BigInteger;
+import java.math.BigDecimal;
+
+import javax.xml.namespace.QName;
+import javax.xml.namespace.NamespaceContext;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:24:01 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class DatatypeConverter {
+
+    private static DatatypeConverterInterface converter = null;
+
+    private DatatypeConverter() {
+    }
+
+    public static void setDatatypeConverter(DatatypeConverterInterface converter) {
+        if (converter == null) {
+            throw new IllegalArgumentException("The DatatypeConverterInterface parameter must not be null");
+        }
+        if (DatatypeConverter.converter == null) {
+            DatatypeConverter.converter = converter;
+        }
+    }
+
+    public static String parseString(String lexicalXSDString) {
+        return converter.parseString(lexicalXSDString);
+    }
+
+    public static BigInteger parseInteger(String lexicalXSDInteger) {
+        return converter.parseInteger(lexicalXSDInteger);
+    }
+
+    public static int parseInt(String lexicalXSDInt) {
+        return converter.parseInt(lexicalXSDInt);
+    }
+
+    public static long parseLong(String lexicalXSDLong) {
+        return converter.parseLong(lexicalXSDLong);
+    }
+
+    public static short parseShort(String lexicalXSDShort) {
+        return converter.parseShort(lexicalXSDShort);
+    }
+
+    public static BigDecimal parseDecimal(String lexicalXSDDecimal) {
+        return converter.parseDecimal(lexicalXSDDecimal);
+    }
+
+    public static float parseFloat(String lexicalXSDFloat) {
+        return converter.parseFloat(lexicalXSDFloat);
+    }
+
+    public static double parseDouble(String lexicalXSDDouble) {
+        return converter.parseDouble(lexicalXSDDouble);
+    }
+
+    public static boolean parseBoolean(String lexicalXSDBoolean) {
+        return converter.parseBoolean(lexicalXSDBoolean);
+    }
+
+    public static byte parseByte(String lexicalXSDByte) {
+        return converter.parseByte(lexicalXSDByte);
+    }
+
+    public static QName parseQName(String lexicalXSDQName, NamespaceContext nsc) {
+        return converter.parseQName(lexicalXSDQName, nsc);
+    }
+
+    public static Calendar parseDateTime(String lexicalXSDDateTime) {
+        return converter.parseDateTime(lexicalXSDDateTime);
+    }
+
+    public static byte[] parseBase64Binary(String lexicalXSDBase64Binary) {
+        return converter.parseBase64Binary(lexicalXSDBase64Binary);
+    }
+
+    public static byte[] parseHexBinary(String lexicalXSDHexBinary) {
+        return converter.parseHexBinary(lexicalXSDHexBinary);
+    }
+
+    public static long parseUnsignedInt(String lexicalXSDUnsignedInt) {
+        return converter.parseUnsignedInt(lexicalXSDUnsignedInt);
+    }
+
+    public static int parseUnsignedShort(String lexicalXSDUnsignedShort) {
+        return converter.parseUnsignedShort(lexicalXSDUnsignedShort);
+    }
+
+    public static Calendar parseTime(String lexicalXSDTime) {
+        return converter.parseTime(lexicalXSDTime);
+    }
+
+    public static Calendar parseDate(String lexicalXSDDate) {
+        return converter.parseDate(lexicalXSDDate);
+    }
+
+    public static String parseAnySimpleType(String lexicalXSDAnySimpleType) {
+        return converter.parseAnySimpleType(lexicalXSDAnySimpleType);
+    }
+
+    public static String printString(String val) {
+        return converter.printString(val);
+    }
+
+    public static String printInteger(BigInteger val) {
+        return converter.printInteger(val);
+    }
+
+    public static String printInt(int val) {
+        return converter.printInt(val);
+    }
+
+    public static String printLong(long val) {
+        return converter.printLong(val);
+    }
+
+    public static String printShort(short val) {
+        return converter.printShort(val);
+    }
+
+    public static String printDecimal(BigDecimal val) {
+        return converter.printDecimal(val);
+    }
+
+    public static String printFloat(float val) {
+        return converter.printFloat(val);
+    }
+
+    public static String printDouble(double val) {
+        return converter.printDouble(val);
+    }
+
+    public static String printBoolean(boolean val) {
+        return converter.printBoolean(val);
+    }
+
+    public static String printByte(byte val) {
+        return converter.printByte(val);
+    }
+
+    public static String printQName(QName val, NamespaceContext nsc) {
+        return converter.printQName(val, nsc);
+    }
+
+    public static String printDateTime(Calendar val) {
+        return converter.printDateTime(val);
+    }
+
+    public static String printBase64Binary(byte val[]) {
+        return converter.printBase64Binary(val);
+    }
+
+    public static String printHexBinary(byte val[]) {
+        return converter.printHexBinary(val);
+    }
+
+    public static String printUnsignedInt(long val) {
+        return converter.printUnsignedInt(val);
+    }
+
+    public static String printUnsignedShort(int val) {
+        return converter.printUnsignedShort(val);
+    }
+
+    public static String printTime(Calendar val) {
+        return converter.printTime(val);
+    }
+
+    public static String printDate(Calendar val) {
+        return converter.printDate(val);
+    }
+
+    public static String printAnySimpleType(String val) {
+        return converter.printAnySimpleType(val);
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/DatatypeConverterInterface.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,95 @@
+package javax.xml.bind;
+
+import java.util.Calendar;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import javax.xml.namespace.QName;
+import javax.xml.namespace.NamespaceContext;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 8:47:04 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface DatatypeConverterInterface {
+
+    String parseAnySimpleType(String lexicalXSDAnySimpleType);
+
+    byte[] parseBase64Binary(String lexicalXSDBase64Binary);
+
+    boolean parseBoolean(String lexicalXSDBoolean);
+
+    byte parseByte(String lexicalXSDByte);
+
+    Calendar parseDate(String lexicalXSDDate);
+
+    Calendar parseDateTime(String lexicalXSDDateTime);
+
+    BigDecimal parseDecimal(String lexicalXSDDecimal);
+
+    double parseDouble(String lexicalXSDDouble);
+
+    float parseFloat(String lexicalXSDFloat);
+
+    byte[] parseHexBinary(String lexicalXSDHexBinary);
+
+    int parseInt(String lexicalXSDInt);
+
+    BigInteger parseInteger(String lexicalXSDInteger);
+
+    long parseLong(String lexicalXSDLong);
+
+    QName parseQName(String lexicalXSDQName, NamespaceContext nsc);
+
+    short parseShort(String lexicalXSDShort);
+
+    String parseString(String lexicalXSDString);
+
+    Calendar parseTime(String lexicalXSDTime);
+
+    long parseUnsignedInt(String lexicalXSDUnsignedInt);
+
+    int parseUnsignedShort(String lexicalXSDUnsignedShort);
+
+    String printAnySimpleType(String val);
+
+    String printBase64Binary(byte[] val);
+
+    String printBoolean(boolean val);
+
+    String printByte(byte val);
+
+    String printDate(Calendar val);
+
+    String printDateTime(Calendar val);
+
+    String printDecimal(BigDecimal val);
+
+    String printDouble(double val);
+
+    String printFloat(float val);
+
+    String printHexBinary(byte[] val);
+
+    String printInt(int val);
+
+    String printInteger(BigInteger val);
+
+    String printLong(long val);
+
+    String printQName(QName val, NamespaceContext nsc);
+
+    String printShort(short val);
+
+    String printString(String val);
+
+    String printTime(Calendar val);
+
+    String printUnsignedInt(long val);
+
+    String printUnsignedShort(int val);
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Element.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Element.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Element.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Element.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,11 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 8:46:33 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface Element {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBContext.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBContext.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBContext.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBContext.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,69 @@
+package javax.xml.bind;
+
+import java.util.Map;
+import java.util.Collections;
+
+import org.w3c.dom.Node;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:26:26 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class JAXBContext {
+
+    public static final String JAXB_CONTEXT_FACTORY = "javax.xml.bind.context.factory";
+
+    protected JAXBContext() {
+    }
+
+    public Binder<Node> createBinder() {
+        throw new UnsupportedOperationException();
+    }
+
+    public <T> Binder<T> createBinder(Class<T> domType) {
+        throw new UnsupportedOperationException();
+    }
+
+    public JAXBIntrospector createJAXBIntrospector() {
+        throw new UnsupportedOperationException();
+    }
+
+    public abstract Marshaller createMarshaller();
+
+    public abstract Unmarshaller createUnmarshaller();
+
+    @Deprecated
+    public abstract Validator createValidator();
+
+    public void generateSchema(SchemaOutputResolver resolver) {
+        throw new UnsupportedOperationException();
+    }
+
+    public static JAXBContext newInstance(Class... classesToBeBound) throws JAXBException {
+        return newInstance(classesToBeBound, Collections.<String, Object>emptyMap());
+    }
+
+    public static JAXBContext newInstance(Class[] classesToBeBound, Map<String, ?> properties) throws JAXBException {
+        for (Class cl : classesToBeBound) {
+            if (cl == null) {
+                throw new IllegalArgumentException();
+            }
+        }
+        return ContextFinder.find(classesToBeBound, properties);
+    }
+
+    public static JAXBContext newInstance(String contextPath) throws JAXBException {
+        return newInstance(contextPath, Thread.currentThread().getContextClassLoader());
+    }
+
+    public static JAXBContext newInstance(String contextPath, ClassLoader classLoader) throws JAXBException {
+        return newInstance(contextPath, classLoader, Collections.<String, Object>emptyMap());
+    }
+
+    public static JAXBContext newInstance(String contextPath, ClassLoader classLoader, Map<String, ?> properties) throws JAXBException {
+        return ContextFinder.find(contextPath, classLoader, properties);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBElement.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBElement.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBElement.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBElement.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,84 @@
+package javax.xml.bind;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:35:15 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JAXBElement<T> implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public static class GlobalScope {
+    }
+
+    protected final QName name;
+    protected final Class<T> declaredType;
+    protected final Class scope;
+    protected T value;
+    protected boolean nil;
+
+    public JAXBElement(QName name, Class<T> declaredType, Class scope, T value) {
+        this.nil = false;
+        if (declaredType == null || name == null) {
+            throw new IllegalArgumentException();
+        }
+        this.declaredType = declaredType;
+        if (scope == null) {
+            scope = GlobalScope.class;
+        }
+        this.scope = scope;
+        this.name = name;
+        setValue(value);
+    }
+
+    public JAXBElement(QName name, Class<T> declaredType, T value) {
+        this(name, declaredType, GlobalScope.class, value);
+    }
+
+    public Class<T> getDeclaredType() {
+        return declaredType;
+    }
+
+    public QName getName() {
+        return name;
+    }
+
+    public void setValue(T value) {
+        this.value = value;
+    }
+
+    public T getValue() {
+        return value;
+    }
+
+    public Class getScope() {
+        return scope;
+    }
+
+    public boolean isNil() {
+        return value == null || nil;
+    }
+
+    public void setNil(boolean nil) {
+        this.nil = nil;
+    }
+
+    public boolean isGlobalScope() {
+        return scope == GlobalScope.class;
+    }
+
+    public boolean isTypeSubstituted() {
+        if (value == null) {
+            return false;
+        } else {
+            return value.getClass() != declaredType;
+        }
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBException.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBException.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBException.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBException.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,57 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:07:57 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JAXBException extends Exception {
+
+    private static final long serialVersionUID = 0x5dd94775L;
+
+    private String errorCode;
+    private Throwable linkedException;
+
+    public JAXBException(String message) {
+        this(message, null, null);
+    }
+
+    public JAXBException(String message, String errorCode) {
+        this(message, errorCode, null);
+    }
+
+    public JAXBException(String message, String errorCode, Throwable cause) {
+        super(message);
+        this.errorCode = errorCode;
+        this.linkedException = cause;
+    }
+
+    public JAXBException(String message, Throwable cause) {
+        this(message, null, cause);
+    }
+
+    public JAXBException(Throwable cause) {
+        this(null, null, cause);
+    }
+
+    public String getErrorCode() {
+        return errorCode;
+    }
+
+    public Throwable getLinkedException() {
+        return getCause();
+    }
+
+    public synchronized void setLinkedException(Throwable linkedException) {
+        this.linkedException = linkedException;
+    }
+
+    public String toString() {
+        return linkedException != null ?
+                super.toString() + "\n - with linked exception:\n[" + linkedException.toString() + "]" : 
+                super.toString();
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBIntrospector.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBIntrospector.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBIntrospector.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/JAXBIntrospector.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,25 @@
+package javax.xml.bind;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:43:40 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class JAXBIntrospector {
+
+    public abstract QName getElementName(Object jaxbElement);
+
+    public static Object getValue(Object jaxbElement) {
+        if (jaxbElement instanceof JAXBElement) {
+            return ((JAXBElement) jaxbElement).getValue();
+        } else {
+            return jaxbElement;
+        }
+    }
+
+    public abstract boolean isElement(Object object);
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/MarshalException.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/MarshalException.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/MarshalException.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/MarshalException.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,31 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:20:29 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class MarshalException extends JAXBException {
+
+    public MarshalException(String message) {
+        super(message);
+    }
+
+    public MarshalException(String message, String errorCode) {
+        super(message, errorCode);
+    }
+
+    public MarshalException(String message, String errorCode, Throwable cause) {
+        super(message, errorCode, cause);
+    }
+
+    public MarshalException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public MarshalException(Throwable cause) {
+        super(cause);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Marshaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Marshaller.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Marshaller.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Marshaller.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,81 @@
+package javax.xml.bind;
+
+import java.io.OutputStream;
+import java.io.Writer;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.bind.attachment.AttachmentMarshaller;
+import javax.xml.validation.Schema;
+import javax.xml.transform.Result;
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.w3c.dom.Node;
+
+import org.xml.sax.ContentHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:03:51 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface Marshaller {
+
+    String JAXB_ENCODING = "jaxb.encoding";
+    String JAXB_FORMATTED_OUTPUT = "jaxb.formatted.output";
+    String JAXB_FRAGMENT = "jaxb.fragment";
+    String JAXB_NO_NAMESPACE_SCHEMA_LOCATION = "jaxb.noNamespaceSchemaLocation";
+    String JAXB_SCHEMA_LOCATION = "jaxb.schemaLocation";
+
+    abstract class Listener {
+        public void beforeMarshal(Object source) {
+        }
+        public void afterMarshal(Object source) {
+        }
+    }
+
+    <A extends XmlAdapter> A getAdapter(Class<A> type);
+
+    AttachmentMarshaller getAttachmentMarshaller();
+
+    ValidationEventHandler getEventHandler() throws JAXBException;
+
+    Listener getListener();
+
+    Node getNode(Object contentTree) throws JAXBException;
+
+    Object getProperty(String name) throws PropertyException;
+
+    Schema getSchema();
+
+    void marshal(Object jaxbElement, ContentHandler handler) throws JAXBException;
+
+    void marshal(Object jaxbElement, Node node) throws JAXBException;
+
+    void marshal(Object jaxbElement, OutputStream os) throws JAXBException;
+
+    void marshal(Object jaxbElement, Result result);
+
+    void marshal(Object jaxbElement, Writer writer) throws JAXBException;
+
+    void marshal(Object jaxbElement, XMLEventWriter writer) throws JAXBException;
+
+    void marshal(Object jaxbElement, XMLStreamWriter writer) throws JAXBException;
+
+    <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter);
+
+    void setAdapter(XmlAdapter adapter);
+
+    void setAttachmentMarshaller(AttachmentMarshaller am);
+
+    void setEventHandler(ValidationEventHandler handler) throws JAXBException;
+
+    void setListener(Listener listener);
+
+    void setProperty(String name, Object value) throws PropertyException;
+
+    void setSchema(Schema schema);
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/NotIdentifiableEvent.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,11 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:25:46 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface NotIdentifiableEvent extends ValidationEvent {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ParseConversionEvent.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ParseConversionEvent.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ParseConversionEvent.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ParseConversionEvent.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,11 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:26:13 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ParseConversionEvent extends ValidationEvent {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PrintConversionEvent.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PrintConversionEvent.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PrintConversionEvent.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PrintConversionEvent.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,11 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:26:32 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface PrintConversionEvent extends ValidationEvent {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PropertyException.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PropertyException.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PropertyException.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/PropertyException.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,36 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:16:01 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class PropertyException extends JAXBException {
+
+    public PropertyException(String message) {
+        super(message);
+    }
+
+    public PropertyException(String message, String errorCode) {
+        super(message, errorCode);
+    }
+
+    public PropertyException(Throwable cause) {
+        super(cause);
+    }
+
+    public PropertyException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public PropertyException(String message, String errorCode, Throwable cause) {
+        super(message, errorCode, cause);
+    }
+
+    public PropertyException(String name, Object value) {
+        super("name: " + name + ", value: " + value);
+    }
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/SchemaOutputResolver.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/SchemaOutputResolver.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/SchemaOutputResolver.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/SchemaOutputResolver.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,17 @@
+package javax.xml.bind;
+
+import java.io.IOException;
+
+import javax.xml.transform.Result;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:45:25 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public abstract class SchemaOutputResolver {
+
+    public abstract Result createOutput(String namespaceUri, String suggestedFileName) throws IOException;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/TypeConstraintException.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/TypeConstraintException.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/TypeConstraintException.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/TypeConstraintException.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,55 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:07:57 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class TypeConstraintException extends RuntimeException {
+
+    private String errorCode;
+    private Throwable linkedException;
+
+    public TypeConstraintException(String message) {
+        this(message, null, null);
+    }
+
+    public TypeConstraintException(String message, String errorCode) {
+        this(message, errorCode, null);
+    }
+
+    public TypeConstraintException(String message, String errorCode, Throwable cause) {
+        super(message);
+        this.errorCode = errorCode;
+        this.linkedException = cause;
+    }
+
+    public TypeConstraintException(String message, Throwable cause) {
+        this(message, null, cause);
+    }
+
+    public TypeConstraintException(Throwable cause) {
+        this(null, null, cause);
+    }
+
+    public String getErrorCode() {
+        return errorCode;
+    }
+
+    public Throwable getLinkedException() {
+        return getCause();
+    }
+
+    public synchronized void setLinkedException(Throwable linkedException) {
+        this.linkedException = linkedException;
+    }
+
+    public String toString() {
+        return linkedException != null ?
+                super.toString() + "\n - with linked exception:\n[" + linkedException.toString() + "]" :
+                super.toString();
+    }
+
+}
\ No newline at end of file

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshalException.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshalException.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshalException.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshalException.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,31 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:22:55 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class UnmarshalException extends JAXBException {
+
+    public UnmarshalException(String message) {
+        super(message);
+    }
+
+    public UnmarshalException(String message, String errorCode) {
+        super(message, errorCode);
+    }
+
+    public UnmarshalException(String message, String errorCode, Throwable cause) {
+        super(message, errorCode, cause);
+    }
+
+    public UnmarshalException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public UnmarshalException(Throwable cause) {
+        super(cause);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Unmarshaller.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Unmarshaller.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Unmarshaller.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Unmarshaller.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,93 @@
+package javax.xml.bind;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Reader;
+import java.net.URL;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.bind.attachment.AttachmentUnmarshaller;
+import javax.xml.validation.Schema;
+import javax.xml.transform.Source;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLStreamReader;
+
+import org.w3c.dom.Node;
+
+import org.xml.sax.InputSource;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 9:26:48 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface Unmarshaller {
+
+    abstract class Listener {
+        public void beforeUnmarshal(Object target, Object parent) {
+        }
+        public void afterUnmarshal(Object target, Object parent) {
+        }
+    }
+
+    <A extends XmlAdapter> A getAdapter(Class<A> type);
+
+    AttachmentUnmarshaller getAttachmentUnmarshaller();
+
+    ValidationEventHandler getEventHandler();
+
+    Listener getListener();
+
+    Object getProperty(String name) throws PropertyException;
+
+    Schema getSchema();
+
+    UnmarshallerHandler getUnmarshallerHandler();
+
+    boolean isValidating() throws JAXBException;
+
+    <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter);
+
+    void setAdapter(XmlAdapter adapter);
+
+    void setAttachmentUnmarshaller(AttachmentUnmarshaller au);
+
+    void setEventHandler(ValidationEventHandler handler) throws JAXBException;
+
+    void setListener(Listener listener);
+
+    void setProperty(String name, Object value) throws PropertyException;
+
+    void setSchema(Schema schema);
+
+    void setValidating(boolean validating);
+
+    Object unmarshal(File f) throws JAXBException;
+
+    Object unmarshal(InputSource source) throws JAXBException;
+
+    Object unmarshal(InputStream is) throws JAXBException;
+
+    Object unmarshal(Node node) throws JAXBException;
+
+    <T> JAXBElement<T> unmarshal(Node node, Class<T> declaredType) throws JAXBException;
+
+    Object unmarshal(Reader reader) throws JAXBException;
+
+    Object unmarshal(Source source) throws JAXBException;
+
+    <T> JAXBElement<T> unmarshal(Source source, Class<T> declaredType) throws JAXBException;
+
+    Object unmarshal(URL url) throws JAXBException;
+
+    Object unmarshal(XMLEventReader reader) throws JAXBException;
+
+    <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> declaredType) throws JAXBException;
+
+    Object unmarshal(XMLStreamReader reader) throws JAXBException;
+
+    <T> JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> declaredType) throws JAXBException;
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshallerHandler.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshallerHandler.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshallerHandler.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/UnmarshallerHandler.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,16 @@
+package javax.xml.bind;
+
+import org.xml.sax.ContentHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:05:04 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface UnmarshallerHandler extends ContentHandler {
+
+    Object getResult();
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEvent.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEvent.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEvent.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEvent.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,24 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 8:52:15 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ValidationEvent {
+
+    int ERROR = 1;
+    int FATAL_ERROR = 2;
+    int WARNING = 0;
+
+    Throwable getLinkedException();
+
+    ValidationEventLocator getLocator();
+
+    String getMessage();
+
+    int getSeverity();
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventHandler.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventHandler.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventHandler.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventHandler.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,13 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 8:51:47 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ValidationEventHandler {
+
+    boolean handleEvent(ValidationEvent event);
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventLocator.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventLocator.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventLocator.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationEventLocator.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,27 @@
+package javax.xml.bind;
+
+import java.net.URL;
+
+import org.w3c.dom.Node;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 8:53:24 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ValidationEventLocator {
+
+    int getColumnNumber();
+
+    int getLineNumber();
+
+    Node getNode();
+
+    Object getObject();
+
+    int getOffset();
+
+    URL getURL();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationException.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationException.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationException.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/ValidationException.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,31 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:23:28 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ValidationException extends JAXBException {
+
+    public ValidationException(String message) {
+        super(message);
+    }
+
+    public ValidationException(String message, String errorCode) {
+        super(message, errorCode);
+    }
+
+    public ValidationException(String message, String errorCode, Throwable cause) {
+        super(message, errorCode, cause);
+    }
+
+    public ValidationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ValidationException(Throwable cause) {
+        super(cause);
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Validator.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Validator.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Validator.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/Validator.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,23 @@
+package javax.xml.bind;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:05:54 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface Validator {
+
+    ValidationEventHandler getEventHandler() throws JAXBException;
+
+    Object getProperty(String name) throws PropertyException;
+
+    void setEventHandler(ValidationEventHandler handler) throws JAXBException;
+
+    void setProperty(String name, Object value) throws PropertyException;
+
+    boolean validate(Object subRoot) throws JAXBException;
+
+    boolean validateRoot(Object rootObj) throws JAXBException;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/DomHandler.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/DomHandler.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/DomHandler.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/DomHandler.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,21 @@
+package javax.xml.bind.annotation;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.bind.ValidationEventHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 8:49:41 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface DomHandler<ElementT, ResultT extends Result> {
+
+    ResultT createUnmarshaler(ValidationEventHandler errorHandler);
+
+    ElementT getElement(ResultT rt);
+
+    Source marshal(ElementT n, ValidationEventHandler errorHandler);
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/W3CDomHandler.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/W3CDomHandler.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/W3CDomHandler.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/W3CDomHandler.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,69 @@
+package javax.xml.bind.annotation;
+
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.Source;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.bind.ValidationEventHandler;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.DocumentFragment;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:47:25 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class W3CDomHandler implements DomHandler<Element, DOMResult> {
+
+    private DocumentBuilder builder;
+
+    public W3CDomHandler() {
+    }
+
+    public W3CDomHandler(DocumentBuilder builder) {
+        if (builder == null) {
+            throw new IllegalArgumentException();
+        }
+        this.builder = builder;
+    }
+
+    public DOMResult createUnmarshaler(ValidationEventHandler errorHandler) {
+        if (builder == null) {
+            return new DOMResult();
+        } else {
+            return new DOMResult(builder.newDocument());
+        }
+    }
+
+    public DocumentBuilder getBuilder() {
+        return builder;
+    }
+
+    public Element getElement(DOMResult rt) {
+        Node n = rt.getNode();
+        if (n instanceof Document) {
+            return ((Document)n).getDocumentElement();
+        }
+        if (n instanceof Element) {
+            return (Element)n;
+        }
+        if (n instanceof DocumentFragment) {
+            return (Element)n.getChildNodes().item(0);
+        } else {
+            throw new IllegalStateException(n.toString());
+        }
+    }
+
+    public Source marshal(Element n, ValidationEventHandler errorHandler) {
+        return new DOMSource(n);
+    }
+
+    public void setBuilder(DocumentBuilder builder) {
+        this.builder = builder;
+    }
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessOrder.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessOrder.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessOrder.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessOrder.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,15 @@
+package javax.xml.bind.annotation;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:00:58 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public enum XmlAccessOrder {
+
+    ALPHABETICAL,
+    UNDEFINED
+    
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessType.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessType.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessType.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessType.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:01:23 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public enum XmlAccessType {
+
+    FIELD,
+    NONE,
+    PROPERTY,
+    PUBLIC_MEMBER
+    
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorOrder.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorOrder.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorOrder.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorOrder.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,22 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:02:25 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.PACKAGE, ElementType.TYPE})
+public @interface XmlAccessorOrder {
+
+    XmlAccessOrder value() default XmlAccessOrder.UNDEFINED;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorType.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorType.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorType.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAccessorType.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:04:19 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value  = {ElementType.PACKAGE, ElementType.TYPE })
+public @interface XmlAccessorType {
+
+    XmlAccessType value() default XmlAccessType.PUBLIC_MEMBER;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyAttribute.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyAttribute.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyAttribute.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyAttribute.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:05:07 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value  = {ElementType.FIELD, ElementType.METHOD })
+public @interface XmlAnyAttribute {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyElement.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyElement.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyElement.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAnyElement.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,22 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:05:30 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value  = {ElementType.FIELD, ElementType.METHOD })
+public @interface XmlAnyElement {
+
+    boolean lax() default false;
+
+    Class<? extends DomHandler> value() default W3CDomHandler.class;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttachmentRef.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttachmentRef.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttachmentRef.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttachmentRef.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,18 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:06:43 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value  = {ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
+public @interface XmlAttachmentRef {
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttribute.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttribute.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttribute.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlAttribute.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,24 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:07:29 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value  = {ElementType.FIELD, ElementType.METHOD })
+public @interface XmlAttribute {
+
+    String name() default "##default";
+
+    boolean required() default false;
+
+    String namespace() default "##default";
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElement.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElement.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElement.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElement.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,33 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 10:56:39 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value  = {ElementType.TYPE, ElementType.METHOD })
+public @interface XmlElement {
+
+    class DEFAULT {
+    }
+
+    String name() default "##default";
+
+    boolean nillable() default false;
+
+    boolean required() default false;
+
+    String namespace() default "##default";
+
+    String defaultValue() default "\u0000";
+
+    Class type() default DEFAULT.class;
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementDecl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementDecl.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementDecl.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementDecl.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,35 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:08:28 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface XmlElementDecl {
+
+    class GLOBAL {
+    }
+
+    String name();
+
+    Class scope() default GLOBAL.class;
+
+    String defautValue() default "##default";
+
+    String namespace() default "##default";
+
+    String substitutionHeadNamespace() default "##default";
+
+    String substitutionHeadName() default "";
+
+    String defaultValue() default "\u0000";
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRef.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRef.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRef.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRef.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,28 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:11:11 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlElementRef {
+
+    class DEFAULT {
+    }
+
+    String name() default "##default";
+
+    String namespace() default "";
+
+    Class type() default DEFAULT.class;
+
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRefs.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRefs.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRefs.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementRefs.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,20 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:13:23 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlElementRefs {
+
+    XmlElementRef[] value();
+}

Added: servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementWrapper.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementWrapper.java?rev=650577&view=auto
==============================================================================
--- servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementWrapper.java (added)
+++ servicemix/smx4/specs/trunk/jaxb-api/src/main/java/javax/xml/bind/annotation/XmlElementWrapper.java Tue Apr 22 10:09:14 2008
@@ -0,0 +1,24 @@
+package javax.xml.bind.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Apr 17, 2008
+ * Time: 11:14:54 AM
+ * To change this template use File | Settings | File Templates.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(value = {ElementType.FIELD, ElementType.METHOD})
+public @interface XmlElementWrapper {
+
+    String name() default "##default";
+
+    String namespace() default "##default";
+
+    boolean nillable() default false;
+}



Mime
View raw message