User: jung    
  Date: 01/01/03 02:23:52

  Modified:    src/org/zoap/xml Appearance.java AppearanceException.java
                        Attribute.java AttributeException.java Binding.java
                        ComplexType.java Element.java ElementException.java
                        Environment.java Exception Design.dfClass
                        IllegalSuperTypeException.java
                        IllegalTypeException.java
                        NoCompatibleElementException.java Schema.java
                        SchemaException.java SerialisationPolicy.java
                        SimpleType.java Type.java TypeException.java
                        URNResolver.java XmlException.java
                        XmlObjectReader.java XmlObjectWriter.java
                        XmlSchemaInstance.java
  Log:
  exception redesign. Improved null-pointer treatment. coherent environment and 
logging facilities.
  
  Revision  Changes    Path
  1.3       +29 -78    zoap/src/org/zoap/xml/Appearance.java
  
  Index: Appearance.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/Appearance.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Appearance.java   2000/12/04 12:36:19     1.2
  +++ Appearance.java   2001/01/03 10:23:45     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: Appearance.java,v 1.2 2000/12/04 12:36:19 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/Appearance.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -47,8 +24,8 @@
   /**
    * Appearances are the actual tags appearing in XML documents <br>
    * Appearances are associated a type that describes their substructure in more 
detail. <br>
  - * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class Appearance implements Cloneable {
  @@ -57,8 +34,8 @@
   
        public Appearance() {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".Appearance()\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".Appearance()");
   
        }
   
  @@ -96,8 +73,8 @@
        /** sets the @arg schema that this part belongs to */
        public void setAppearanceSchema(Schema appearanceSchema) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".setAppearanceSchema(" + 
appearanceSchema + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".setAppearanceSchema(" + 
appearanceSchema + ")");
   
                this.appearanceSchema = appearanceSchema;
        }
  @@ -110,8 +87,8 @@
        /** set the @arg name of that part within the schema */
        public void setAppearanceName(String appearanceName) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".setAppearanceName(" + 
appearanceName + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".setAppearanceName(" + 
appearanceName + ")");
   
                this.appearanceName = appearanceName;
        }
  @@ -119,8 +96,8 @@
        /** overrides the default equals method to cater for schema and name-based 
equality */
        public boolean equals(Object other) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".equals(" + other + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".equals(" + other + ")");
   
                try {
                        return (other == this || 
(appearanceName.equals(((Appearance)other).appearanceName) &&
  @@ -191,38 +168,3 @@
        private Type type;
   
   }
  -
  -/*
  - *   $Log: Appearance.java,v $
  - *   Revision 1.2  2000/12/04 12:36:19  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:25  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.2  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +44 -62    zoap/src/org/zoap/xml/AppearanceException.java
  
  Index: AppearanceException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/AppearanceException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AppearanceException.java  2000/12/04 12:36:20     1.2
  +++ AppearanceException.java  2001/01/03 10:23:46     1.3
  @@ -1,77 +1,50 @@
  -/*
  - *   $Id: AppearanceException.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/AppearanceException.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
  +/**
  + * This exception is thrown whenever we face a problem within actual
  + * tag appearances (elements or attributes) inside XML documents
  + * @author jung
  + * @version $Revision: 1.3 $
  + */
  +
   public class AppearanceException extends XmlException {
  -}
  +     /** constructor with embedded throwable */
  +     public AppearanceException(Throwable throwable) {
  +             super(throwable);
  +     }
   
  -/*
  - *   $Log: AppearanceException.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:25  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/07/13 12:46:23  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *   
  - *   changed the makefile, adopted most of the licenses
  - *   
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  +     /** message-based constructor with embedded throwable */
  +     public AppearanceException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** message-based constructor */
  +     public AppearanceException(String message) {
  +             super(message);
  +     }
  +
  +     /** default constructor */
  +     public AppearanceException() {
  +     }
  +}
  
  
  
  1.3       +78 -143   zoap/src/org/zoap/xml/Attribute.java
  
  Index: Attribute.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/Attribute.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Attribute.java    2000/12/04 12:36:20     1.2
  +++ Attribute.java    2001/01/03 10:23:46     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: Attribute.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/Attribute.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -49,124 +26,73 @@
   
   /**
    * Attributes are "basic" appearances inside XML documents <br>
  - * They are tight to simple types which have just a body, but no elements and
  - * attributes by themselves. <br>
  - * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * They are tight to simple types which have just a body, but no elements and 
attributes by themselves. <br>
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class Attribute extends Appearance {
  +
  +
  +     /** set the type of this attribute to the simple type @arg type */
  +
  +     public void setType(SimpleType type) {
  +
  +             try {
  +                     super.setType(type);
  +             } catch (IllegalTypeException e) {
  +                     // will not be thrown in fact!
  +             }
   
  -  /** empty contructor */
  -  public Attribute() {
  +     }
   
  -    if(Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -      Environment.out.print(toString()+"()\n");
  +     /** set the type of this attribute to @arg type */
   
  -  }
  +     public void setType(Type type) throws IllegalTypeException {
   
  -  /**
  -   *  set the type of this attribute to @arg type
  -   */
  -
  -  public void setType(Type type) throws IllegalTypeException {
  -
  -    if(Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -      Environment.out.print(toString()+"setType("+type+")\n");
  -
  -    if(type instanceof SimpleType)
  -        setType((SimpleType) type);
  -    else
  -        throw new IllegalTypeException();
  -  }
  -
  -  /**
  -   *  set the type of this attribute to the simple type @arg type
  -   */
  -
  -  public void setType(SimpleType type) {
  -
  -    if(Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -      Environment.out.print(toString()+"setType("+type+")\n");
  -
  -    try{
  -      super.setType(type);
  -    } catch(IllegalTypeException e) {
  -      // will not be thrown in fact!
  -    }
  -
  -  }
  -
  -   /**
  -     * returns the value @return Object of the attribute from the given
  -     * java @arg object. @arg ids is a property structure that
  -     * describes the global ids that this object has been assigned in more detail.
  -     *  @throws AttributeException if the access to the attribute did not succeed.
  -     * This method is used when serialising some object.
  -     */
  -
  -    public Object getAttributeContent(Object object, boolean isNew,
  -        Properties ids) throws AttributeException {
  -      return null;
  -    }
  -
  -    /**
  -     * sets the value @arg value for this attribute into the given
  -     * java @arg object and producing a new @return Object. @arg references is a 
map that
  -     * describes the assignment of the global ids to objects.
  -     * @throws AttributeException if the access to the attribute did not succeed.
  -     * This method is used when deserialising some object.
  -     */
  -
  -    public Object setAttributeContent(Object object, Object value, Map references, 
Map nameSpaces)
  -        throws AttributeException {
  -          return object;
  -    }
  -
  -  /**
  -   * Each appearance has an associated type
  -   * with it.
  -   * @label associatedType
  -   * @directed
  -   * @clientCardinality *
  -   * @supplierCardinality 1
  -   */
  +             if (type instanceof SimpleType)
  +                     setType((SimpleType)type);
  +             else
   
  -  private SimpleType type;
  +                     throw new IllegalTypeException(toString() + ".setType(" + type 
+ "): attributes can only have simple types.");
   
  +     }
  +
  +
  +     /**
  +      * returns the value @return Object of the attribute from the given java @arg 
object. @arg ids is a property structure that
  +      * describes the global ids that this object has been assigned in more detail.
  +      *  @throws AttributeException if the access to the attribute did not succeed.
  +      * This method is used when serialising some object.
  +      */
  +
  +     public Object getAttributeContent(Object object, boolean isNew,
  +     Properties ids) throws AttributeException {
  +             return null;
  +     }
  +
  +     /**
  +      * sets the value @arg value for this attribute into the given
  +      * java @arg object and producing a new @return Object. @arg references is a 
map that
  +      * describes the assignment of the global ids to objects.
  +      * @throws AttributeException if the access to the attribute did not succeed.
  +      * This method is used when deserialising some object.
  +      */
  +
  +     public Object setAttributeContent(Object object, Object value, Map references, 
Map nameSpaces)
  +     throws AttributeException {
  +             return object;
  +     }
  +
  +     /**
  +      * Each appearance has an associated type with it.
  +      * @label associatedType
  +      * @directed
  +      * @clientCardinality *
  +      * @supplierCardinality 1
  +      */
  +
  +     private SimpleType type;
  +
   }
   
  -/*
  - *   $Log: Attribute.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:26  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.3  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:23  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +44 -61    zoap/src/org/zoap/xml/AttributeException.java
  
  Index: AttributeException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/AttributeException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttributeException.java   2000/12/04 12:36:20     1.2
  +++ AttributeException.java   2001/01/03 10:23:46     1.3
  @@ -1,76 +1,50 @@
  -/*
  - *   $Id: AttributeException.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/AttributeException.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
  +
   package org.zoap.xml;
   
  +/**
  + * exception that is thrown whenever attribute processing went wrong
  + * @author jung
  + * @version $Revision: 1.3 $
  + */
  +
   public class AttributeException extends AppearanceException {
  +     /** default constructor */
  +     public AttributeException() {
  +     }
  +
  +     /** message-based constructor */
  +     public AttributeException(String message) {
  +             super(message);
  +     }
  +
  +     /** message-based constructor with embedded throwable */
  +     public AttributeException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** constructor with embedded throwable */
  +     public AttributeException(Throwable throwable) {
  +             super(throwable);
  +     }
   }
   
  -/*
  - *   $Log: AttributeException.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:26  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/07/13 12:46:23  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *   
  - *   changed the makefile, adopted most of the licenses
  - *   
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +35 -83    zoap/src/org/zoap/xml/Binding.java
  
  Index: Binding.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/Binding.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Binding.java      2000/12/04 12:36:20     1.2
  +++ Binding.java      2001/01/03 10:23:46     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: Binding.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/Binding.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -64,8 +41,8 @@
    * shipped with infor:XML that provides support for most of the basic datatypes 
known
    * in Java/XML-Schema and additionally is able to build schema-information from
    * Java serialization information on the fly. <br>
  - * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class Binding {
  @@ -74,8 +51,8 @@
   
        public Binding() {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + "()\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + "()");
   
        }
   
  @@ -86,8 +63,8 @@
   
        public Schema addSchema(Schema schema) throws NullPointerException {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addSchema(" + schema + 
")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".addSchema(" + schema + 
")");
   
                // this could be a nice optimization elsewhere
                // most of the time, schemas will be initialized, such
  @@ -118,8 +95,8 @@
   
        public Schema removeSchema(Schema schema) throws NullPointerException {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".removeSchema(" + schema + 
")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".removeSchema(" + schema 
+ ")");
   
                if (schemas != null)
                        return (Schema)schemas.remove(schema.getUrn());
  @@ -141,8 +118,8 @@
       /*#XmlSchemaInstance lnkXmlSchemaInstance;*/
        public Schema getSchema(URN urn) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getSchema(" + urn + 
")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".getSchema(" + urn + 
")");
   
                Schema result = null;
   
  @@ -177,8 +154,8 @@
   
        public Element findElementCompatibleTo(Object object, Class clazz) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".findElementCompatibleTo(" 
+ object + "," + clazz + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + 
".findElementCompatibleTo(" + object + "," + clazz + ")");
   
                if (clazz == null)
                        if (object == null)
  @@ -235,8 +212,8 @@
   
        public Type findTypeCompatibleTo(Object object, Class clazz) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".findTypeCompatibleTo(" + 
object + "," + clazz + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".findTypeCompatibleTo(" 
+ object + "," + clazz + ")");
   
                if (clazz == null)
                        if (object == null)
  @@ -285,8 +262,8 @@
   
        public Map getDefaultNameSpaceEnvironment() {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + 
".getDefaultNameSpaceEnvironment()\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + 
".getDefaultNameSpaceEnvironment()");
   
                if (defaultNameSpaceEnvironment == null) {
   
  @@ -323,37 +300,3 @@
   
   }
   
  -/*
  - *   $Log: Binding.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:27  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.3  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:23  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +25 -82    zoap/src/org/zoap/xml/ComplexType.java
  
  Index: ComplexType.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/ComplexType.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ComplexType.java  2000/12/04 12:36:20     1.2
  +++ ComplexType.java  2001/01/03 10:23:46     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: ComplexType.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/ComplexType.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -56,8 +33,8 @@
    * <br> XML types hence correspond quite naturally to Java classes. Thus, in 
infor:X,
    * each XML type is associated with a compatible Java class from which any type
    * appearance can be derived in writing and whose instances the type can manipulate 
in reading. <br>
  - *  @author $Author: jung $
  - *  @version $Revision: 1.2 $
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   
  @@ -66,15 +43,15 @@
        /** empty constructor */
        public ComplexType() {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + "()\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + "()");
   
        }
   
    public void setSuperType(Type superType) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + 
".setSuperType("+superType+")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + 
".setSuperType("+superType+")");
   
       try{
         super.setSuperType(superType);
  @@ -86,46 +63,3 @@
   
   
   }
  -
  -/*
  - *   $Log: ComplexType.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:27  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.2  2000/07/20 14:35:28  jung
  - *   some refactoring inside infor:xml
  - *
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1.2.1  2000/07/11 08:08:34  jung
  - *   added functionality to store retrieve a part of a types elements
  - *   within "ignored" strings. Useful for writing generic handlers that
  - *   just process a part of the XML and transfer the rest.
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +25 -74    zoap/src/org/zoap/xml/Element.java
  
  Index: Element.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/Element.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Element.java      2000/12/04 12:36:20     1.2
  +++ Element.java      2001/01/03 10:23:46     1.3
  @@ -1,47 +1,23 @@
  -/*
  - *   $Id: Element.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/Element.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
  -
   package org.zoap.xml;
   
   import java.util.Properties;
  @@ -52,8 +28,8 @@
    * Elements can be tight to arbitrary types which describe their substructure in 
more detail. <br>
    * Elements could also occur in multiple instances within the same context (e.g., 
an array). <br>
    *
  - * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class Element extends Appearance  {
  @@ -64,16 +40,16 @@
   
     public Element() {
   
  -    if(Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -      Environment.out.print(toString()+"()\n");
  +    if(Environment.DEBUG_LEVEL>1)
  +      Environment.CONSOLE.log(toString()+"()");
   
     }
   
     /** setType  */
     public void setType(Type type) {
   
  -    if(Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -      Environment.out.print(toString()+".setType("+type+")\n");
  +    if(Environment.DEBUG_LEVEL>1)
  +      Environment.CONSOLE.log(toString()+".setType("+type+")");
   
       try{
           super.setType(type);
  @@ -158,37 +134,3 @@
   
   }
   
  -/*
  - *   $Log: Element.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:28  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.3  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +48 -42    zoap/src/org/zoap/xml/ElementException.java
  
  Index: ElementException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/ElementException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ElementException.java     2000/12/04 12:36:20     1.2
  +++ ElementException.java     2001/01/03 10:23:46     1.3
  @@ -1,58 +1,58 @@
  -/*
  - *   $Id: ElementException.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/ElementException.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
   /**
    * an exception that is thrown whenever something with elements has been broken.
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class ElementException extends AppearanceException {
  +     /** default constructor */
  +     public ElementException() {
  +     }
  +
  +     /** message-based constructor */
  +     public ElementException(String message) {
  +             super(message);
  +     }
  +
  +     /** message-based constructor with embedded throwable */
  +     public ElementException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** constructor with embedded throwable */
  +     public ElementException(Throwable throwable) {
  +             super(throwable);
  +     }
   }
   
   /*
    *   $Log: ElementException.java,v $
  + *   Revision 1.3  2001/01/03 10:23:46  jung
  + *   exception redesign. Improved null-pointer treatment. coherent environment and 
logging facilities.
  + *   
    *   Revision 1.2  2000/12/04 12:36:20  jung
    *   adopted to latest jboss container,
    *   
  
  
  
  1.3       +401 -369  zoap/src/org/zoap/xml/Environment.java
  
  Index: Environment.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/Environment.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Environment.java  2000/12/04 12:36:20     1.2
  +++ Environment.java  2001/01/03 10:23:46     1.3
  @@ -1,275 +1,228 @@
  -/*   
  - *   $Id: Environment.java,v 1.2 2000/12/04 12:36:20 jung Exp $ 
  - *   Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12, 
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  - * 
  - *   This program is free software; you can redistribute it and/or
  - *   modify it under the terms of the GNU General Public License
  - *   as published by the Free Software Foundation; either version 2
  - *   of the License, or (at your option) any later version.
  - *
  - *   This program 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 General Public License for more details.
  - *
  - *   You should have received a copy of the GNU General Public License
  - *   along with this program; if not, write to the Free Software
  - *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  +/*
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/Environment.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
  -
   package org.zoap.xml;
   
  -import de.infor.ce.util.URN;
  -
  -import java.util.StringTokenizer;
   import java.util.Properties;
  +import java.lang.reflect.Field;
  +import java.lang.reflect.Modifier;
  +import de.infor.ce.console.Console;
   
  -import java.io.PrintStream;
  -import java.io.InputStream;
  +import de.infor.ce.util.URN;
  +import java.util.StringTokenizer;
   
   /**
    *      Environment contains static variables and other helping stuff that either 
influence
  - *      the compilation of the package or initialise its runtime environment from 
config files.
  - *
  - *      @author $Author: jung $
  - *      @version $Revision: 1.2 $
  + * the compilation of the package or initialise its runtime environment from config 
files.
  + *      @author jung
  + *      @version $Revision: 1.3 $
    */
   
   public abstract class Environment {
   
  -  /**
  -   * whether debug messages are produced
  -   */
  -
  -  public static final boolean DEBUG_XML=false;
  -  public static final boolean DEBUG_XML_META=false;
  -
  -  /**
  -   * runtime logging settings
  -   */
  -
  -  public static int LOG_XML=0;
  -  public static int LOG_XML_META=0;
  -
  -  /**
  -   * the namespace prefix for schemas that are built up internally,
  -   * such as those generated from serializable java classes
  -   */
  -
  -  final public static URN INTERNAL_URN=
  -    new URN(new String[] {"http://xml.zoap.org/"});
  -
  -  /**
  -   * compile-time constants
  -   */
  -
  -  public final static String PROPERTY="xml";
  -  public final static String CONFIG_FILE=PROPERTY+".conf";
  -
  -  /**
  -   * runtime streams
  -   */
  -
  -  public final static PrintStream out=System.out;
  -  public final static InputStream in=System.in;
  -  public final static PrintStream err=System.err;
  -
  -  /**
  -   * the line seperator that is used after a tag has been uttered
  -   * change this to "" if you like to save a few bytes ;-)
  -   */
  -
  -  public final static String LINE_SEPERATOR= ""; //"\r\n";
  -
  -  /**
  -   * how java class features are encoded into XML tags
  -   * this must be a sign or a sequence of signs that cannot
  -   * occur in a fully qualified java class name
  -   * we use the minus sign, for the moment
  -   */
  -
  -  public static final String FEATURE_SEPERATOR="-";
  -
  -  /**
  -   * seperate a namespace prefix of a tag from its proper name
  -   */
  -
  -  public static String getNameSpacePrefix(String tag) {
  -
  -    if(Environment.DEBUG_XML)
  -      out.print(Environment.class.toString()+".getNameSpacePrefix("+tag+")\n");
  -
  -    if(tag.indexOf(":")!=-1)
  -      return tag.substring(0,tag.indexOf(":"));
  -
  -    return "";
  -  }
  -
  -  /**
  -   * seperate the proper name of a tag from its namespace prefix
  -   */
  -
  -  public static String getProperName(String tag) {
  -
  -
  -    if(Environment.DEBUG_XML)
  -      out.print(Environment.class.toString()+".getProperName("+tag+")\n");
  -
  -    if(tag.indexOf(":")!=-1)
  -      return tag.substring(tag.indexOf(":")+1);
  -
  -    return tag;
  -  }
  -
  -  /**
  -   * if @arg properClassTag is a proper xml-tag that has been
  -   * generated for a serializable Java class, this function seperates
  -   * the feature part (e.g., whether its a method, an attribute,
  -   * or an array) from it
  -   */
  -  public static String getClassFeature(String properClassTag) {
  -
  -    if(Environment.DEBUG_XML)
  -      
out.print(Environment.class.toString()+".getClassFeature("+properClassTag+")\n");
  -
  -    if(properClassTag.indexOf(FEATURE_SEPERATOR)!=-1)
  -      return properClassTag.substring(properClassTag.indexOf(FEATURE_SEPERATOR)+
  -        FEATURE_SEPERATOR.length());
  -
  -    return "";
  -  }
  -
  -  /**
  -   * if @arg properClassTag is a proper xml-tag that has been
  -   * generated for a serializable Java class, this function seperates
  -   * the class part from it
  -   */
  -  public static String getProperClassName(String properClassTag) {
  -
  -    if(Environment.DEBUG_XML)
  -      
out.print(Environment.class.toString()+".getProperClassName("+properClassTag+")\n");
  -
  -    if(properClassTag.indexOf(FEATURE_SEPERATOR)!=-1)
  -      return properClassTag.substring(0,properClassTag.indexOf(FEATURE_SEPERATOR));
  -
  -    return properClassTag;
  -  }
  -
  -
  -  /** turns a dedicated url into a class name */
  -  public static Class getClassForUrn(URN theUrn) throws ClassNotFoundException {
  -
  -    if(Environment.DEBUG_XML)
  -      out.println(Environment.class+".getClassForUrn("+theUrn+")");
  -
  -    String fullName=theUrn.toString();
  -
  -    // look if we find the internal marker
  -    if(fullName.startsWith(INTERNAL_URN.toString())) {
  -
  -      // convert the url-part into
  -      String className="";
  -
  -      StringTokenizer tokenizer=new StringTokenizer(fullName.
  -        substring(INTERNAL_URN.toString().length()),"/");
  -
  -      while(tokenizer.hasMoreTokens())
  -        className=className+tokenizer.nextToken()+".";
  -
  -      if(className.length()>0) {
  -        className=className.substring(0,className.length()-1);
  -
  -        return 
Class.forName(className,true,Thread.currentThread().getContextClassLoader());
  -      }
  -    }
  -
  -      throw new ClassNotFoundException();
  -    } // getClassForUrn
  -
  -  /**
  -   * construct a correct shortname for that class
  -   */
  -
  -  public static String getShortNameForClass(Class forClass) {
  -
  -    if(Environment.DEBUG_XML)
  -      out.println(Environment.class+".getShortNameForClass("+forClass+")");
  -
  -    // that is how we suffix arrays
  -    if(forClass.isArray())
  -      return 
getShortNameForClass(forClass.getComponentType())+FEATURE_SEPERATOR+"Array";
  -
  -    String className=forClass.getName();
  -
  -    if(className.indexOf(".")!=-1)
  -      return(className.substring(className.lastIndexOf(".")+1));
  -
  -    return className;
  -  }
  -
  -  /**
  -   * how to encode an arbitrary UTF-string into an XML-shippable form
  -   */
  -
  -  public static String encodeIntoXml(String output) {
  -
  -    if(Environment.DEBUG_XML)
  -      out.println(Environment.class+".encodeIntoXml("+output+")");
  -
  -    char[] chs = output.toCharArray();
  -    StringBuffer bf = new StringBuffer();
  -    
  -    for (int i = 0; i < chs.length; i++)
  -    {
  -      char ch = chs[i];
  -      int num = Character.getNumericValue(ch);
  -      if (Character.isISOControl(ch) || num > 0x7e) {
  -        bf.append("&#" + Integer.toString(num,16) + ";");        
  -      }
  -      else {
  -        switch (ch) {
  -          // case '!': bf.append("&excl;"); break;
  -          case '"': bf.append("&quot;"); break;
  -          // case '#': bf.append("&num;"); break;
  -          // case '$': bf.append("&dollar;"); break;
  -          // case '%': bf.append("&percnt;"); break;
  -          case '&': bf.append("&amp;"); break;
  -          case '\'': bf.append("&apos;"); break;
  -          // case '(': bf.append("&lpar;"); break;
  -          // case ')': bf.append("&rpar;"); break;
  -          // case '*': bf.append("&ast;"); break;
  -          // case '+': bf.append("&plus;"); break;
  -          // case ',': bf.append("&comma;"); break;
  -          // case '-': bf.append("&hyphen;"); break;
  -          // case '.': bf.append("&period;"); break;
  -          //case '/': bf.append("&sol;"); break;
  -          // case ':': bf.append("&col;"); break;
  -          // case ';': bf.append("&semi;"); break;
  -          case '<': bf.append("&lt;"); break;
  -          // case '=': bf.append("&equals;"); break;
  -          case '>': bf.append("&gt;"); break;
  -          // case '?': bf.append("&quest;"); break;
  -          // case '@': bf.append("&commat;"); break;
  -          // case '[': bf.append("&lsqb;"); break;
  -          // case '\\': bf.append("&bsol;"); break;
  -          // case ']': bf.append("&rsqb;"); break;
  -          case '^': bf.append("&circ;"); break;
  -          // case '_': bf.append("&horbar;"); break;
  -          // case 0x60: bf.append("&grave;"); break;
  -          // case '{': bf.append("&lcub;"); break;
  -          // case '|': bf.append("&verbar;"); break;
  -          // case '}': bf.append("&rcub;"); break;
  -          case '~': bf.append("&tilde;"); break;          
  -          default: bf.append(ch);
  -        }
  -      }
  -    }
  -    return bf.toString();
  -  }
  +     //
  +     // Place your non-final public statics here
  +     //
  +
  +     /** the namespace prefix for schemas that are built up internally, such as 
those generated from serializable java classes */
  +
  +     final public static URN INTERNAL_URN =
  +     new URN(
  +         new String[] { "http://xml.zoap.org/" }
  +         );
  +
  +     /** the line seperator that is used after a tag has been uttered change this 
to "" if you like to save a few bytes ;-) */
  +
  +     public final static String LINE_SEPERATOR = ""; //"\r";
  +
  +     /**
  +      * how java class features are encoded into XML tags this must be a sign or a 
sequence of signs that cannot
  +      * occur in a fully qualified java class name we use the minus sign, for the 
moment
  +      */
  +
  +     public static final String FEATURE_SEPERATOR = "-";
  +
  +     /** seperate a namespace prefix of a tag from its proper name */
  +
  +     public static String getNameSpacePrefix(String tag) {
  +
  +             if (tag.indexOf(":") != -1)
  +                     return tag.substring(0, tag.indexOf(":"));
  +
  +             return "";
  +     }
  +
  +     /** seperate the proper name of a tag from its namespace prefix */
  +
  +     public static String getProperName(String tag) {
  +
  +
  +             if (tag.indexOf(":") != -1)
  +                     return tag.substring(tag.indexOf(":") + 1);
  +
  +             return tag;
  +     }
  +
  +     /**
  +      * if @arg properClassTag is a proper xml-tag that has been generated for a 
serializable Java class, this function seperates
  +      * the feature part (e.g., whether its a method, an attribute, or an array) 
from it
  +      */
  +     public static String getClassFeature(String properClassTag) {
  +
  +
  +             if (properClassTag.indexOf(FEATURE_SEPERATOR) != -1)
  +                     return 
properClassTag.substring(properClassTag.indexOf(FEATURE_SEPERATOR) +
  +                     FEATURE_SEPERATOR.length());
  +
  +             return "";
  +     }
  +
  +     /**
  +      * if @arg properClassTag is a proper xml-tag that has been
  +      * generated for a serializable Java class, this function seperates the class 
part from it
  +      */
  +     public static String getProperClassName(String properClassTag) {
  +
  +             if (properClassTag.indexOf(FEATURE_SEPERATOR) != -1)
  +                     return properClassTag.substring(0, 
properClassTag.indexOf(FEATURE_SEPERATOR));
  +
  +             return properClassTag;
  +     }
  +
  +
  +     /** turns a dedicated url into a class name */
  +     public static Class getClassForUrn(URN theUrn) throws ClassNotFoundException {
  +
  +             String fullName = theUrn.toString();
  +
  +             // look if we find the internal marker
  +             if (fullName.startsWith(INTERNAL_URN.toString())) {
  +
  +                     // convert the url-part into
  +                     String className = "";
  +
  +                     StringTokenizer tokenizer = new StringTokenizer(fullName.
  +                     substring(INTERNAL_URN.toString().length()), "/");
  +
  +                     while (tokenizer.hasMoreTokens())
  +                             className = className + tokenizer.nextToken() + ".";
  +
  +                     if (className.length() > 0) {
  +                             className = className.substring(0, className.length() 
- 1);
  +
  +                             return Class.forName(className, true, 
Thread.currentThread().getContextClassLoader());
  +                     }
  +             }
  +
  +             throw new ClassNotFoundException(Environment.class.toString() +
  +             ".getClassForUrn(" + theUrn + "): could not construct proper Java 
descriptor.");
  +
  +     } // getClassForUrn
  +
  +     /** construct a correct shortname for that class */
  +
  +     public static String getShortNameForClass(Class forClass) {
  +
  +             // that is how we suffix arrays
  +             if (forClass.isArray())
  +                     return getShortNameForClass(forClass.getComponentType()) + 
FEATURE_SEPERATOR + "Array";
  +
  +             String className = forClass.getName();
  +
  +             if (className.indexOf(".") != -1)
  +                     return (className.substring(className.lastIndexOf(".") + 1));
  +
  +             return className;
  +     }
  +
  +     /** how to encode an arbitrary UTF-string into an XML-shippable form */
  +
  +     public static String encodeIntoXml(String output) {
  +
  +             char[] chs = output.toCharArray();
  +             StringBuffer bf = new StringBuffer();
  +
  +             for (int i = 0; i < chs.length; i++) {
  +                     char ch = chs[i];
  +                     int num = Character.getNumericValue(ch);
  +                     if (Character.isISOControl(ch) || num > 0x7e) {
  +                             bf.append("&#" + Integer.toString(num, 16) + ";");
  +                     }
  +                     else {
  +                             switch (ch) {
  +                                     // case '!': bf.append("&excl;"); break;
  +                                     case '"':
  +                                             bf.append("&quot;");
  +                                             break;
  +                                             // case '#': bf.append("&num;"); break;
  +                                             // case '$': bf.append("&dollar;"); 
break;
  +                                             // case '%': bf.append("&percnt;"); 
break;
  +                                     case '&':
  +                                             bf.append("&amp;");
  +                                             break;
  +                                     case '\'':
  +                                             bf.append("&apos;");
  +                                             break;
  +                                             // case '(': bf.append("&lpar;"); 
break;
  +                                             // case ')': bf.append("&rpar;"); 
break;
  +                                             // case '*': bf.append("&ast;"); break;
  +                                             // case '+': bf.append("&plus;"); 
break;
  +                                             // case ',': bf.append("&comma;"); 
break;
  +                                             // case '-': bf.append("&hyphen;"); 
break;
  +                                             // case '.': bf.append("&period;"); 
break;
  +                                             //case '/': bf.append("&sol;"); break;
  +                                             // case ':': bf.append("&col;"); break;
  +                                             // case ';': bf.append("&semi;"); 
break;
  +                                     case '<':
  +                                             bf.append("&lt;");
  +                                             break;
  +                                             // case '=': bf.append("&equals;"); 
break;
  +                                     case '>':
  +                                             bf.append("&gt;");
  +                                             break;
  +                                             // case '?': bf.append("&quest;"); 
break;
  +                                             // case '@': bf.append("&commat;"); 
break;
  +                                             // case '[': bf.append("&lsqb;"); 
break;
  +                                             // case '\\': bf.append("&bsol;"); 
break;
  +                                             // case ']': bf.append("&rsqb;"); 
break;
  +                                     case '^':
  +                                             bf.append("&circ;");
  +                                             break;
  +                                             // case '_': bf.append("&horbar;"); 
break;
  +                                             // case 0x60: bf.append("&grave;"); 
break;
  +                                             // case '{': bf.append("&lcub;"); 
break;
  +                                             // case '|': bf.append("&verbar;"); 
break;
  +                                             // case '}': bf.append("&rcub;"); 
break;
  +                                     case '~':
  +                                             bf.append("&tilde;");
  +                                             break;
  +                                     default:
  +                                             bf.append(ch);
  +                             }
  +                     }
  +             }
  +             return bf.toString();
  +     }
   
  -  static String[] toBeDecoded = {
  +     static String[] toBeDecoded = {
        "#00","\000",
        "#01","\001",
        "#02","\002",
  @@ -312,7 +265,7 @@
        "lpar","(",
        "rpar",")",
        "ast","*",
  -     "plus","+", 
  +     "plus","+",
        "comma",",",
        "hyphen","-",
        "period",".",
  @@ -335,126 +288,196 @@
        "rcub","}",
        "tilde","~" };
   
  -   static java.util.HashMap toBeDecodedMap;
  -   {
  -     toBeDecodedMap = new java.util.HashMap(toBeDecoded.length / 2);
  -     for (int i = 0; i < toBeDecoded.length / 2; i++) {
  -       toBeDecodedMap.put(toBeDecoded[i * 2],toBeDecoded[i*2 + 1]);
  -     }
  -   }
  -     
  -  /**
  -   * how to decode an arbitrary UTF-string from the XML-shippable form
  -   */
  -
  -  public static String decodeFromXml(String input) {
  -
  -    if(Environment.DEBUG_XML)
  -      out.println(Environment.class+".decodeFromXml("+input+")");
  -
  -    StringBuffer bf = new StringBuffer();
  -    int pos = 0;
  -    int slen = input.length();
  -    do {
  -      int newpos = input.indexOf('&',pos);
  -      if (newpos < 0) {
  -        bf.append(input.substring(pos));
  -        break;
  -      }
  -      else {
  -        bf.append(input.substring(pos,newpos-slen-1));
  -        int semipos = input.indexOf(";",newpos);
  -        if (semipos < 0) 
  -          throw new RuntimeException("decodeFromXml: & not closed by ;, should not 
occur in homogenous env");
  -        String ss = input.substring(newpos+1,semipos-newpos-2);
  -        String replacement = (String)toBeDecodedMap.get(ss);
  -        if (replacement == null) 
  -          throw new RuntimeException("decodeFromXml: & ... ; not decodable, should 
not occur in homogenous env");
  -        bf.append(replacement);
  -        pos = newpos + 1;
  -      }
  -    }
  -    while (pos < slen);
  -      
  -    return bf.toString();
  -  }
  -
  -    /**
  -   * how java classes are mapped to name spaces
  -   */
  -
  -  public static String getNameSpaceForClass(Class forClass) {
  -
  -    if(Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -      
Environment.out.print(Environment.class.toString()+".getNameSpace("+forClass+")\n");
  -
  -    // normal classes and arrays thereof share the same namespace
  -    if(forClass.isArray())
  -      return getNameSpaceForClass(forClass.getComponentType());
  -
  -    String properClassName=forClass.getName();
  -    String nameSpace="";
  -
  -    StringTokenizer tokenizer=new StringTokenizer(forClass.getName(),".");
  -
  -    while(tokenizer.hasMoreTokens()) {
  -      nameSpace+=tokenizer.nextToken()+"/";
  -    }
  +     static java.util.HashMap toBeDecodedMap;
  +     {
  +             toBeDecodedMap = new java.util.HashMap(toBeDecoded.length / 2);
  +             for (int i = 0; i < toBeDecoded.length / 2; i++) {
  +                     toBeDecodedMap.put(toBeDecoded[i * 2], toBeDecoded[i * 2 + 1]);
  +             }
  +     }
  +
  +     /** how to decode an arbitrary UTF-string from the XML-shippable form */
  +
  +     public static String decodeFromXml(String input) {
  +
  +             StringBuffer bf = new StringBuffer();
  +             int pos = 0;
  +             int slen = input.length();
  +             do {
  +                     int newpos = input.indexOf('&', pos);
  +                     if (newpos < 0) {
  +                             bf.append(input.substring(pos));
  +                             break;
  +                     }
  +                     else {
  +                             bf.append(input.substring(pos, newpos - slen - 1));
  +                             int semipos = input.indexOf(";", newpos);
  +                             if (semipos < 0)
  +                                     throw new 
RuntimeException(Environment.class.toString() + ".decodeFromXml(" + input + "): & not 
closed by ;, should not occur in homogenous env.");
  +                             String ss = input.substring(newpos + 1, semipos - 
newpos - 2);
  +                             String replacement = (String)toBeDecodedMap.get(ss);
  +                             if (replacement == null)
  +                                     throw new 
RuntimeException(Environment.class.toString() + ".decodeFromXml(" + input +
  +                                         "):  & ... ; not decodable, should not 
occur in homogenous env.");
  +                             bf.append(replacement);
  +                             pos = newpos + 1;
  +                     }
  +             }
  +             while (pos < slen);
  +
  +             return bf.toString();
  +     }
  +
  +     /** how java classes are mapped to name spaces */
  +
  +     public static String getNameSpaceForClass(Class forClass) {
  +
  +             // normal classes and arrays thereof share the same namespace
  +             if (forClass.isArray())
  +                     return getNameSpaceForClass(forClass.getComponentType());
  +
  +             String properClassName = forClass.getName();
  +             String nameSpace = "";
  +
  +             StringTokenizer tokenizer = new StringTokenizer(forClass.getName(), 
".");
  +
  +             while (tokenizer.hasMoreTokens()) {
  +                     nameSpace += tokenizer.nextToken() + "/";
  +             }
  +
  +             return nameSpace;
  +     }
  +
  +     //
  +     // non-final public system statics
  +     //
  +
  +     /** runtime logging settings */
  +     public static int LOG_LEVEL = 1;
  +
  +     /** the properties belonging to this module */
  +     public static Properties PROPERTIES = System.getProperties();
  +
  +     /** the logger for this module */
  +     public static Console CONSOLE = null;
  +
  +     //
  +     // final public system static
  +     //
  +
  +     /** whether debug messages are produced, compile-time switch */
  +     public static final int DEBUG_LEVEL = 0;
  +
  +     /** how this module is called */
  +     public static final String MODULE_NAME = 
Environment.class.getName().substring(0,
  +     Environment.class.getName().length() - 12);
  +
  +     /** where the resources needed to configure this module are found */
  +     public static final String RESOURCE_PATH = "";
  +
  +     /** whether a config file is loaded */
  +     public static final boolean READ_CONFIG_FILE = false;
  +
  +     /** where the resources needed to configure this module are found */
  +     public static final String CONFIG_FILE_SUFFIX = ".conf";
  +
  +     //
  +     // static initialisation part, DO NOT MODIFY
  +     //
  +
  +     /** initialisation is done at class loading time */
  +     static {
  +
  +             try {
  +                     CONSOLE = 
de.infor.ce.console.Environment.CONSOLE_FACTORY.createConsole(MODULE_NAME);
  +             } catch (Exception e) { }
  +
  +             if (READ_CONFIG_FILE) {
  +                     try {
  +
  +                             if (DEBUG_LEVEL > 0)
  +                                     CONSOLE.log(Environment.class.toString() +
  +                                     "_static initializer: trying to load 
configuration resource file " +
  +                                     RESOURCE_PATH + MODULE_NAME + 
CONFIG_FILE_SUFFIX);
  +
  +                             // and add your personal configuration file
  +                             PROPERTIES.load(Environment.class.getClassLoader().
  +                             getResourceAsStream(RESOURCE_PATH + MODULE_NAME + 
CONFIG_FILE_SUFFIX));
  +                     } catch (Exception e) {
  +
  +                             if (DEBUG_LEVEL > 0) {
  +                                     CONSOLE.error(Environment.class.toString() +
  +                                     "_static initializer: encountered " + e + " 
while trying to load configuration resource file " +
  +                                     RESOURCE_PATH + MODULE_NAME + 
CONFIG_FILE_SUFFIX);
  +                                     CONSOLE.exception(e);
  +                             }
  +                     }
  +             }
  +
  +             try {
  +                     Field[] fields = Environment.class.getFields();
  +
  +                     for (int count = 0; count < fields.length; count++) {
  +                             try {
  +                                     if 
(PROPERTIES.containsKey(fields[count].getName()) &&
  +                                     
Modifier.isStatic(fields[count].getModifiers()) &&
  +                                     
!Modifier.isFinal(fields[count].getModifiers())) {
  +
  +
  +                                             if (DEBUG_LEVEL > 0)
  +                                                     
CONSOLE.log(Environment.class.toString() +
  +                                                     "_static initializer: trying 
to initialize field " + fields[count].getName()
  +                                                     + " with configuration 
property " +
  +                                                     
PROPERTIES.getProperty(fields[count].getName()));
  +
  +                                             fields[count].setAccessible(true);
  +
  +                                             if 
(fields[count].getType().equals(boolean.class) ||
  +                                             
fields[count].getType().equals(Boolean.class)) {
  +                                                     
fields[count].set(Environment.class,
  +                                                         new 
Boolean(PROPERTIES.getProperty(fields[count].getName())));
  +                                             } else if 
(fields[count].getType().equals(int.class) ||
  +                                             
fields[count].getType().equals(Integer.class)) {
  +                                                     
fields[count].set(Environment.class,
  +                                                         new 
Integer(PROPERTIES.getProperty(fields[count].getName())));
  +                                             } else if 
(fields[count].getType().equals(double.class) ||
  +                                             
fields[count].getType().equals(Double.class)) {
  +                                                     
fields[count].set(Environment.class,
  +                                                         new 
Double(PROPERTIES.getProperty(fields[count].getName())));
  +                                             } else if 
(fields[count].getType().equals(float.class) ||
  +                                             
fields[count].getType().equals(Float.class)) {
  +                                                     
fields[count].set(Environment.class,
  +                                                         new 
Float(PROPERTIES.getProperty(fields[count].getName())));
  +                                             } else if 
(fields[count].getType().equals(String.class)) {
  +                                                     
fields[count].set(Environment.class, PROPERTIES.
  +                                                     
getProperty(fields[count].getName()));
  +                                             } else {
  +
  +                                                     if (DEBUG_LEVEL > 0)
  +                                                             
CONSOLE.warning(Environment.class.toString() +
  +                                                             "_static initializer: 
type " + fields[count].getType().getName() + " of field " +
  +                                                             
fields[count].getName() + " is not supported by the reflection configurator.");
  +
  +                                             }
  +
  +                                     }
  +                             } catch (Exception e) {
  +                                     if (DEBUG_LEVEL > 0) {
  +                                             
CONSOLE.error(Environment.class.toString() +
  +                                             "_static initializer: encountered " + 
e + " while trying to initialise field " + fields[count].getName());
  +                                             CONSOLE.exception(e);
  +                                     }
  +                             }
  +                     }
  +             } catch (Exception e) {
  +                     if (DEBUG_LEVEL > 0) {
  +                             CONSOLE.error(Environment.class.toString() +
  +                             "_static initializer: encountered " + e + " while 
trying to get class fields");
  +                             CONSOLE.exception(e);
  +                     }
  +             }
   
  -    return nameSpace;
  -  }
  +     } // static
   
   } // Environment
   
  -/*
  - * $Log: Environment.java,v $
  - * Revision 1.2  2000/12/04 12:36:20  jung
  - * adopted to latest jboss container,
  - *
  - * added decimal and date
  - *
  - * removed some problems due to forward-referencing in meta-data
  - *
  - * added serialisation policy
  - *
  - * Revision 1.2  2000/09/20 09:36:56  schoerk
  - * en-decoding of Strings
  - *
  - * Revision 1.1.1.1  2000/09/15 12:28:08  jung
  - * no message
  - *
  - * Revision 1.1.1.1  2000/08/10 21:07:29  jung
  - * Initial import.
  - *
  - *
  - * Revision 1.1.2.4  2000/08/04 17:20:19  jung
  - * close to beta stadium. Meta-Data import now works.
  - *
  - * Revision 1.1.2.3  2000/07/20 14:35:27  jung
  - * some refactoring inside infor:xml
  - *
  - * Revision 1.1.2.2  2000/07/17 12:46:18  jung
  - * refactored package and meta-model
  - *
  - * Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - * package renaming, most of the zoap stuff now under org.zoap
  - * util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - * changed the makefile, adopted most of the licenses
  - *
  - * Revision 1.2.2.1  2000/07/07 12:42:41  jung
  - * changed the method-request and response structure to be more
  - * explicit instead of just serializable (such that MS-SOAP gets the
  - * chance ot do something with that stuff).
  - *
  - * Revision 1.2  2000/07/06 16:55:06  jung
  - * moved the default binding caches in order to make apartments
  - * with different versions of the same class possible.
  - *
  - * Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - * Import of a pre beta version of ZOAP source with a new directory structure,
  - * ant-based make, apache-kind of license, etc.
  - *
  - * jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3       +41 -66    zoap/src/org/zoap/xml/IllegalSuperTypeException.java
  
  Index: IllegalSuperTypeException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/IllegalSuperTypeException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IllegalSuperTypeException.java    2000/12/04 12:36:20     1.2
  +++ IllegalSuperTypeException.java    2001/01/03 10:23:47     1.3
  @@ -1,84 +1,50 @@
  -/*
  - *   $Id: IllegalSuperTypeException.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: 
/products/cvs/ejboss/zoap/src/org/zoap/xml/IllegalSuperTypeException.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
   /**
  - * an exception that is thrown when a wrong supertype of a type has tried to been
  - * assigned.
  + * an exception that is thrown when a wrong supertype of a type has tried to be 
assigned.
  + * @author jung
  + * @version $Revision: 1.3 $
    */
  +
   public class IllegalSuperTypeException extends IllegalTypeException {
  +     /** constructor with embedded throwable */
  +     public IllegalSuperTypeException(Throwable throwable) {
  +             super(throwable);
  +     }
  +
  +     /** message-based constructor with embedded throwable */
  +     public IllegalSuperTypeException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** message-based constructor */
  +     public IllegalSuperTypeException(String message) {
  +             super(message);
  +     }
  +
  +     /** default constructor */
  +     public IllegalSuperTypeException() {
  +     }
   }
   
  -/*
  - *   $Log: IllegalSuperTypeException.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:29  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.2  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +39 -64    zoap/src/org/zoap/xml/IllegalTypeException.java
  
  Index: IllegalTypeException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/IllegalTypeException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IllegalTypeException.java 2000/12/04 12:36:20     1.2
  +++ IllegalTypeException.java 2001/01/03 10:23:48     1.3
  @@ -1,84 +1,50 @@
  -/*
  - *   $Id: IllegalTypeException.java,v 1.2 2000/12/04 12:36:20 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/IllegalTypeException.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
   /**
    * an exception that is thrown whenever a type is wrongly assigned
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class IllegalTypeException extends TypeException {
  +     /** constructor with embedded throwable */
  +     public IllegalTypeException(Throwable throwable) {
  +             super(throwable);
  +     }
  +
  +     /** message-based constructor with embedded throwable */
  +     public IllegalTypeException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** message-based constructor */
  +     public IllegalTypeException(String message) {
  +             super(message);
  +     }
  +
  +     /** default constructor */
  +     public IllegalTypeException() {
  +     }
   }
   
  -/*
  - *   $Log: IllegalTypeException.java,v $
  - *   Revision 1.2  2000/12/04 12:36:20  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:30  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.2  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +40 -67    zoap/src/org/zoap/xml/NoCompatibleElementException.java
  
  Index: NoCompatibleElementException.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/zoap/src/org/zoap/xml/NoCompatibleElementException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NoCompatibleElementException.java 2000/12/04 12:36:21     1.2
  +++ NoCompatibleElementException.java 2001/01/03 10:23:48     1.3
  @@ -1,85 +1,49 @@
  -/*
  - *   $Id: NoCompatibleElementException.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: 
/products/cvs/ejboss/zoap/src/org/zoap/xml/NoCompatibleElementException.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
   /**
  - * an exception that is thrown in XmlObjectWriter when no element for serialising
  - * a particular object could be found
  + * an exception that is thrown in XmlObjectWriter when no element for serialising a 
particular object could be found
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class NoCompatibleElementException extends ElementException {
  -}
  +     /** constructor with embedded throwable */
  +     public NoCompatibleElementException(Throwable throwable) {
  +             super(throwable);
  +     }
   
  -/*
  - *   $Log: NoCompatibleElementException.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:30  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.2  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  +     /** message-based constructor with embedded throwable */
  +     public NoCompatibleElementException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** message-based constructor */
  +     public NoCompatibleElementException(String message) {
  +             super(message);
  +     }
  +
  +     /** default constructor */
  +     public NoCompatibleElementException() {
  +     }
  +}
  
  
  
  1.3       +51 -99    zoap/src/org/zoap/xml/Schema.java
  
  Index: Schema.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/Schema.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Schema.java       2000/12/04 12:36:21     1.2
  +++ Schema.java       2001/01/03 10:23:48     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: Schema.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/Schema.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -60,8 +37,8 @@
    * conformant element/attribute substructures of such documents (and documents that 
are
    * evaluated in the context of this schema). <br> In infor:XML, schemas are 
uniquely identified via their
    * Unique Resource Name. <br>
  - * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class Schema {
  @@ -69,16 +46,16 @@
        /** empty constructor */
        public Schema() {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + "()\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + "()");
   
        }
   
        /** access the internal urn */
        public URN getUrn() {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getUrn()\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".getUrn()");
   
                return urn;
        }
  @@ -86,8 +63,8 @@
        /** access the internal urn */
        public void setUrn(URN urn) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".setUrn(" + urn + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".setUrn(" + urn + ")");
   
                this.urn = urn;
        }
  @@ -102,8 +79,8 @@
   
        public Element addElement(Element element) throws NullPointerException {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addElement(" + element + 
")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".addElement(" + element 
+ ")");
   
                try {
                        return (Element)elements.put(element.getAppearanceName(), 
element);
  @@ -127,8 +104,8 @@
   
        public Element removeElement(Element element) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".removeElement(" + element 
+ ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".removeElement(" + 
element + ")");
   
                try{
               return (Element)elements.remove(element.getAppearanceName());
  @@ -148,8 +125,8 @@
   
        public Element getElement(String name) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getElement(" + name + 
")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".getElement(" + name + 
")");
   
           try{
               return (Element) elements.get(name);
  @@ -169,8 +146,8 @@
   
        public Type addType(Type type) throws NullPointerException {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addType(" + type + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".addType(" + type + ")");
   
                try{
                    return (Type)types.put(type.getTypeName(), type);
  @@ -188,8 +165,8 @@
        /** removes a @arg type and returns the removed @return Type */
        public Type removeType(Type type) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".removeType(" + type + 
")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".removeType(" + type + 
")");
   
                try{
               return (Type)types.remove(type.getTypeName());
  @@ -208,8 +185,8 @@
   
        public Type getType(String name) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getType(" + name + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".getType(" + name + ")");
   
           try{
               return (Type)types.get(name);
  @@ -229,8 +206,8 @@
   
        public Attribute addAttribute(Attribute attribute) throws NullPointerException 
{
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addAttribute(" + 
attribute + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".addAttribute(" + 
attribute + ")");
   
                try {
                        return 
(Attribute)attributes.put(attribute.getAppearanceName(), attribute);
  @@ -254,8 +231,8 @@
   
        public Attribute removeAttribute(Attribute attribute) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".removeAttribute(" + 
attribute + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".removeAttribute(" + 
attribute + ")");
   
                try{
               return (Attribute)attributes.remove(attribute.getAppearanceName());
  @@ -272,8 +249,8 @@
   
        public Attribute getAttribute(String name) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getAttribute(" + name + 
")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".getAttribute(" + name + 
")");
   
           try{
               return (Attribute) attributes.get(name);
  @@ -301,8 +278,8 @@
        /** returns pointer-wise or urn-wise equality */
        public boolean equals(Object other) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".equals(" + other + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".equals(" + other + ")");
   
                try{
               return (other==this || urn.equals(((Schema)other).urn));
  @@ -323,8 +300,8 @@
   
        public Element findElementCompatibleTo(Object object, Class clazz) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".findElementCompatibleTo(" 
+ object + "," + clazz + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + 
".findElementCompatibleTo(" + object + "," + clazz + ")");
   
           try{
               Iterator allElements = elements.values().iterator();
  @@ -354,8 +331,8 @@
   
        public Type findTypeCompatibleTo(Object object, Class clazz) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".findTypeCompatibleTo(" + 
object + "," + clazz + ")\n");
  +             if (Environment.DEBUG_LEVEL>1)
  +                     Environment.CONSOLE.log(toString() + ".findTypeCompatibleTo(" 
+ object + "," + clazz + ")");
   
                try{
               Iterator allTypes = types.values().iterator();
  @@ -424,37 +401,3 @@
   
   }
   
  -/*
  - *   $Log: Schema.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:31  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.3  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +39 -52    zoap/src/org/zoap/xml/SchemaException.java
  
  Index: SchemaException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/SchemaException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SchemaException.java      2000/12/04 12:36:21     1.2
  +++ SchemaException.java      2001/01/03 10:23:48     1.3
  @@ -1,72 +1,50 @@
  -/*
  - *   $Id: SchemaException.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/SchemaException.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
   /**
    * an exception that is thrown inside schemas
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class SchemaException extends XmlException {
  +     /** constructor with embedded throwable */
  +     public SchemaException(Throwable throwable) {
  +             super(throwable);
  +     }
  +
  +     /** message-based constructor with embedded throwable */
  +     public SchemaException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** message-based constructor */
  +     public SchemaException(String message) {
  +             super(message);
  +     }
  +
  +     /** default constructor */
  +     public SchemaException() {
  +     }
   }
   
  -/*
  - * $Log: SchemaException.java,v $
  - * Revision 1.2  2000/12/04 12:36:21  jung
  - * adopted to latest jboss container,
  - *
  - * added decimal and date
  - *
  - * removed some problems due to forward-referencing in meta-data
  - *
  - * added serialisation policy
  - *
  - * Revision 1.1.1.1  2000/08/10 21:07:31  jung
  - * Initial import.
  - *
  - *
  - * Revision 1.1.2.2  2000/08/04 17:20:19  jung
  - * close to beta stadium. Meta-Data import now works.
  - *
  - */
  
  
  
  1.2       +20 -15    zoap/src/org/zoap/xml/SerialisationPolicy.java
  
  Index: SerialisationPolicy.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/SerialisationPolicy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SerialisationPolicy.java  2000/12/04 12:36:21     1.1
  +++ SerialisationPolicy.java  2001/01/03 10:23:49     1.2
  @@ -1,26 +1,31 @@
   /*   
  - *   $Id: SerialisationPolicy.java,v 1.1 2000/12/04 12:36:21 jung Exp $
  - *   Copyright (c) 2000 infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/SerialisationPolicy.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
    *
  - *   This program is free software; you can redistribute it and/or
  - *   modify it under the terms of the GNU General Public License
  - *   as published by the Free Software Foundation; either version 2
  - *   of the License, or (at your option) any later version.
  + * This library 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 program 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 General Public License for more details.
  + * This library 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 General Public License
  - *   along with this program; if not, write to the Free Software
  - *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  + * You should have received a copy of the GNU Lesser General Public
  + * License along with this library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
  -/** this interface must be implemented by policy objects controlling the 
serialisation depth. */
  +/** this interface must be implemented by policy objects controlling the 
serialisation
  + *  depth.
  + *   @author jung
  + *  @version $Revision: 1.2 $
  + */
   
   public interface SerialisationPolicy {
   
  
  
  
  1.3       +59 -153   zoap/src/org/zoap/xml/SimpleType.java
  
  Index: SimpleType.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/SimpleType.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleType.java   2000/12/04 12:36:21     1.2
  +++ SimpleType.java   2001/01/03 10:23:49     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: SimpleType.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/SimpleType.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -50,20 +27,12 @@
   /**
    * Simple Xml types are quite like primitive Java types. <br>
    * They occur as elements or attributes with a single body. And they can only 
subclass primitive types. <br>
  - * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class SimpleType extends Type {
   
  -     /** empty constructor */
  -     public SimpleType() {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + "()\n");
  -
  -     }
  -
        /**
         * simple types can only inherit from simple types the supertype
         * @label superType
  @@ -74,150 +43,78 @@
   
       /*#SimpleType superType;*/
   
  -     final public void setSuperType(Type superType) throws 
IllegalSuperTypeException {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".setSuperType(" + 
superType + ")\n");
  +     /** accept only simple types here */
  +     final public void setSuperType(SimpleType superType) {
   
  -             if (superType instanceof SimpleType)
  -                     setSuperType((SimpleType) superType);
  -             else
  -                     throw new IllegalSuperTypeException();
  +             try {
  +                     super.setSuperType(superType);
  +             } catch (IllegalTypeException e) {
  +                     // is not thrown in fact
  +             }
   
        }
  -
  - final public void setSuperType(SimpleType superType) {
  -
  -    try{
  -    super.setSuperType(superType);
  -    } catch(IllegalTypeException e) {
  -      // is not thrown in fact
  -    }
   
  - }
  +     /** arbitrary super types are not allowed */
   
  +     final public void setSuperType(Type superType) throws 
IllegalSuperTypeException {
  +             if(superType instanceof SimpleType) {
  +             setSuperType((SimpleType) superType);
  +        } else
  +            throw new IllegalSuperTypeException(toString() + ".setSuperType(" + 
superType +
  +             "): simple types must have simple super types.");
  +     }
   
  -    final public Attribute addAttribute(Attribute attribute) {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addAttributes(" + 
attribute + ")\n");
  -
  -        throw new UnsupportedOperationException();
  -    }
   
  -    final public Attribute removeAttribute(Attribute attribute) {
  +     /** disable attribute manipulation by overloading */
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".removeAttribute(" + 
attribute + ")\n");
  +     final public Attribute addAttribute(Attribute attribute) {
  +             throw new UnsupportedOperationException(toString() + ".addAttribute(" 
+ attribute +
  +             "): no attributes allowed in simple types.");
  +     }
   
  -        return null;
  -    }
  +     /** disable attribute manipulation by overloading */
  +     final public Attribute removeAttribute(Attribute attribute) {
  +             return null;
  +     }
   
        /** produce a collection of attributes belonging to that type - defaults to 
null */
        final public Attribute[] getAttributes(Object object) {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getAttributes(" + object 
+ ")\n");
  -
                return null;
        }
  -
  -    final public Element addElement(Element element) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addElement(" + element + 
")\n");
  -
  -        throw new UnsupportedOperationException();
  -    }
  -
  -  final public Element removeElement(Element element) {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addElement(" + element + 
")\n");
  +     /** accesses an attribute in that type indexed by its schema and name - 
defaults to null */
  +     final public Attribute getAttribute(Schema schema, String name) {
  +             return null;
  +     }
   
  -        throw new UnsupportedOperationException();
  -    }
   
  +     /** disable element manipulation by overloading */
   
  -  /** produce a collection of elements belonging to that type - defaults to null */
  -     final public Element[] getElements(Object object) {
  +     final public Element addElement(Element element) {
  +             throw new UnsupportedOperationException(toString() + ".addElement(" + 
element +
  +             "): no elements allowed in simple types.");
  +     }
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getElements(" + object + 
")\n");
  +     /** disable element manipulation by overloading */
   
  +     final public Element removeElement(Element element) {
                return null;
        }
   
  -     /** accesses an attribute in that type indexed by its schema and name - 
defaults to null */
  -     final public Attribute getAttribute(Schema schema, String name) {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getAttribute(" + schema + 
"," + name + ")\n");
  -
  +     /** produce a collection of elements belonging to that type - defaults to null 
*/
  +     final public Element[] getElements(Object object) {
                return null;
        }
   
        /** accesses a sub-element in that type indexed by its schema and name - 
defaults to null */
        final public Element getElement(Schema schema, String name) {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getElement(" + schema + 
"," + name + ")\n");
  -
                return null;
        }
   
        /** simple types cannot be referenced by ID attributes */
        final public boolean isReferencable() {
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".isReferencable()\n");
  -
                return super.isReferencable();
        }
  -
  -    
   
  +}  // SimpleType
   
  -}
  -
  -/*
  - *   $Log: SimpleType.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:32  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.2  2000/07/20 14:35:28  jung
  - *   some refactoring inside infor:xml
  - *
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1.2.1  2000/07/11 08:08:34  jung
  - *   added functionality to store retrieve a part of a types elements
  - *   within "ignored" strings. Useful for writing generic handlers that
  - *   just process a part of the XML and transfer the rest.
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +93 -233   zoap/src/org/zoap/xml/Type.java
  
  Index: Type.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/Type.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Type.java 2000/12/04 12:36:21     1.2
  +++ Type.java 2001/01/03 10:23:49     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: Type.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/Type.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -57,20 +34,12 @@
    * each XML type is associated with a compatible Java class from which any type
    * appearance can be derived in writing and whose instances the type can manipulate 
in reading. <br>
    * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   
   
   public class Type implements Cloneable {
   
  -     /** empty constructor */
  -     public Type() {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + "()\n");
  -
  -     }
  -
        /** access the supertype @return Type of this type */
        public Type getSuperType() {
                return superType;
  @@ -85,10 +54,6 @@
        /** method that decides whether this type is the supertype of the @arg type. */
   
        public boolean isSuperTypeOf(Type type) throws NullPointerException {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".isSuperTypeOf(" + type + 
")\n");
  -
                if (equals(type.getSuperType()))
                        return true;
                else if (type.getSuperType() != null)
  @@ -97,18 +62,18 @@
                        return false;
        }
   
  -    /** description of the derivation relationship */
  +     /** description of the derivation relationship */
   
  -    public int getDerivedBy() {
  -        return derivedBy;
  -    }
  +     public int getDerivedBy() {
  +             return derivedBy;
  +     }
   
        /** sets the derivation relationship */
   
  -    public void setDerivedBy(int howDerivedBy) {
  -        if(howDerivedBy==DERIVEDBY_EXTENSION || howDerivedBy==DERIVEDBY_RESTRICTION)
  -            derivedBy=howDerivedBy;
  -    }
  +     public void setDerivedBy(int howDerivedBy) {
  +             if (howDerivedBy == DERIVEDBY_EXTENSION || howDerivedBy == 
DERIVEDBY_RESTRICTION)
  +                     derivedBy = howDerivedBy;
  +     }
   
        /**
         * this method decides whether the current type can be used to serialise @arg 
object under the given @arg class.
  @@ -118,10 +83,6 @@
         */
   
        public boolean isCompatibleTo(Object object, Class clazz) {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".isCompatibleTo(" + 
object+","+clazz + ")\n");
  -
                if (associatedClass != null)
                        return associatedClass.equals(clazz);
                else
  @@ -131,19 +92,11 @@
   
        /** gets the class associated to that type */
        public Class getAssociatedClass() {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getAssociatedClass()\n");
  -
                return associatedClass;
        }
   
        /** sets the class associated to that type */
        public void setAssociatedClass(Class clazz) {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + "setAssociatedClass(" + 
clazz + ")\n");
  -
                this.associatedClass = clazz;
        }
   
  @@ -155,10 +108,6 @@
         */
   
        public String getContent(Object object) throws TypeException {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + "getContent(" + object + 
")\n");
  -
                return null;
        }
   
  @@ -169,98 +118,78 @@
         * refuses access to its internal structure. Is used for serialisation 
purposes.
         */
        public String getVerboseElements(Object object) throws TypeException {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getVerboseElements(" + 
object + ")\n");
  -
                return null;
        }
   
        /** per-default, types are not referenceable */
        public boolean isReferencable() {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".isReferencable()\n");
  -
                return false;
        }
   
        /**
         * creates a new Java object @return Object of a class compatible to that type
         * under the given references and namespaces and incorporate the given
  -      * Map of attributes to it. The attributes map (which could be null to 
indicate emptyness)
  -     * is cleared from any attributes
  -     * that have been successfully applied. This method makes use of an object 
factory
  -     * to allow configurable mapping of interfaces to concrete implementations
  -     * and easy customisation.
  +      * Map of attributes to it. The attributes map (which could be null to 
indicate emptyness) is cleared from any attributes
  +      * that have been successfully applied. This method makes use of an object 
factory
  +      * to allow configurable mapping of interfaces to concrete implementations and 
easy customisation.
         */
   
        public Object newInstance(Map attributes, Map references, Map nameSpaces) 
throws TypeException {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".newInstance(" + 
attributes + "," + references +
  -                "," + nameSpaces + ")\n");
   
  -             if (associatedClass != null) {
  -                     try {
  +             try {
   
  -                             Object target = getAssociatedClass().newInstance();
  +                     Object target = getAssociatedClass().newInstance();
   
  -                             if (attributes != null) {
  +                     if (attributes != null) {
   
  -                                     Iterator iterator = 
attributes.keySet().iterator();
  +                             Iterator iterator = attributes.keySet().iterator();
   
  -                                     while (iterator.hasNext()) {
  +                             while (iterator.hasNext()) {
   
  -                                             Attribute attribute = 
(Attribute)iterator.next();
  +                                     Attribute attribute = 
(Attribute)iterator.next();
   
  -                                             try {
  +                                     try {
   
  -                                                     target = 
attribute.setAttributeContent(target,
  -                                                             
attributes.get(attribute), references, nameSpaces);
  +                                             target = 
attribute.setAttributeContent(target,
  +                                             attributes.get(attribute), references, 
nameSpaces);
   
  -                              iterator.remove();
  +                                             iterator.remove();
   
  -                                             } catch (AttributeException e) {
  +                                     } catch (AttributeException e) {
   
  -                                                     if ((Environment.DEBUG_XML && 
Environment.DEBUG_XML_META) ||
  -                                                     (Environment.LOG_XML > 0 && 
Environment.LOG_XML_META > 0)) {
  +                                             // since we simply eat that one, log 
it if necessary
  +                                             if ((Environment.DEBUG_LEVEL > 1) ||
  +                                             (Environment.LOG_LEVEL > 1)) {
   
  -                                                             
Environment.err.print(toString() + ".newInstance(" + attributes + "," +
  -                                                             references + "," + 
nameSpaces + "): encountered attribute exception " + e + "\n");
  +                                                     
Environment.CONSOLE.error(toString() + ".newInstance(" + attributes + "," +
  +                                                     references + "," + nameSpaces 
+ "): encountered " + e.toString() +
  +                                                     " while trying to apply 
attributes after instantiation.");
   
  -                                                     }
  +                                                     
Environment.CONSOLE.exception(e);
  +                                             }
   
  -                                            iterator.remove();
  +                                             iterator.remove();
   
  -                                             }
  +                                     }
   
  -                                     } // while
  -                             }
  +                             } // while
  +                     }
   
  -                             return target;
  +                     return target;
   
  -                     } catch (IllegalAccessException e) {
  -                             throw new TypeException();
  -                     } catch (InstantiationException e) {
  -                             throw new TypeException();
  -                     } // try
  -             } else
  -                     return null;
  +             } catch (Throwable t) {
  +                     throw new TypeException(toString() + ".newInstance(" + 
attributes + "," + references + "," + nameSpaces + "): encountered " +
  +                     t.toString() + " while trying to instantiate associated 
class.", t);
  +             }
        }
   
        /**
  -     * incorporate the parsed appearance @arg body and non-validated @arg 
verboseElements into the
  -     * state of the @arg target object under the given @arg references and @arg 
nameSpaces. Produces a
  -     * new target @return Object.
  -     */
  +      * incorporate the parsed appearance @arg body and non-validated @arg 
verboseElements into the
  +      * state of the @arg target object under the given @arg references and @arg 
nameSpaces. Produces a new target @return Object.
  +      */
   
        public Object setContent(Object target, String body, String verboseElements,
  -            Map references, Map nameSpaces) throws TypeException {
  -
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".setContent(" + target + 
"," + body + "," +
  -                verboseElements + references+","+nameSpaces+")\n");
  +     Map references, Map nameSpaces) throws TypeException {
   
                return target;
        }
  @@ -273,9 +202,6 @@
        /** sets the @arg schema that this part belongs to */
        public void setTypeSchema(Schema typeSchema) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".setTypeSchema(" + 
typeSchema + ")\n");
  -
                this.typeSchema = typeSchema;
        }
   
  @@ -287,9 +213,6 @@
        /** set the @arg name of that part within the schema */
        public void setTypeName(String typeName) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".setTypeName(" + typeName 
+ ")\n");
  -
                this.typeName = typeName;
        }
   
  @@ -332,9 +255,6 @@
         */
        public Element[] getElements(Object object) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getElements(" + object + 
")\n");
  -
                // we must first flatten the substructure
                if (elements != null) {
                        Iterator schemaMapIterator = elements.values().iterator();
  @@ -359,9 +279,6 @@
         */
        public Attribute[] getAttributes(Object object) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getAttributes(" + object 
+ ")\n");
  -
                // first flatten that crazy two-level structure
                if (attributes != null) {
                        Iterator schemaMapIterator = attributes.values().iterator();
  @@ -379,9 +296,6 @@
        /** registers an additional @arg element and returns the overwritten @return 
Element. Uses a lazy initialization of elements */
        public Element addElement(Element element) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addElement(" + element + 
")\n");
  -
                if (elements == null)
                        synchronized(this) {
                                if (elements == null)
  @@ -405,9 +319,6 @@
        /** removes an @arg element and returns the removed @return Element, should 
operate recursively */
        public Element removeElement(Element element) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".removeElement(" + element 
+ ")\n");
  -
                if (elements != null) {
                        Map schemaMap = 
(Map)elements.get(element.getAppearanceSchema());
                        if (schemaMap != null)
  @@ -424,9 +335,6 @@
         */
        public Element getElement(Schema schema, String name) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getElement(" + schema + 
"," + name + ")\n");
  -
                if (schema != null) {
   
                        if (elements != null) {
  @@ -438,7 +346,7 @@
                                }
                        }
   
  -                     if (getSuperType() != null && 
getDerivedBy()!=DERIVEDBY_RESTRICTION)
  +                     if (getSuperType() != null && getDerivedBy() != 
DERIVEDBY_RESTRICTION)
                                return getSuperType().getElement(schema, name);
                        else
                                return null;
  @@ -453,9 +361,6 @@
         */
        public Attribute addAttribute(Attribute attribute) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".addAttribute(" + 
attribute + ")\n");
  -
                if (attributes == null)
                        synchronized(this) {
                                if (attributes == null)
  @@ -480,9 +385,6 @@
        /** removes an @arg attribute and returns the removed @return Attribute */
        public Attribute removeAttribute(Attribute attribute) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".removeAttribute(" + 
attribute + ")\n");
  -
                if (attributes != null) {
                        Map schemaMap = 
(Map)attributes.get(attribute.getAppearanceSchema());
                        if (schemaMap != null)
  @@ -499,9 +401,6 @@
         */
        public Attribute getAttribute(Schema schema, String name) {
   
  -             if (Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -                     Environment.out.print(toString() + ".getAttribute(" + schema + 
"," + name + ")\n");
  -
                if (schema != null) {
                        if (attributes != null) {
                                Map schemaMap = (Map)attributes.get(schema);
  @@ -512,7 +411,7 @@
                                }
                        } // if attributes
   
  -                     if (getSuperType() != null && 
getDerivedBy()!=DERIVEDBY_RESTRICTION)
  +                     if (getSuperType() != null && getDerivedBy() != 
DERIVEDBY_RESTRICTION)
                                return getSuperType().getAttribute(schema, name);
                        else
                                return null;
  @@ -521,35 +420,33 @@
                        return null;
        }
   
  -    /**
  -     * this method is to clone the actual type into some
  -     * other type with the same appearance, but a
  -     * possibly modified internal structure. It is used to
  -     * implement the copy semantics of the element-type
  -     * association in some parts of XML-Schema.
  -     */
  -
  -    public Object clone() {
  -
  -        // first construct a clone
  -        Type returnType=null;
  -
  -        try{
  -            returnType=(Type) super.clone();
  -        } catch(CloneNotSupportedException e) {
  -             // not possible, we implement it!
  -        }
  +     /**
  +      * this method is to clone the actual type into some other type with the same 
appearance, but a
  +      * possibly modified internal structure. It is used to implement the copy 
semantics of the element-type
  +      * association in some parts of XML-Schema.
  +      */
  +
  +     public Object clone() {
   
  +             // first construct a clone
  +             Type returnType = null;
   
  -        if(elements!=null)
  -             returnType.elements=(Map) ((HashMap) elements).clone();
  +             try {
  +                     returnType = (Type)super.clone();
  +             } catch (CloneNotSupportedException e) {
  +                     // not possible, we implement it!
  +             }
   
  -        if(attributes!=null)
  -             returnType.attributes=(Map) ((HashMap) attributes).clone();
   
  +             if (elements != null)
  +                     returnType.elements = (Map)((HashMap)elements).clone();
  +
  +             if (attributes != null)
  +                     returnType.attributes = (Map)((HashMap)attributes).clone();
  +
                return returnType;
   
  -    }  // clone
  +     } // clone
   
   
        /** the schema this part is belonging to */
  @@ -573,64 +470,18 @@
         */
   
        private Type superType;
  +
  +     /** how the inheritance is derived */
  +
  +     private int derivedBy;
   
  -    /**
  -     * how the inheritance is derived
  -     */
  -
  -    private int derivedBy;
  -
  -    /**
  -     * the constants which determined the inheritance relationsship
  -     */
  +     /** the constants which determined the inheritance relationsship */
   
  -    public final static int DERIVEDBY_EXTENSION=0;
  -    public final static int DERIVEDBY_RESTRICTION=1;
  +     public final static int DERIVEDBY_EXTENSION = 0;
  +     public final static int DERIVEDBY_RESTRICTION = 1;
   
        /** each complex type explodes into parts each of which are uniquely indexed 
via their name or their urn */
        private Map elements;
        private Map attributes;
   }
   
  -/*
  - *   $Log: Type.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:33  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.4  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.2  2000/07/20 14:35:28  jung
  - *   some refactoring inside infor:xml
  - *
  - *   Revision 1.1.2.1  2000/07/17 12:46:21  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1.2.1  2000/07/11 08:08:34  jung
  - *   added functionality to store retrieve a part of a types elements
  - *   within "ignored" strings. Useful for writing generic handlers that
  - *   just process a part of the XML and transfer the rest.
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +40 -67    zoap/src/org/zoap/xml/TypeException.java
  
  Index: TypeException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/TypeException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TypeException.java        2000/12/04 12:36:21     1.2
  +++ TypeException.java        2001/01/03 10:23:49     1.3
  @@ -1,84 +1,48 @@
  -/*
  - *   $Id: TypeException.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/TypeException.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
   
  -/**
  - * an exception that is thrown from methods of @see Type
  +/** an exception that is thrown from methods of @see Type
  + *  @author jung
  + *  @version $Revision: 1.3 $
    */
   
   public class TypeException extends XmlException {
  -}
  +     /** constructor with embedded throwable */
  +     public TypeException(Throwable throwable) {
  +             super(throwable);
  +     }
   
  -/*
  - *   $Log: TypeException.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:33  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.2  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:27  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  +     /** message-based constructor with embedded throwable */
  +     public TypeException(String message, Throwable throwable) {
  +             super(message, throwable);
  +     }
  +
  +     /** message-based constructor */
  +     public TypeException(String message) {
  +             super(message);
  +     }
  +
  +     /** default constructor */
  +     public TypeException() {
  +     }
  +}
  \ No newline at end of file
  
  
  
  1.3       +21 -65    zoap/src/org/zoap/xml/URNResolver.java
  
  Index: URNResolver.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/URNResolver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- URNResolver.java  2000/12/04 12:36:21     1.2
  +++ URNResolver.java  2001/01/03 10:23:49     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: URNResolver.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/URNResolver.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -55,8 +32,8 @@
    *   A URNResolver in infor:XML is an object that is able to build a new 
XmlObjectReader
    *  sitting upon a given URN and equipped with a collection of already visited urns.
    *
  - *   @author $Author: jung $
  - *   @version $Revision: 1.2 $
  + *   @author jung
  + *   @version $Revision: 1.3 $
    */
   
   public interface URNResolver {
  @@ -88,33 +65,3 @@
     }
   
   }
  -
  -/*
  - *   $Log: URNResolver.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:34  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.2  2000/07/06 16:55:05  jung
  - *   moved the default binding caches in order to make apartments
  - *   with different versions of the same class possible.
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:25  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +71 -67    zoap/src/org/zoap/xml/XmlException.java
  
  Index: XmlException.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XmlException.java 2000/12/04 12:36:21     1.2
  +++ XmlException.java 2001/01/03 10:23:49     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: XmlException.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlException.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -47,42 +24,60 @@
   import java.io.IOException;
   
   /**
  - * The most general exception that is thrown by this package
  - * <br>
  - * Since infor:XML is an IO package, this is an @see java.io.IOException.
  - * <br>
  - * @author $Author: jung $
  - * @version $Revision: 1.2 $
  + * XmlException is an IOException since we deal with serialisation in this package.
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class XmlException extends IOException {
  +
  +     /** an embedded exception */
  +     Throwable actualThrowable;
  +
  +     /** constructor for embedding an arbitrary throwable */
  +     public XmlException(Throwable throwable) {
  +             super();
  +             actualThrowable = throwable;
  +     }
  +
  +     /** message-based constructor for embedding an arbitrary throwable */
  +     public XmlException(String message, Throwable throwable) {
  +             super(message);
  +             actualThrowable = throwable;
  +     }
  +
  +    /** usual message-based constructor */
  +     public XmlException(String message) {
  +             super(message);
  +     }
  +
  +     /** default constructor */
  +     public XmlException() {
  +     }
  +
  +     /** accesses the embedded throwable */
  +     public Throwable getActualThrowable() {
  +             return actualThrowable;
  +     }
  +
  +     /** the printStackTrace method produces recursive traces */
  +     public void printStackTrace() {
  +             super.printStackTrace();
  +             if (actualThrowable != null)
  +                     actualThrowable.printStackTrace();
  +     }
  +
  +     /** accesses the embedded throwable */
  +     public void setActualThrowable(Throwable throwable) {
  +             actualThrowable = throwable;
  +     }
  +
  +     /** manipulate the toString method to also show the embedded throwable */
  +     public String toString() {
  +             if (actualThrowable != null) {
  +                     return super.toString() + ": embedded exception " + 
actualThrowable.toString();
  +             } else
  +                     return super.toString();
  +     }
   }
   
  -/*
  - *   $Log: XmlException.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:38  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *   
  - *   changed the makefile, adopted most of the licenses
  - *   
  - *   Revision 1.1.1.1  2000/07/06 14:11:28  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  
  1.3       +92 -240   zoap/src/org/zoap/xml/XmlObjectReader.java
  
  Index: XmlObjectReader.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlObjectReader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XmlObjectReader.java      2000/12/04 12:36:21     1.2
  +++ XmlObjectReader.java      2001/01/03 10:23:49     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: XmlObjectReader.java,v 1.2 2000/12/04 12:36:21 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlObjectReader.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -84,12 +61,15 @@
    * <li> Try to find reasonable default sizes for collections and maps from the 
parsing info </li>
    * <li> Implement the primitive types and connect them to the IO interface methods 
</li> </ul>
    *   @see <related>
  - *   @author $Author: jung $
  - *   @version $Revision: 1.2 $
  + *   @author jung
  + *   @version $Revision: 1.3 $
    */
   
   public class XmlObjectReader extends Reader implements ObjectInput {
   
  +     /** how the "system" reference will be named in the reference table */
  +     public final static String XML_READER_REFERENCE_NAME = 
"org.zoap.xml.XmlObjectReader";
  +
        /** uses an embedded reader for input purposes */
   
        private Reader reader;
  @@ -211,10 +191,6 @@
   
        /** resolve a given urn with the given urnResolver */
        public XmlObjectReader resolveURN(URN theUrn) throws IOException {
  -
  -             if (Environment.DEBUG_XML)
  -                     Environment.out.print(toString() + ".resolveURN(" + theUrn + 
")" + urnResolver);
  -
                URN newUrn = new URN(associatedUrn.getParent(), theUrn);
   
                if (visitedURNs.contains(newUrn))
  @@ -231,9 +207,9 @@
                visitedURNs = vU;
        }
   
  -    public Stack getTargetStack() {
  -        return targetStack;
  -    }
  +     public Stack getTargetStack() {
  +             return targetStack;
  +     }
   
        /** Constructor: create a new XmlObjectReader from a given reader with no 
particular URL assigned to this reader */
   
  @@ -325,11 +301,6 @@
   
        public XmlObjectReader(java.io.Reader theEmbeddedReader, URN associatedUrn,
        Binding theDataBinding, URNResolver resolver, Collection visitedURNs) {
  -
  -             if (Environment.DEBUG_XML)
  -                     Environment.out.println("XmlObjectReader(" + theEmbeddedReader 
+ "," + associatedUrn +
  -                     "," + theDataBinding + "," + resolver + "," + visitedURNs + 
")");
  -
                // set the embedded reader
                reader = theEmbeddedReader;
   
  @@ -357,7 +328,7 @@
                nameSpaces = binding.getDefaultNameSpaceEnvironment();
   
                // and register the binding itself under a very special reference
  -             references.put("org.zoap.xml.XmlObjectReader", this);
  +             references.put(XML_READER_REFERENCE_NAME, this);
   
                // the resolver is registered
                urnResolver = resolver;
  @@ -370,16 +341,9 @@
   
        public Object readObject() throws XmlException, IOException {
   
  -             if (Environment.DEBUG_XML)
  -                     Environment.out.println(toString() + ".readObject()");
  -
                try {
   
                        parser.parse(inputSource);
  -
  -                     if (Environment.DEBUG_XML)
  -                             Environment.out.print(toString() + ".readObject(): 
ready with parse" + elements + "\n");
  -
                        // we iterate over the new appearances we have collected
                        java.util.Iterator iterator = elements.iterator();
                        Object result = null;
  @@ -393,12 +357,8 @@
                        return result;
   
                } catch (SAXException e) {
  -
  -                     if (Environment.DEBUG_XML || Environment.LOG_XML > 0)
  -                             Environment.err.println(toString() + ".readObject(): 
produced parsing exception." + e);
  -
  -                     throw new XmlException();
  -
  +                     throw new XmlException(toString() +
  +                     ".readObject(): encountered " + e.toString() + " while trying 
to parse XML document.", e);
                }
   
        }
  @@ -411,31 +371,31 @@
        /** read a single Xml-ised character */
   
        public int read() throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".read(): could 
not read character-wise yet");
        }
   
        /** read a Xml-ised character buffer */
   
        public int read(char[] cbuf) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".read(" + cbuf + 
"): could not read character-wise yet");
        }
   
        /** read a portion of a character buffer */
   
        public int read(char[] cbuf, int off, int len) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".read(" + cbuf + 
"," + off + "," + len + "): could not read character-wise yet");
        }
   
        /** Skip Xml-ised characters. */
   
        public long skip(long n) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".skip(" + n + 
"): could not skip character-wise");
        }
   
        /** Tell whether this stream is ready to be read. */
   
        public boolean ready() throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".ready(): could 
not detect readiness");
        }
   
        /** Tell whether this stream supports the mark() operation. The default 
implementation always returns false. */
  @@ -447,31 +407,31 @@
        /** Mark the present position in the stream is not supported. */
   
        public void mark(int readAheadLimit) throws IOException {
  -             throw new IOException("mark() not supported");
  +             throw new IOException(toString() + ".mark(" + readAheadLimit + "): not 
yet supported");
        }
   
        /** Reset the stream is currently not supported. */
   
        public void reset() throws IOException {
  -             throw new IOException("reset() not supported");
  +             throw new IOException(toString() + ".reset(): not yet supported");
        }
   
        /** Reads into an array of bytes. */
   
        public int read(byte[] b) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".read(" + b + 
"): byte-wise read not yet supported.");
        }
   
        /** Reads into an array of bytes. */
   
        public int read(byte[] b, int off, int len) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".read(" + b + 
"," + off + "," + len + "): byte-wise read not yet supported.");
        }
   
        /** Returns the number of bytes that can be read without blocking. */
   
        public int available() throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".available(): 
not yet supported.");
        }
   
        /**
  @@ -480,19 +440,19 @@
         */
   
        public void readFully(byte[] b) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".readFully(" + b 
+ "): byte-wise read not yet supported.");
        }
   
        /** Reads <code>len</code> bytes from an input stream. */
   
        public void readFully(byte[] b, int off, int len) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".readFully(" + b 
+ "," + off + "," + len + "): byte-wise read not yet supported.");
        }
   
        /** Makes an attempt to skip over <code>n</code> bytes of data from the input 
stream, discarding the skipped bytes. */
   
        public int skipBytes(int n) throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + ".skipBytes(" + n 
+ "): byte-wise skip not yet supported.");
        }
   
        /** Reads one input byte and returns <code>true</code> if that byte is 
nonzero, <code>false</code> if that byte is zero. */
  @@ -516,7 +476,7 @@
         */
   
        public int readUnsignedByte() throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + 
".readUnsignedByte(): byte-wise read not yet supported.");
        }
   
        /** Reads two input bytes and returns a <code>short</code> value. */
  @@ -528,7 +488,7 @@
        /** Reads two input bytes and returns an <code>int</code> value in the range 
<code>0</code> through <code>65535</code>. */
   
        public int readUnsignedShort() throws IOException {
  -             throw new UnsupportedOperationException();
  +             throw new UnsupportedOperationException(toString() + 
".readUnsignedShort(): short-wise read not yet supported.");
        }
   
        /** Reads an input <code>char</code> and returns the <code>char</code> value. 
*/
  @@ -582,16 +542,9 @@
   
                public void startElement(String p0, AttributeList p1) throws 
SAXException {
   
  -                     if (Environment.DEBUG_XML)
  -                             Environment.out.print(toString() + ".startElement(" + 
p0 + "," + p1 + ")\n");
  -
                        // look if the level of ignorance is greater than zero
                        if (ignoranceLevel != 0) {
   
  -                             // then we couldnt understand that part of the 
document anyway
  -                             if (Environment.DEBUG_XML)
  -                                     Environment.out.print(toString() + 
".startElement(" + p0 + "," + p1 + "): ignorance mode.\n");
  -
                                // hence collect the tag information inside the 
verboseElements string
                                // for bunch-processing afterwards
                                verboseElements += "<" + p0 + " ";
  @@ -608,10 +561,6 @@
   
                        } else {
   
  -                             // this is the real mode in which we try to understand 
everything
  -                             if (Environment.DEBUG_XML)
  -                                     Environment.out.print(toString() + 
".startElement(" + p0 + "," + p1 + "): element mode.\n");
  -
                                //
                                // PART 1: Initialise the environment
                                //
  @@ -726,10 +675,6 @@
                                // if we could not look up the type, we ignore that 
crap
                                if (type == null) {
   
  -                                     if (Environment.DEBUG_XML || 
Environment.LOG_XML > 0)
  -                                             Environment.out.print(toString() +
  -                                             ".startElement(" + p0 + "," + p1 + "): 
no such element/type.\n");
  -
                                        // but before, extend the verbose elements as 
in pure ignorance mode
                                        verboseElements += "<" + p0 + " ";
   
  @@ -765,10 +710,6 @@
                                                        if ("null".equals(suffix) &&
                                                        
"true".equals(preAttributes.get(attributeName))) {
   
  -                                                             if 
(Environment.DEBUG_XML)
  -                                                                     
Environment.out.print(toString() + ".startElement(" + p0 + "," + p1 +
  -                                                                     "): found 
xsi:null.\n");
  -
                                                                isNull = true;
   
                                                                // filter the 
attribute, it is not needed anymore
  @@ -777,10 +718,6 @@
                                                                // test string 
equivalence type=""
                                                        } else if 
("type".equals(suffix)) {
   
  -                                                             if 
(Environment.DEBUG_XML)
  -                                                                     
Environment.out.print(toString() + ".startElement(" + p0 + "," + p1 +
  -                                                                     "): found 
xsi:type.\n");
  -
                                                                // the attribute 
contains a proper qname
                                                                String typeName = 
(String)preAttributes.get(attributeName);
                                                                String typePrefix = 
Environment.getNameSpacePrefix(typeName);
  @@ -809,10 +746,6 @@
   
                                        if (type == null || isNull) {
   
  -                                             if (Environment.DEBUG_XML && 
Environment.DEBUG_XML_META)
  -                                                     
Environment.out.print(toString() +
  -                                                     ".startElement(" + p0 + "," + 
p1 + "): encountered unknown type or null.\n");
  -
                                                // switch to ignorance mode and log 
the stuff you get
                                                verboseElements += "<" + p0 + " ";
   
  @@ -868,21 +801,17 @@
                                                                        // if the set 
has not been successful (target=null), we defer the setting
                                                                        if (target == 
null)
                                                                                
attributes.put(attribute, value);
  -
  -                                                             } catch (TypeException 
e) {
  -
  -                                                                     if 
(Environment.DEBUG_XML || Environment.LOG_XML > 0)
  -                                                                             
Environment.err.print(toString() + ".startElement(" + p0 + "," + p1 +
  -                                                                             "): 
failed to create instance of attribute type " + e + "\n");
   
  -                                                             } catch 
(AttributeException e) {
  +                                                             } catch (Throwable t) {
   
  -                                                                     if 
(Environment.DEBUG_XML || Environment.LOG_XML > 0)
  -                                                                             
Environment.err.print(toString() + ".endElement(" + p0 +
  -                                                                             "): 
could not set attribute " + e + "\n");
  +                                                                     // toplevel 
tolerance thingy, hence check logging
  +                                                                     if 
(Environment.DEBUG_LEVEL > 0 || Environment.LOG_LEVEL > 0) {
  +                                                                             
Environment.CONSOLE.error(toString() + ".startElement(" + p0 + "," + p1 +
  +                                                                             "): 
encountered " + t.toString() + " while trying to apply attribute " + attributeFullName 
+ ".");
  +                                                                             
Environment.CONSOLE.exception(t);
  +                                                                     }
   
                                                                }
  -
                                                        } // if
   
                                                } // while
  @@ -896,9 +825,12 @@
                                                                target = 
type.newInstance(attributes, references, nameSpaces);
                                                        } catch (TypeException e) {
   
  -                                                             if 
(Environment.DEBUG_XML || Environment.LOG_XML > 0)
  -                                                                     
Environment.err.print(toString() + ".endElement(" + p0 +
  -                                                                     ") failed to 
create instance of type " + e + "\n");
  +                                                             // toplevel tolerance 
thingy, hence check logging
  +                                                             if 
(Environment.DEBUG_LEVEL > 0 || Environment.LOG_LEVEL > 0) {
  +                                                                     
Environment.CONSOLE.error(toString() + ".startElement(" + p0 + "," + p1 +
  +                                                                     "): 
encountered " + e.toString() + " while trying to create type instance.");
  +                                                                     
Environment.CONSOLE.exception(e);
  +                                                             }
   
                                                        }
                                                }
  @@ -921,9 +853,12 @@
   
                                                        } catch (AttributeException e) 
{
   
  -                                                             if 
(Environment.DEBUG_XML || Environment.LOG_XML > 0)
  -                                                                     
Environment.err.print(toString() + ".startElement(" + p0 + "," + p1 +
  -                                                                     "): could not 
set attribute " + e + "\n");
  +                                                             // toplevel tolerance 
thingy
  +                                                             if 
(Environment.DEBUG_LEVEL > 0 || Environment.LOG_LEVEL > 0) {
  +                                                                     
Environment.CONSOLE.error(toString() + ".startElement(" + p0 + "," + p1 +
  +                                                                     "): 
encountered " + e.toString() + " while trying to apply attribute " + attribute + ".");
  +                                                                     
Environment.CONSOLE.exception(e);
  +                                                             }
   
                                                        } // try
   
  @@ -934,8 +869,15 @@
                                                        Object newTarget;
   
                                                        try {
  -                                                             newTarget = 
element.addElementContent(oldTarget, target, references, nameSpaces);
  +                                                             newTarget = element.
  +                                                             
addElementContent(oldTarget, target, references, nameSpaces);
                                                        } catch (ElementException e) {
  +                                                             // toplevel tolerance 
thingy
  +                                                             if 
(Environment.DEBUG_LEVEL > 0 || Environment.LOG_LEVEL > 0) {
  +                                                                     
Environment.CONSOLE.error(toString() + ".startElement(" + p0 + "," + p1 + "): 
encountered " + e.toString() +
  +                                                                     " while trying 
to add element content.");
  +                                                                     
Environment.CONSOLE.exception(e);
  +                                                             }
                                                                newTarget = oldTarget;
                                                        }
   
  @@ -964,9 +906,6 @@
   
                public void characters(char[] p0, int p1, int p2) throws SAXException {
   
  -                     if (Environment.DEBUG_XML)
  -                             Environment.out.println(toString() + ".characters(" + 
p1 + "," + p2 + ")");
  -
                        if (ignoranceLevel == 0) {
   
                                //
  @@ -986,14 +925,8 @@
   
                public void endElement(String p0) throws SAXException {
   
  -                     if (Environment.DEBUG_XML)
  -                             Environment.out.print(toString() + ".endElement(" + p0 
+ ")\n");
  -
                        if (ignoranceLevel > 0) {
   
  -                             if (Environment.DEBUG_XML)
  -                                     Environment.out.print(toString() + 
".endElement(" + p0 + "): ignorance mode.\n");
  -
                                ignoranceLevel--;
                                isNull = false;
   
  @@ -1008,6 +941,11 @@
                                                        target =
                                                        
element.addElementContent(oldtarget, null, references, nameSpaces);
                                                } catch (ElementException e) {
  +                                                     // toplevel tolerance thingy
  +                                                     if (Environment.DEBUG_LEVEL > 
0 || Environment.LOG_LEVEL > 0) {
  +                                                             
Environment.CONSOLE.error(toString() + ".endElement(" + p0 + "): encountered " + 
e.toString() + " while trying to add element content.");
  +                                                             
Environment.CONSOLE.exception(e);
  +                                                     }
                                                        target = oldtarget;
                                                }
   
  @@ -1021,9 +959,6 @@
   
                        } else {
   
  -                             if (Environment.DEBUG_XML)
  -                                     Environment.out.print(toString() + 
".endElement(" + p0 + "): element mode.\n");
  -
                                //
                                // PART 10: Insert the body and the verbose elements
                                //
  @@ -1032,9 +967,12 @@
                                        target = type.setContent(target, body, 
verboseElements, references, nameSpaces);
                                } catch (TypeException e) {
   
  -                                     if (Environment.DEBUG_XML)
  -                                             Environment.err.print(toString() + 
".endElement(" + p0 +
  -                                             ") failed to set content into target" 
+ e + "\n");
  +                                     // toplevel tolerance thingy
  +                                     if (Environment.DEBUG_LEVEL > 0 || 
Environment.DEBUG_LEVEL > 0) {
  +                                             Environment.CONSOLE.error(toString() + 
".endElement(" + p0 +
  +                                             "): encountered " + e.toString() + " 
while trying to set the content.");
  +                                             Environment.CONSOLE.exception(e);
  +                                     }
   
                                }
   
  @@ -1055,9 +993,11 @@
   
                                        } catch (ElementException e) {
   
  -                                             if (Environment.DEBUG_XML)
  -                                                     
Environment.err.print(toString() + ".endElement(" + p0 +
  -                                                     "): failed to set element " + 
e + "\n");
  +                                             if (Environment.DEBUG_LEVEL > 0 || 
Environment.LOG_LEVEL > 0) {
  +                                                     
Environment.CONSOLE.error(toString() + ".endElement(" + p0 +
  +                                                     "): encountered " + e + " 
while trying to add element value " + av.getElement());
  +                                                     
Environment.CONSOLE.exception(e);
  +                                             }
   
                                        } // try
   
  @@ -1070,6 +1010,10 @@
                                        try {
                                                newTarget = 
element.addElementContent(oldTarget, target, references, nameSpaces);
                                        } catch (ElementException e) {
  +                                             if (Environment.DEBUG_LEVEL > 0 || 
Environment.LOG_LEVEL > 0) {
  +                                                     
Environment.CONSOLE.error(toString() + ".endElement(" + p0 + "): encountered " + e + " 
while trying to add element content.");
  +                                                     
Environment.CONSOLE.exception(e);
  +                                             }
                                                newTarget = oldTarget;
                                        }
   
  @@ -1101,10 +1045,6 @@
   
                // cummon
                public void startDocument() throws SAXException {
  -
  -                     if (Environment.DEBUG_XML)
  -                             Environment.out.println(toString() + 
".startDocument()");
  -
                }
   
                // crap
  @@ -1150,100 +1090,3 @@
   
   } // XmlObjectReader
   
  -/*
  - *   $Log: XmlObjectReader.java,v $
  - *   Revision 1.2  2000/12/04 12:36:21  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:41  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.4  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.3  2000/07/20 14:35:27  jung
  - *   some refactoring inside infor:xml
  - *
  - *   Revision 1.1.2.2  2000/07/17 12:46:18  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1.2.4  2000/07/11 16:40:12  jung
  - *   SOAP invocation handler that is able to dispatch methods with xml-string based 
access.
  - *
  - *   Revision 1.1.1.1.2.3  2000/07/11 08:08:34  jung
  - *   added functionality to store retrieve a part of a types elements
  - *   within "ignored" strings. Useful for writing generic handlers that
  - *   just process a part of the XML and transfer the rest.
  - *
  - *   Revision 1.1.1.1.2.2  2000/07/07 15:50:03  jung
  - *   Request-Response Structure close to MS-SOAP
  - *
  - *   removed a mega-bug in return element
  - *
  - *   Revision 1.1.1.1.2.1  2000/07/07 13:29:39  jung
  - *   removed a bug in the element detection routine related to
  - *   non-existant namespaces/schemas
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:28  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - *   Revision 1.1.1.1  2000/06/19 12:04:13  jung
  - *   imported  ZOAPackage that should
  - *   go into a seperate Open Source project
  - *
  - *   Revision 1.2.2.3  2000/06/15 14:50:07  jung
  - *   first SOAP-enabled container runs
  - *
  - *   Revision 1.2.2.2  2000/06/14 12:38:17  jung
  - *   removed the NEWLINE bug: since infor:X was just using
  - *   \n to mark the end of a line in serialisation, any subsequent
  - *   stream processing that relies on a proper newline (and any
  - *   subsequent derserialisation that tries to grab characters out of a tag)
  - *   must be confused.
  - *
  - *   When going to \r\n and appropriately adjusting the readCharacters
  - *   methods in the basic types and the DocumentHandler of
  - *   XmlObjectReader, this symptom has now vanished.
  - *
  - *   Looks like resolved ...
  - *
  - *   Revision 1.2.2.1  2000/06/08 17:15:47  jung
  - *   added initial soap service that uses the infor:X framework.
  - *
  - *   Revision 1.2  2000/06/06 19:42:31  jung
  - *   added transaction support.
  - *
  - *   redesigned the dataAccess package to provide BSF database
  - *   sessions as transactional resources under any TXManager.
  - *
  - *   DataAccess now manages the mappingData associations to apartments
  - *   and threads.
  - *
  - *   test component runs.
  - *
  - *   Revision 1.1  2000/06/05 09:16:55  jung
  - *   added an initial revision of infor:X, the
  - *   XML (de-)serialisation service of infor:CE.
  - *
  - *   supports meta-data structures, namespaces, schemas.
  - *
  - *   lacks collection support, forward-references, multiple roots
  - *   and external resolution.
  - *
  - */
  
  
  
  1.3       +383 -601  zoap/src/org/zoap/xml/XmlObjectWriter.java
  
  Index: XmlObjectWriter.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlObjectWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XmlObjectWriter.java      2000/12/04 12:36:22     1.2
  +++ XmlObjectWriter.java      2001/01/03 10:23:49     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: XmlObjectWriter.java,v 1.2 2000/12/04 12:36:22 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlObjectWriter.java,v $
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12,
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved.
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -59,764 +36,560 @@
   import java.util.Iterator;
   
   /**
  - *   XmlObjectWriter is a serialisation writer that persists
  - *  java objects into character streams via an extendible
  - *  meta-model @see Binding (where it relies on
  - *  @see org.zoap.soap.builtin.DefaultBinding if no particular
  - *  meta-model is requested)
  - *  <br>
  - *  XmlObjectWriter provides support for dealing with nested namespace definitions
  - *  ("xmlns:<prefix>="<urn>") that are tight to particular @see Schema descriptions.
  - *  It includes native methods to treat nullable values 
("<xsi-prefix>:null=\"true\"") and polymorhism
  - *  ("<xsi-prefix>:type=\"<typeTag>\""). And it provides the basic infrastructure to
  - *  define various ID and IDREF structures as defined in the XML1.0 and the
  - *  Xml-Schema specification.
  - *  <br>
  - *   @author $Author: jung $
  - *   @version $Revision: 1.2 $
  + *   XmlObjectWriter is a serialisation writer that persists java objects into 
character streams via an extendible
  + * meta-model @see Binding (where it relies on
  + *  @see org.zoap.soap.builtin.DefaultBinding if no particular meta-model is 
requested) <br>
  + * XmlObjectWriter provides support for dealing with nested namespace definitions
  + * ("xmlns:<prefix>="<urn>") that are tight to particular @see Schema descriptions.
  + * It includes native methods to treat nullable values 
("<xsi-prefix>:null=\"true\"") and polymorhism
  + * ("<xsi-prefix>:type=\"<typeTag>\""). And it provides the basic infrastructure to
  + * define various ID and IDREF structures as defined in the XML1.0 and the 
Xml-Schema specification. <br>
  + *   @author jung
  + *   @version $Revision: 1.3 $
    */
   
   public class XmlObjectWriter extends Writer implements ObjectOutput {
   
  -  /**
  -   * uses an embedded writer for output
  -   */
  +     /** uses an embedded writer for output */
   
  -  private Writer writer;
  +     private Writer writer;
   
  -  /**
  -   * has a related binding
  -   */
  +     /** has a related binding */
   
  -  private Binding binding;
  +     private Binding binding;
   
  -  /**
  -   * and a serialisation policy
  -   */
  +     /** and a serialisation policy */
   
  -  private SerialisationPolicy policy;
  +     private SerialisationPolicy policy;
   
  -  /**
  -   * the reference structure builds up a map from objects to properties which carry
  -   * the globally unique ids of the objects under particular perspectives.
  -   */
  +     /**
  +      * the reference structure builds up a map from objects to properties which 
carry
  +      * the globally unique ids of the objects under particular perspectives.
  +      */
   
  -  private Map references=new HashMap();
  +     private Map references = new HashMap();
   
  -  /**
  -   * Contructor: Create an XmlObjectWriter from an embedded writer and a given
  -   * data-binding. Note that the embeddedWriter better been synchronised on itself
  -   * as the lock, as otherwise multi-threaded access from several levels
  -   * could corrupt the underlying representation, at least at the XML level. The 
constructor
  -   * will furthermore utter an <?xml version="1.0"?> line to the writer in order to
  -   * markup the stream as being now XML1.0 compatible.
  -   */
  +     /**
  +      * Contructor: Create an XmlObjectWriter from an embedded writer and a given
  +      * data-binding. Note that the embeddedWriter better been synchronised on 
itself
  +      * as the lock, as otherwise multi-threaded access from several levels
  +      * could corrupt the underlying representation, at least at the XML level. The 
constructor
  +      * will furthermore utter an <?xml version="1.0"?> line to the writer in order 
to
  +      * markup the stream as being now XML1.0 compatible.
  +      */
   
  -  public XmlObjectWriter(Writer theEmbeddedWriter, Binding theDataBinding, 
SerialisationPolicy policy) {
  +     public XmlObjectWriter(Writer theEmbeddedWriter, Binding theDataBinding, 
SerialisationPolicy policy) {
   
  -    if(Environment.DEBUG_XML)
  -      
Environment.out.print(toString()+"("+theEmbeddedWriter+","+theDataBinding+")\n");
  +             writer = theEmbeddedWriter;
  +             binding = theDataBinding;
  +             this.policy = policy;
   
  -    writer=theEmbeddedWriter;
  -    binding=theDataBinding;
  -    this.policy=policy;
  +             try {
  +                     // MSXML gets confused by encoding, so leave it for the moment
  +                     // writer.write("<?xml version=\"1.0\" 
encoding=\"UTF-8\"?>\r");
  +                     writer.write("<?xml version=\"1.0\"?>\r");
  +             } catch (java.io.IOException e) {
   
  -    try{
  -//      writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
  -      writer.write("<?xml version=\"1.0\"?>\r\n");
  -    } catch(java.io.IOException e) {
  +                     throw new RuntimeException(toString() + "(" + 
theEmbeddedWriter + "," + theDataBinding + "," + policy +
  +                     "): encountered " + e + " while trying to write the standard 
XML header.");
   
  -      if(Environment.DEBUG_XML || Environment.LOG_XML>0) {
  -        Environment.err.print(toString()+"("+theEmbeddedWriter+","+theDataBinding+
  -          "): encountered "+e+" while writing XML header. \n");
  -      }
  +             }
   
  -    }
  +     }
   
  -  }
  +     /** Contructor: Create an XmlObjectWriter from an embedded writer, uses the 
default data-binding */
   
  -  /**
  -   * Contructor: Create an XmlObjectWriter from an embedded writer, uses the
  -   * default data-binding
  -   */
  +     public XmlObjectWriter(Writer theEmbeddedWriter) {
  +             this(theEmbeddedWriter, DefaultBinding.getDefaultBinding());
  +     }
   
  -  public XmlObjectWriter(Writer theEmbeddedWriter) {
  -    this(theEmbeddedWriter,DefaultBinding.getDefaultBinding());
  -  }
  +     /** Contructor: Create an XmlObjectWriter from an embedded writer, uses the 
default data-binding */
   
  -    /**
  -   * Contructor: Create an XmlObjectWriter from an embedded writer, uses the
  -   * default data-binding
  -   */
  +     public XmlObjectWriter(Writer theEmbeddedWriter, Binding binding) {
  +             this(theEmbeddedWriter, binding, 
SerialisationPolicy.defaultSerialisationPolicy);
  +     }
   
  -  public XmlObjectWriter(Writer theEmbeddedWriter, Binding binding) {
  -    this(theEmbeddedWriter,binding,SerialisationPolicy.defaultSerialisationPolicy);
  -  }
  +     /**
  +      * Serialise an object @param obj to the underlying writer. @throws 
java.io.IOException if
  +      * some output error occurred due to some obscure reasons (real output 
problem) or more
  +      * straightforward reasons (XML serialisation problem).
  +      */
   
  -  /**
  -   * Serialise an object @param obj to the underlying writer. @throws 
java.io.IOException if
  -   * some output error occurred due to some obscure reasons (real output problem) 
or more
  -   * straightforward reasons (XML serialisation problem).
  -   */
  +     public void writeObject(Object obj) throws IOException {
   
  -  public void writeObject(Object obj) throws IOException  {
  +             // lookup a dedicated element in the binding that is willing to treat 
the object
  +             Element element = binding.findElementCompatibleTo(obj, null);
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".writeObject("+obj+")\n");
  +             // prepare environment information
  +             Stack nameSpaceStack = new Stack();
   
  -    // lookup a dedicated element in the binding that is willing to treat the object
  -    Element element=binding.findElementCompatibleTo(obj,null);
  +             // initial name spaces set to the ones that are proposed by the binding
  +             nameSpaceStack.push(binding.getDefaultNameSpaceEnvironment());
   
  -    // prepare environment information
  -    Stack nameSpaceStack=new Stack();
  +             // write the object as an element must be synchronized not to mess up 
the caches and the stream
  +             synchronized(writer) {
  +                     writeElement(element, obj, nameSpaceStack, 0);
  +             }
  +     }
   
  -    // initial name spaces set to the ones that are proposed by the binding
  -    nameSpaceStack.push(binding.getDefaultNameSpaceEnvironment());
  +     /**
  +      * writes the object @arg obj as an XML element @element under the given 
namespace
  +      * environment @arg nameSpaceStack (we expect the stack to contain a map of
  +      * currently available namespaces outside the scope of the element to print). 
If @arg element is
  +      * null, an @throws NoCompatibleElementException is thrown.
  +      */
   
  -    // write the object as an element must be synchronized not to mess up the 
caches and the stream
  -    synchronized(writer) {
  -      writeElement(element,obj,nameSpaceStack,0);
  -    }
  -  }
  +     protected void writeElement(Element element, Object obj, Stack nameSpaceStack, 
int depth)
  +     throws IOException, NoCompatibleElementException {
   
  -  /**
  -   * writes the object @arg obj as an XML element @element under the given namespace
  -   * environment @arg nameSpaceStack (we expect the stack to contain a map of
  -   * currently available namespaces outside the scope of the element to print). If 
@arg element is
  -   * null, an @throws NoCompatibleElementException is thrown.
  -   */
  +             // element must be non-null, otherwise we throw an exception
  +             if (element == null)
  +                     throw new NoCompatibleElementException(toString() + 
".writeElement(" + element + "," + obj + "," + nameSpaceStack + "," +
  +                     depth + "): no element given.");
   
  -  protected void writeElement(Element element, Object obj, Stack nameSpaceStack, 
int depth)
  -    throws IOException, NoCompatibleElementException {
  +             // we extend the current nameSpaceStack by a new scope that is cloned
  +             HashMap nameSpaces = new HashMap((Map)nameSpaceStack.peek());
  +             nameSpaceStack.push(nameSpaces);
   
  -    if(Environment.DEBUG_XML)
  -      
Environment.out.println(toString()+".writeElement("+element+","+obj+","+nameSpaceStack+","+depth+")");
  +             // here, we collect the namespaces that we still need to define
  +             ArrayList lackingNameSpaces = new ArrayList();
   
  -    // element must be non-null, otherwise we throw an exception
  -    if(element==null)
  -      throw new NoCompatibleElementException();
  +             // we find out what would be the right prefix for this element
  +             String nameSpacePrefixForElement = (String)nameSpaces.
  +             get(element.getAppearanceSchema());
   
  -    // we extend the current nameSpaceStack by a new scope that is cloned
  -    HashMap nameSpaces=new HashMap((Map) nameSpaceStack.peek());
  -    nameSpaceStack.push(nameSpaces);
  +             // if the prefix is yet null, we have to utter the namespace to get 
some prefix
  +             if (nameSpacePrefixForElement == null) {
  +                     lackingNameSpaces.add(element.getAppearanceSchema());
  +                     nameSpacePrefixForElement = "n" + (nameSpaces.size() + 1) + 
":";
  +                     nameSpaces.put(element.getAppearanceSchema(), 
nameSpacePrefixForElement);
  +             }
   
  -    // here, we collect the namespaces that we still need to define
  -    ArrayList lackingNameSpaces=new ArrayList();
  +             // output the element global and local name
  +             writer.write("<" + nameSpacePrefixForElement + 
element.getAppearanceName());
   
  -    // we find out what would be the right prefix for this element
  -    String nameSpacePrefixForElement=(String) nameSpaces.
  -        get(element.getAppearanceSchema());
  +             // this is the type which we use to utter the object
  +             Type type = element.getType(obj);
   
  -    // if the prefix is yet null, we have to utter the namespace to get some prefix
  -    if(nameSpacePrefixForElement==null) {
  -      lackingNameSpaces.add(element.getAppearanceSchema());
  -      nameSpacePrefixForElement="n"+(nameSpaces.size()+1)+":";
  -      nameSpaces.put(element.getAppearanceSchema(),nameSpacePrefixForElement);
  -    }
  +             // this is the property sheet that we annotate the object with
  +             // the meta-model is allowd to put arbitrary information into there
  +             // in order to keep state that is hidden from us
  +             Properties objectIds = null;
   
  -    // output the element global and local name
  -    writer.write("<"+nameSpacePrefixForElement+element.getAppearanceName());
  +             // whether we have already seen that object
  +             boolean isNew = true;
   
  -    // this is the type which we use to utter the object
  -    Type type=element.getType(obj);
  +        // preinstall a variable that stores the inheritance hierarchy
  +        Collection inheritanceCollection=null;
   
  -    // this is the property sheet that we annotate the object with
  -    // the meta-model is allowd to put arbitrary information into there
  -    // in order to keep state that is hidden from us
  -    Properties objectIds=null;
  +             // is the object non-empty?
  +             if (obj == null) {
  +                     // we use the xsi:null attribute for indicating "null"
  +                     // first check whether the xsi-namespace is here
  +                     String nameSpacePrefixForNullAttribute = (String)nameSpaces.
  +                     get(XmlSchemaInstance.getXmlSchemaInstance());
   
  -    // whether we have already seen that object
  -    boolean isNew=true;
  +                     // no, we have to utter it
  +                     if (nameSpacePrefixForNullAttribute == null) {
  +                             
lackingNameSpaces.add(XmlSchemaInstance.getXmlSchemaInstance());
  +                             nameSpacePrefixForNullAttribute = "n" + 
(nameSpaces.size() + 1) + ":";
  +                             
nameSpaces.put(XmlSchemaInstance.getXmlSchemaInstance(), 
nameSpacePrefixForNullAttribute);
  +                     }
   
  -    // is the object non-empty?
  -    if(obj==null) {
  -        // we use the xsi:null attribute for indicating "null"
  -        // first check whether the xsi-namespace is here
  -        String nameSpacePrefixForNullAttribute=(String) nameSpaces.
  -          get(XmlSchemaInstance.getXmlSchemaInstance());
  +                     // then simply write the attribute
  +                     writer.write(" " + nameSpacePrefixForNullAttribute + 
"null=\"true\"");
   
  -        // no, we have to utter it
  -        if(nameSpacePrefixForNullAttribute==null) {
  -          lackingNameSpaces.add(XmlSchemaInstance.getXmlSchemaInstance());
  -          nameSpacePrefixForNullAttribute="n"+(nameSpaces.size()+1)+":";
  -          
nameSpaces.put(XmlSchemaInstance.getXmlSchemaInstance(),nameSpacePrefixForNullAttribute);
  -        }
  +             } else {
   
  -        // then simply write the attribute
  -        writer.write(" "+nameSpacePrefixForNullAttribute+"null=\"true\"");
  +                     // polymorhpism support, get the most specific type of this 
element for the given object
  +                     Type specificType = binding.findTypeCompatibleTo(obj, null);
   
  -    } else {
  +                     // see whether default and specific type differ and are 
compatible
  +                     if (specificType != null && !type.equals(specificType) && 
type.isSuperTypeOf(specificType)) {
   
  -      // polymorhpism support, get the most specific type of this element for the 
given object
  -      Type specificType=binding.findTypeCompatibleTo(obj,null);
  +                             // yes, we use the more specific one
  +                             type = specificType;
   
  -      // see whether default and specific type differ and are compatible
  -      if(specificType!=null && !type.equals(specificType) && 
type.isSuperTypeOf(specificType)) {
  +                             // and add an xsi:type attribute as markup
  +                             String nameSpacePrefixForTypeAttribute = 
(String)nameSpaces.
  +                             get(XmlSchemaInstance.getXmlSchemaInstance());
   
  -        // yes, we use the more specific one
  -        type=specificType;
  +                             if (nameSpacePrefixForTypeAttribute == null) {
  +                                     
lackingNameSpaces.add(XmlSchemaInstance.getXmlSchemaInstance());
  +                                     nameSpacePrefixForTypeAttribute = "n" + 
(nameSpaces.size() + 1) + ":";
  +                                     
nameSpaces.put(XmlSchemaInstance.getXmlSchemaInstance(), 
nameSpacePrefixForTypeAttribute);
  +                             }
   
  -        // and add an xsi:type attribute as markup
  -        String nameSpacePrefixForTypeAttribute=(String) nameSpaces.
  -          get(XmlSchemaInstance.getXmlSchemaInstance());
  +                             String typeNamePrefix = 
(String)nameSpaces.get(type.getTypeSchema());
   
  -        if(nameSpacePrefixForTypeAttribute==null) {
  -          lackingNameSpaces.add(XmlSchemaInstance.getXmlSchemaInstance());
  -          nameSpacePrefixForTypeAttribute="n"+(nameSpaces.size()+1)+":";
  -          
nameSpaces.put(XmlSchemaInstance.getXmlSchemaInstance(),nameSpacePrefixForTypeAttribute);
  -        }
  +                             if (typeNamePrefix == null) {
  +                                     lackingNameSpaces.add(type.getTypeSchema());
  +                                     typeNamePrefix = "n" + (nameSpaces.size() + 1) 
+ ":";
  +                                     nameSpaces.put(type.getTypeSchema(), 
typeNamePrefix);
  +                             }
   
  -        String typeNamePrefix=(String) nameSpaces.get(type.getTypeSchema());
  +                             writer.write(" " + nameSpacePrefixForTypeAttribute + 
"type=\"" +
  +                             typeNamePrefix + type.getTypeName() + "\"");
  +                     } // if(!type.equals(specificType)
   
  -        if(typeNamePrefix==null) {
  -          lackingNameSpaces.add(type.getTypeSchema());
  -          typeNamePrefix="n"+(nameSpaces.size()+1)+":";
  -          nameSpaces.put(type.getTypeSchema(),typeNamePrefix);
  -        }
  +                     // determine whether this object has already been seen
  +                     // by getting its objectid map
  +                     objectIds = (Properties)references.get(obj);
  +                     isNew = objectIds == null;
   
  -        writer.write(" "+nameSpacePrefixForTypeAttribute+"type=\""+
  -          typeNamePrefix+type.getTypeName()+"\"");
  -      } // if(!type.equals(specificType)
  +                     // if not present, then we initialise the id properties
  +                     if (isNew && type.isReferencable()) {
  +                             objectIds = new Properties();
  +                             // the default property used by this class
  +                             objectIds.put("XmlObjectWriter",
  +                                 new Integer(references.size()));
  +                             references.put(obj, objectIds);
  +                     }
   
  -      // determine whether this object has already been seen
  -      // by getting its objectid map
  -      objectIds=(Properties) references.get(obj);
  -      isNew=objectIds==null;
   
  -      // if not present, then we initialise the id properties
  -      if(isNew && type.isReferencable()) {
  -        objectIds=new Properties();
  -        // the default property used by this class
  -        objectIds.put("XmlObjectWriter",new Integer(references.size()));
  -        references.put(obj,objectIds);
  -      }
  +                     // build the inheritance structure in a collection
  +                     inheritanceCollection =
  +                     buildInheritanceChain(type,
  +                         new ArrayList());
   
  -    } // if (obj==null)
  +                     // and iterate over it
  +                     Iterator inheritanceIterator = 
inheritanceCollection.iterator();
   
  -    // build the inheritance structure in a collection
  -    Collection inheritanceCollection=
  -      buildInheritanceChain(type,new ArrayList());
  +                     while (inheritanceIterator.hasNext()) {
   
  -    // and iterate over it
  -    Iterator inheritanceIterator=inheritanceCollection.iterator();
  +                             // now we utter the attributes for a particular 
supertype
  +                             Attribute[] attributes = 
((Type)inheritanceIterator.next()).
  +                             getAttributes(obj);
   
  -    while(inheritanceIterator.hasNext()) {
  +                             // if there are some
  +                             if (attributes != null) {
  +                                     for (int count = 0; count < attributes.length; 
count++) {
  +                                             try {
   
  -      // now we utter the attributes for a particular supertype
  -      Attribute[] attributes=((Type) inheritanceIterator.next()).
  -        getAttributes(obj);
  +                                                     if 
(policy.isToBeSerialised(obj, attributes[count], depth)) {
  +                                                             // ask the attribute 
to produce a value for the obj under the property objectIds
  +                                                             // and grab out its 
string-based content depending on its type
  +                                                             String output = 
attributes[count].getType(obj).
  +                                                             
getContent(attributes[count].getAttributeContent(obj, isNew, objectIds));
   
  -      // if there are some
  -      if(attributes!=null) {
  -        for(int count=0;count<attributes.length;count++) {
  -          try{
  +                                                             if (output != null) {
   
  -            if(policy.isToBeSerialised(obj,attributes[count],depth)) {
  -            // ask the attribute to produce a value for the obj under the property 
objectIds
  -            // and grab out its string-based content depending on its type
  -            String output=attributes[count].getType(obj).
  -              
getContent(attributes[count].getAttributeContent(obj,isNew,objectIds));
  +                                                                     // try to 
obtain a namespace for the schema of this attribute
  +                                                                     Object 
nameSpacePrefixForAttribute =
  +                                                                     
nameSpaces.get(attributes[count].getAppearanceSchema());
   
  -            if(output!=null) {
  +                                                                     // if its not 
visible in this scope, introduce it
  +                                                                     if 
(nameSpacePrefixForAttribute == null) {
  +                                                                             
lackingNameSpaces.add(attributes[count].getAppearanceSchema());
  +                                                                             
nameSpacePrefixForAttribute = "n" + (nameSpaces.size() + 1) + ":";
  +                                                                             
nameSpaces.put(attributes[count].getAppearanceSchema(),
  +                                                                             
nameSpacePrefixForAttribute);
  +                                                                     }
   
  -              // try to obtain a namespace for the schema of this attribute
  -              Object nameSpacePrefixForAttribute=
  -                nameSpaces.get(attributes[count].getAppearanceSchema());
  +                                                                     //next utter 
the attribute
  +                                                                     writer.write(" 
" + nameSpacePrefixForAttribute + attributes[count].
  +                                                                     
getAppearanceName() + "=\"" + Environment.encodeIntoXml(output) + "\"");
   
  -              // if its not visible in this scope, introduce it
  -              if(nameSpacePrefixForAttribute==null) {
  -                lackingNameSpaces.add(attributes[count].getAppearanceSchema());
  -                nameSpacePrefixForAttribute="n"+(nameSpaces.size()+1)+":";
  -                nameSpaces.put(attributes[count].getAppearanceSchema(),
  -                  nameSpacePrefixForAttribute);
  -              }
  +                                                             } // if(output!=null)
  +                                                     } // if isToBeSerialised
  +                                             } catch (Throwable t) {
   
  -              //next utter the attribute
  -              writer.write(" "+nameSpacePrefixForAttribute+attributes[count].
  -                getAppearanceName()+"=\""+Environment.encodeIntoXml(output)+"\"");
  +                                                     // toplevel tolerance thingy
  +                                                     if (Environment.DEBUG_LEVEL > 
0 || Environment.LOG_LEVEL > 0) {
  +                                                             
Environment.CONSOLE.error(toString() + ".writeElement(" + element + "," + obj + "," +
  +                                                             nameSpaceStack + "): 
encountered " + t.toString() + " while uttering attribute " + attributes[count] + ".");
  +                                                             
Environment.CONSOLE.exception(t);
  +                                                     }
   
  -            } // if(output!=null)
  -            } // if isToBeSerialised
  -          } catch(AttributeException e) {
  +                                             } // try
   
  -              if(Environment.DEBUG_XML || Environment.LOG_XML>0)
  -                
Environment.err.print(toString()+".writeElement("+element+","+obj+","+
  -                  nameSpaceStack+") encountered "+e+". Ignoring attribute 
"+attributes[count].getAppearanceName()+".\n");
  +                                     } // for
   
  -          } catch(TypeException e) {
  +                             } //if(attributes!=null)
   
  -              if(Environment.DEBUG_XML || Environment.LOG_XML>0)
  -                
Environment.err.print(toString()+".writeElement("+element+","+obj+","+
  -                  nameSpaceStack+") encountered "+e+". Ignoring attribute 
"+attributes[count].getAppearanceName()+" .\n");
  +                     } // while (inheritanceIterator.hasNext())
   
  -          }
  +             } // if (obj==null)
   
  -        } // for
  +             // next we have to issue the lacking namespaces
  +             Iterator lackingNameSpacesIterator = lackingNameSpaces.iterator();
   
  -      } //if(attributes!=null)
  +             // loop through them
  +             while (lackingNameSpacesIterator.hasNext()) {
   
  -    } // while (inheritanceIterator.hasNext())
  +                     Schema currentSchema = 
(Schema)lackingNameSpacesIterator.next();
   
  -    // next we have to issue the lacking namespaces
  -    Iterator lackingNameSpacesIterator=lackingNameSpaces.iterator();
  +                     // find the right prefix
  +                     String prefix = (String)nameSpaces.get(currentSchema);
   
  -    // loop through them
  -    while(lackingNameSpacesIterator.hasNext()) {
  +                     // this should never happen
  +                     if (prefix == null)
  +                             throw new RuntimeException(toString() + "(" + element 
+ "," + obj + "," +
  +                             nameSpaceStack + "): namespace handling fucked up. 
Could not find prefix!");
   
  -      Schema currentSchema=(Schema) lackingNameSpacesIterator.next();
  +                     // turn the colon around, if present
  +                     if (prefix.endsWith(":"))
  +                             prefix = ":" + prefix.substring(0, prefix.length() - 
1);
   
  -      // find the right prefix
  -      String prefix=(String) nameSpaces.get(currentSchema);
  +                     writer.write(" xmlns" + prefix + "=\"" +
  +                     currentSchema.getUrn().toString() + "\"");
   
  -      // this should never happen
  -      if(prefix==null)
  -        throw new RuntimeException(toString()+".writeElement(): namespace handling 
fucked up.");
  +             } // while (lackingNameSpaceIterator.hasNext())
   
  -      // turn the colon around, if present
  -      if(prefix.endsWith(":"))
  -        prefix=":"+prefix.substring(0,prefix.length()-1);
  +             // ready, we close this opening tag and insert a line seperator
  +             writer.write(">" + Environment.LINE_SEPERATOR);
   
  -      writer.write(" xmlns"+prefix+"=\""+
  -          currentSchema.getUrn().toString()+"\"");
  +             if (obj != null) {
  +                     // utter the verbose elements apparent in this element
  +                     if (type.getVerboseElements(obj) != null)
  +                             writer.write(type.getVerboseElements(obj).toString());
   
  -    } // while (lackingNameSpaceIterator.hasNext())
  +                     // refresh the iterator to begin from above
  +                     Iterator inheritanceIterator = 
inheritanceCollection.iterator();
   
  -    // ready, we close this opening tag and insert a line seperator
  -    writer.write(">"+Environment.LINE_SEPERATOR);
  +                     while (inheritanceIterator.hasNext()) {
   
  -    // utter the verbose elements apparent in this element
  -    if(type.getVerboseElements(obj)!=null)
  -      writer.write(type.getVerboseElements(obj).toString());
  +                             // next the element part
  +                             Element[] elements = 
((Type)inheritanceIterator.next()).getElements(obj);
   
  -    // refresh the iterator to begin from above
  -    inheritanceIterator=inheritanceCollection.iterator();
  +                             if (elements != null) {
  +                                     for (int count = 0; count < elements.length; 
count++) {
  +                                             try {
   
  -    while(inheritanceIterator.hasNext()) {
  +                                                     if 
(policy.isToBeSerialised(obj, elements[count], depth)) {
   
  -      // next the element part
  -      Element[] elements=((Type) inheritanceIterator.next()).getElements(obj);
  +                                                             Object[] output = 
elements[count].
  +                                                             
getElementContents(obj, isNew, objectIds);
   
  -      if(elements!=null) {
  -        for(int count=0;count<elements.length;count++) {
  -          try{
  +                                                             if (output != null)
  +                                                                     for (int 
count2 = 0; count2 < output.length; count2++) {
  +                                                                             
writeElement(elements[count], output[count2], nameSpaceStack, depth + 1);
  +                                                                     }
   
  -            if(policy.isToBeSerialised(obj,elements[count],depth)) {
  +                                                     } // if isToBeSerialised
  +                                             } catch (Throwable t) {
   
  -            Object[] output=elements[count].
  -              getElementContents(obj,isNew,objectIds);
  +                                                     if (Environment.DEBUG_LEVEL > 
0 || Environment.LOG_LEVEL > 0) {
  +                                                             
Environment.CONSOLE.error(toString() + ".writeElement(" + element + "," + obj + "," +
  +                                                             nameSpaceStack + "): 
encountered " + t.toString() + " while uttering element " + elements[count] + ".");
  +                                                             
Environment.CONSOLE.exception(t);
  +                                                     }
  +                                             } // try
   
  -              if(output!=null)
  -                for(int count2=0;count2<output.length;count2++) {
  -                  
writeElement(elements[count],output[count2],nameSpaceStack,depth+1);
  -                }
  +                                     } // for
   
  -            } // if isToBeSerialised
  -            } catch(ElementException e) {
  +                             } // if
   
  -              if(Environment.DEBUG_XML || Environment.LOG_XML>0)
  -                
Environment.err.print(toString()+".writeElement("+element+","+obj+","+
  -                  nameSpaceStack+") encountered "+e+" Ignoring element.\n");
  +                     } // while
   
  -            } catch(TypeException e) {
  +                     // this is for the string-based body of the type
  +                     String output = type.getContent(obj);
   
  -              if(Environment.DEBUG_XML || Environment.LOG_XML>0)
  -                
Environment.err.println(toString()+".writeElement("+element+","+obj+","+
  -                  nameSpaceStack+") encountered "+e+" Ignoring element.\n");
  +                     // its non-null, so utter it
  +                     if (output != null)
  +                             
writer.write(Environment.encodeIntoXml(output.toString()) + 
Environment.LINE_SEPERATOR);
  +             }
   
  -            }
  +             // utter the closing tag
  +             writer.write("</" + nameSpacePrefixForElement + 
element.getAppearanceName() + ">" +
  +             Environment.LINE_SEPERATOR);
   
  -        } // for
  +             // and finally reinstall the namespaces
  +             nameSpaceStack.pop();
   
  -      } // if
  +     } // writeElement
   
  -    } // while
  +     /** traces an inheritance chain in a collection */
   
  -    // this is for the string-based body of the type
  -    String output=type.getContent(obj);
  +     private Collection buildInheritanceChain(Type type, Collection inCollection) {
   
  -    // its non-null, so utter it
  -    if(output!=null)
  -      
writer.write(Environment.encodeIntoXml(output.toString())+Environment.LINE_SEPERATOR);
  +             Collection result = inCollection;
   
  -    // utter the closing tag
  -    writer.write("</"+nameSpacePrefixForElement+element.getAppearanceName()+">"+
  -      Environment.LINE_SEPERATOR);
  +             if (type != null) {
  +                     if (type.getDerivedBy() != Type.DERIVEDBY_RESTRICTION)
  +                             result = buildInheritanceChain(type.getSuperType(), 
result);
   
  -    // and finally reinstall the namespaces
  -    nameSpaceStack.pop();
  +                     result.add(type);
  +             }
   
  -  } // writeElement
  +             return result;
  +     }
   
  -  /**
  -   * traces an inheritance chain in a collection
  -   */
  +     /** Writes an array of bytes. This method will block until the bytes are 
actually written. */
   
  -  private Collection buildInheritanceChain(Type type, Collection inCollection) {
  +     public void write(byte[] b) throws IOException {
   
  -    if(Environment.DEBUG_XML)
  -      
Environment.out.print(toString()+".buildInheritanceChain("+type+","+inCollection+")\n");
   
  -    Collection result=inCollection;
  +             throw new UnsupportedOperationException(toString() + ".write(" + b + 
"): byte-wise write not supported.");
  +     }
   
  -    if(type!=null) {
  -             if(type.getDerivedBy()!=Type.DERIVEDBY_RESTRICTION)
  -             result=buildInheritanceChain(type.getSuperType(),result);
  +     /** Writes a sub array of bytes. */
   
  -     result.add(type);
  -    }
  +     public void write(byte[] b, int off, int len) throws IOException {
   
  -    return result;
  -  }
   
  -  /**
  -   * Writes an array of bytes. This method will block until the bytes
  -   * are actually written.
  -   */
  +             throw new UnsupportedOperationException(toString() + ".write(" + b + 
"," + off + "," + len + "): byte-wise write not supported.");
  +     }
   
  -  public void write(byte[] b) throws IOException {
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".write("+b+")\n");
  +     /** Writes a <code>boolean</code> value to this output stream. */
   
  -     throw new UnsupportedOperationException();
  -  }
  +     public void writeBoolean(boolean v) throws IOException {
   
  -  /**
  -   * Writes a sub array of bytes.
  -   */
   
  -  public void write(byte[] b, int off, int len) throws IOException {
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".write("+b+","+off+","+len+")\n");
  +             writeObject(
  +                 new Boolean(v));
  +     }
   
  -    throw new UnsupportedOperationException();
  -  }
  +     /** Writes to the output stream the eight low- order bits of the argument 
<code>v</code>. */
   
  +     public void writeByte(int v) throws IOException {
   
  -  /**
  -   * Writes a <code>boolean</code> value to this output stream.
  -   */
   
  -  public void writeBoolean(boolean v) throws IOException {
  +             writeObject(
  +                 new Byte((byte)v));
  +     }
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".writeBoolean("+v+")\n");
  +     /** Writes two bytes to the output stream to represent the value of the 
argument. */
   
  -    writeObject(new Boolean(v));
  -  }
  +     public void writeShort(int v) throws IOException {
   
  -  /**
  -   * Writes to the output stream the eight low-
  -   * order bits of the argument <code>v</code>.
  -   */
   
  -  public void writeByte(int v) throws IOException {
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".writeByte("+v+")\n");
  +             writeObject(
  +                 new Short((short)v));
  +     }
   
  -    writeObject(new Byte((byte) v));
  -  }
  +     /** Writes a <code>char</code> value, wich is comprised of two bytes, to the 
output stream. */
   
  -  /**
  -   * Writes two bytes to the output
  -   * stream to represent the value of the argument.
  -   */
  +     public void writeChar(int v) throws IOException {
   
  -   public void writeShort(int v) throws IOException {
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".writeShort("+v+")\n");
   
  -    writeObject(new Short((short) v));
  -   }
  +             writeObject(
  +                 new Character((char)v));
  +     }
   
  -    /**
  -     * Writes a <code>char</code> value, wich
  -     * is comprised of two bytes, to the
  -     * output stream.
  -     */
  +     /** Writes an <code>int</code> value, which is comprised of four bytes, to the 
output stream. */
   
  -  public void writeChar(int v) throws IOException {
  +     public void writeInt(int v) throws IOException {
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".writeChar("+v+")\n");
   
  -    writeObject(new Character((char) v));
  -  }
   
  -  /**
  -   * Writes an <code>int</code> value, which is
  -   * comprised of four bytes, to the output stream.
  -   */
  +             writeObject(
  +                 new Integer(v));
  +     }
   
  -  public void writeInt(int v) throws IOException {
  +     /** Writes an <code>long</code> value, which is comprised of four bytes, to 
the output stream. */
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".write("+v+")\n");
  +     public void writeLong(long v) throws IOException {
   
  -      writeObject(new Integer(v));
  -  }
  +             writeObject(
  +                 new Long(v));
  +     }
   
  -    /**
  -     * Writes an <code>long</code> value, which is
  -     * comprised of four bytes, to the output stream.
  -     */
  +     /** Writes a <code>float</code> value, which is comprised of four bytes, to 
the output stream. */
  +     public void writeFloat(float v) throws IOException {
   
  -    public void writeLong(long v) throws IOException {
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".writeLong("+v+")\n");
   
  -      writeObject(new Long(v));
  -    }
  +             writeObject(
  +                 new Float(v));
  +     }
   
  -    /**
  -     * Writes a <code>float</code> value,
  -     * which is comprised of four bytes, to the output stream.
  -     */
  -    public void writeFloat(float v) throws IOException {
  +     /** Writes a <code>double</code> value, which is comprised of eight bytes, to 
the output stream. */
  +     public void writeDouble(double v) throws IOException {
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".writeFloat("+v+")\n");
   
  -      writeObject(new Float(v));
  -    }
  +             writeObject(
  +                 new Double(v));
  +     }
   
  -    /**
  -     * Writes a <code>double</code> value,
  -     * which is comprised of eight bytes, to the output stream.
  -     */
  -    public void writeDouble(double v) throws IOException {
  +     /** Writes a string to the output stream. */
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".writeDouble("+v+")\n");
  +     public void writeBytes(String s) throws IOException {
   
  -      writeObject(new Double(v));
  -    }
   
  -    /**
  -     * Writes a string to the output stream.
  -     */
  +             throw new UnsupportedOperationException(toString() + ".writeBytes(" + 
s + "): byte-wise output not yet supported.");
   
  -    public void writeBytes(String s) throws IOException {
  +     }
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".writeBytes("+s+")\n");
  +     /** Writes every character in the string <code>s</code>, to the output stream, 
in order, two bytes per character. */
   
  -      throw new UnsupportedOperationException();
  -    }
  +     public void writeChars(String s) throws IOException {
   
  -    /**
  -     * Writes every character in the string <code>s</code>,
  -     * to the output stream, in order,
  -     * two bytes per character.
  -     */
  +             throw new UnsupportedOperationException(toString() + ".writeChars(" + 
s + "): char-wise write not supported.");
   
  -    public void writeChars(String s) throws IOException {
  +     }
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".writeChars("+s+")\n");
  +     /**
  +      * Writes two bytes of length information to the output stream, followed by 
the Java modified UTF representation
  +      * of  every character in the string <code>s</code>.
  +      */
   
  -      throw new UnsupportedOperationException();
  +     public void writeUTF(String str) throws IOException {
   
  -    }
   
  -    /**
  -     * Writes two bytes of length information
  -     * to the output stream, followed
  -     * by the Java modified UTF representation
  -     * of  every character in the string <code>s</code>.
  -     */
   
  -    public void writeUTF(String str) throws IOException {
  +             writeObject(str);
  +     }
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".writeUTF("+str+")\n");
  +     /** write buffer of characters into XML, uses default data-binding */
   
  -      writeObject(str);
  -    }
  +     public void write(char[] cbuf) throws IOException {
   
  -  /**
  -   * write buffer of characters into XML, uses default data-binding
  -   */
   
  -  public void write(char[] cbuf) throws IOException {
  +             throw new UnsupportedOperationException(toString() + ".write(" + cbuf 
+ "): char-wise write not supported.");
  +     }
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".write("+cbuf+")\n");
  +     /** write portion of buffer of characters is XMLised */
   
  -    throw new UnsupportedOperationException();
  -  }
  +     public void write(char[] cbuf, int off, int len) throws IOException {
   
  -  /**
  -   * write portion of buffer of characters is XMLised
  -   */
   
  -  public void write(char[] cbuf, int off, int len) throws IOException {
  +             throw new UnsupportedOperationException(toString() + ".write(" + cbuf 
+ "," + off + "," + len + "): char-wise write not supported.");
  +     }
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".write("+cbuf+","+off+","+len+")\n");
   
  -    throw new UnsupportedOperationException();
  -  }
  +     /** write character is XMLised */
   
  +     public void write(int aAhar) throws IOException {
   
  -  /**
  -   * write character is XMLised
  -   */
  +             throw new UnsupportedOperationException(toString() + ".write(" + aAhar 
+ "): char-wise write not supported.");
  +     }
   
  -  public void write(int aAhar) throws IOException {
  +     /** write string is XMLised */
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".write("+aAhar+")\n");
  +     public void write(String string) throws IOException {
   
  -    throw new UnsupportedOperationException();
  -  }
  +             writeObject(string);
  +     }
   
  -  /**
  -   * write string is XMLised
  -   */
  +     /** write string is XMLised */
   
  -  public void write(String string) throws IOException {
  +     public void write(String string, int off, int len) throws IOException {
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".write("+string+")\n");
   
  -    writeObject(string);
  -  }
   
  -  /**
  -   * write string is XMLised
  -   */
  +             throw new UnsupportedOperationException(toString() + ".write(" + 
string + "," + off + "," + len + "): piece-wise write not supported.");
  +     }
   
  -  public void write(String string,int off,int len) throws IOException {
  +     /** the close method is simply redirected to the writer */
   
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".write("+string+","+off+","+len+")\n");
  +     public void close() throws IOException {
   
  -    throw new UnsupportedOperationException();
  -  }
   
  -  /**
  -   * the close method is simply redirected to the writer
  -   */
   
  -  public void close() throws IOException {
  +             writer.close();
  +     }
   
  -    if(Environment.DEBUG_XML)
  -      Environment.out.print(toString()+".close()\n");
  +     /** the flush method is simply redirected to the writer */
   
  -    writer.close();
  -  }
  +     public void flush() throws IOException {
   
  -  /**
  -   * the flush method is simply redirected to the writer
  -   */
   
  -  public void flush() throws IOException {
  -
  -      if(Environment.DEBUG_XML)
  -        Environment.out.print(toString()+".flush()\n");
  -
  -    writer.flush();
  -  }
  +             writer.flush();
  +     }
   }
   
  -/**
  - *   $Log: XmlObjectWriter.java,v $
  - *   Revision 1.2  2000/12/04 12:36:22  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:43  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.4  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.3  2000/07/20 14:35:27  jung
  - *   some refactoring inside infor:xml
  - *
  - *   Revision 1.1.2.2  2000/07/17 12:46:19  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:24  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1.2.3  2000/07/11 08:08:35  jung
  - *   added functionality to store retrieve a part of a types elements
  - *   within "ignored" strings. Useful for writing generic handlers that
  - *   just process a part of the XML and transfer the rest.
  - *
  - *   Revision 1.1.1.1.2.2  2000/07/10 14:57:02  jung
  - *   made exceptions more MS-compliant.
  - *
  - *   included <?xml version?> annotation when writing.
  - *
  - *   http-server now closes the channel as its default action.
  - *
  - *   first testcall worked!
  - *
  - *   Revision 1.1.1.1.2.1  2000/07/07 15:50:03  jung
  - *   Request-Response Structure close to MS-SOAP
  - *
  - *   removed a mega-bug in return element
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:28  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - *   Revision 1.1.1.1  2000/06/19 12:04:13  jung
  - *   imported  ZOAPackage that should
  - *   go into a seperate Open Source project
  - *
  - *   Revision 1.2.2.2  2000/06/14 12:38:18  jung
  - *   removed the NEWLINE bug: since infor:X was just using
  - *   \n to mark the end of a line in serialisation, any subsequent
  - *   stream processing that relies on a proper newline (and any
  - *   subsequent derserialisation that tries to grab characters out of a tag)
  - *   must be confused.
  - *
  - *   When going to \r\n and appropriately adjusting the readCharacters
  - *   methods in the basic types and the DocumentHandler of
  - *   XmlObjectReader, this symptom has now vanished.
  - *
  - *   Looks like resolved ...
  - *
  - *   Revision 1.2.2.1  2000/06/08 17:15:48  jung
  - *   added initial soap service that uses the infor:X framework.
  - *
  - *   Revision 1.2  2000/06/06 19:42:31  jung
  - *   added transaction support.
  - *
  - *   redesigned the dataAccess package to provide BSF database
  - *   sessions as transactional resources under any TXManager.
  - *
  - *   DataAccess now manages the mappingData associations to apartments
  - *   and threads.
  - *
  - *   test component runs.
  - *
  - *   Revision 1.1  2000/06/05 09:16:55  jung
  - *   added an initial revision of infor:X, the
  - *   XML (de-)serialisation service of infor:CE.
  - *
  - *   supports meta-data structures, namespaces, schemas.
  - *
  - *   lacks collection support, forward-references, multiple roots
  - *   and external resolution.
  - *
  - */
  
  
  
  1.3       +23 -69    zoap/src/org/zoap/xml/XmlSchemaInstance.java
  
  Index: XmlSchemaInstance.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlSchemaInstance.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XmlSchemaInstance.java    2000/12/04 12:36:23     1.2
  +++ XmlSchemaInstance.java    2001/01/03 10:23:49     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: XmlSchemaInstance.java,v 1.2 2000/12/04 12:36:23 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  - *
  - *   License Statement
  - *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  - *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/XmlSchemaInstance.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
  + *
  + * This library 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 library 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 library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml;
  @@ -51,6 +28,8 @@
    * This is the schema representations for 
"http://www.w3.org/1999/XmlSchema-Instance".
    * Since it just carries two important attributes (type and null) which we evaluate 
internally,
    * there is not much work to do here. It is mainly to define the urn for these 
attributes.
  + * @author jung
  + * @version $Revision: 1.3 $
    */
   
   public class XmlSchemaInstance extends Schema {
  @@ -61,8 +40,8 @@
   
       private XmlSchemaInstance() {
   
  -      if(Environment.DEBUG_XML && Environment.DEBUG_XML_META)
  -        Environment.out.print(toString()+".XmlSchemaInstance()\n");
  +      if(Environment.DEBUG_LEVEL>1)
  +        Environment.CONSOLE.log(toString()+".XmlSchemaInstance()");
   
         setUrn(new URN(new String[] {"http://www.w3.org/1999/XMLSchema-Instance"}));
       }
  @@ -85,37 +64,3 @@
   
   }
   
  -/*
  - *   $Log: XmlSchemaInstance.java,v $
  - *   Revision 1.2  2000/12/04 12:36:23  jung
  - *   adopted to latest jboss container,
  - *   
  - *   added decimal and date
  - *   
  - *   removed some problems due to forward-referencing in meta-data
  - *   
  - *   added serialisation policy
  - *   
  - *   Revision 1.1.1.1  2000/08/10 21:07:44  jung
  - *   Initial import.
  - *   
  - *   
  - *   Revision 1.1.2.1  2000/08/04 17:20:19  jung
  - *   close to beta stadium. Meta-Data import now works.
  - *   
  - *   Revision 1.1.2.1  2000/07/17 12:46:19  jung
  - *   refactored package and meta-model
  - *
  - *   Revision 1.1.2.1  2000/07/13 12:46:25  jung
  - *   package renaming, most of the zoap stuff now under org.zoap
  - *   util and http stay infor.ce, containerInvoker etc move to org.jboss
  - *
  - *   changed the makefile, adopted most of the licenses
  - *
  - *   Revision 1.1.1.1  2000/07/06 14:11:29  jung
  - *   Import of a pre beta version of ZOAP source with a new directory structure,
  - *   ant-based make, apache-kind of license, etc.
  - *
  - *   jars are coming later because of cvs-history reasons.
  - *
  - */
  
  
  

Reply via email to