You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2002/01/25 17:30:08 UTC

cvs commit: xml-axis/java/src/javax/xml/transform Source.java

dims        02/01/25 08:30:08

  Modified:    java     build.xml
  Added:       java/src/javax/xml/messaging Endpoint.java URLEndpoint.java
               java/src/javax/xml/soap AttachmentPart.java Detail.java
                        DetailEntry.java FactoryFinder.java
                        MessageFactory.java MimeHeader.java
                        MimeHeaders.java Name.java Node.java SOAPBody.java
                        SOAPBodyElement.java SOAPConnection.java
                        SOAPConnectionFactory.java SOAPConstants.java
                        SOAPElement.java SOAPElementFactory.java
                        SOAPEnvelope.java SOAPException.java SOAPFault.java
                        SOAPFaultElement.java SOAPHeader.java
                        SOAPHeaderElement.java SOAPMessage.java
                        SOAPPart.java Text.java
               java/src/javax/xml/transform Source.java
  Log:
  First cut of javax.xml.soap package from JAXM Spec.
  - This is a subset of the classes from JAXM that we need for JAX-RPC 0.6
  - Had to check in 2 classes in javax.xml.messaging that were referenced from javax.xml.soap package.
  - Had to check in 1 class in javax.xml.transform that was referenced from javax.xml.soap package.
  - Needs "attachments.present" to compile. Does not compile if attachments.present is false.
  - Javadocs were hand-copied from JAXM Spec's Javadocs (JAX Winter Pack)
  - As soon as we get an official copy we can replace this code with the "official" copy.
  
  Revision  Changes    Path
  1.99      +2 -0      xml-axis/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- build.xml	11 Jan 2002 18:44:06 -0000	1.98
  +++ build.xml	25 Jan 2002 16:30:07 -0000	1.99
  @@ -205,7 +205,9 @@
         <exclude name="org/apache/axis/transport/http/AdminServlet.java" unless="servlet.present"/>
         <exclude name="org/apache/axis/transport/http/AxisHttpSession.java" unless="servlet.present"/>
         <exclude name="org/apache/axis/transport/http/AxisServlet.java" unless="servlet.present"/>
  +      <exclude name="org/apache/axis/server/JNDIAxisServerFactory.java" unless="servlet.present"/>
         <exclude name="org/apache/axis/security/servlet/*" unless="servlet.present"/>
  +      <exclude name="javax/xml/soap/*.java" unless="attachments.present"/>
         <exclude name="**/*TestSuite.java" unless="junit.present"/>
       </javac>
       <copy file="${src.dir}/org/apache/axis/server/server-config.wsdd"
  
  
  
  1.1                  xml-axis/java/src/javax/xml/messaging/Endpoint.java
  
  Index: Endpoint.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.messaging;
  
  /**
   * An opaque representation of an application endpoint. Typically, an
   * <code>Endpoint</code> object represents a business entity, but it
   * may represent a party of any sort. Conceptually, an
   * <code>Endpoint</code> object is the mapping of a logical name
   * (example, a URI) to a physical location, such as a URL.
   * <P>
   * For messaging using a provider that supports profiles, an application
   * does not need to specify an endpoint when it sends a message because
   * destination information will be contained in the profile-specific header.
   * However, for point-to-point plain SOAP messaging, an application must supply
   * an <code>Endpoint</code> object to
   * the <code>SOAPConnection</code> method <code>call</code>
   * to indicate the intended destination for the message.
   * The subclass {@link URLEndpoint URLEndpoint} can be used when an application
   * wants to send a message directly to a remote party without using a
   * messaging provider.
   * <P>
   * The default identification for an <code>Endpoint</code> object
   * is a URI. This defines what JAXM messaging
   * providers need to support at minimum for identification of
   * destinations. A messaging provider
   * needs to be configured using a deployment-specific mechanism with
   * mappings from an endpoint to the physical details of that endpoint.
   * <P>
   * <code>Endpoint</code> objects can be created using the constructor, or
   * they can be looked up in a naming
   * service. The latter is more flexible because logical identifiers
   * or even other naming schemes (such as DUNS numbers)
   * can be bound and rebound to specific URIs.
   */
  public class Endpoint {
  
      /**
       * Constructs an <code>Endpoint</code> object using the given string identifier.
       * @param  uri  a string that identifies the party that this <code>Endpoint</code> object represents; the default is a URI
       */
      public Endpoint(String uri) {
          id = uri;
      }
  
      /**
       * Retrieves a string representation of this <code>Endpoint</code> object. This string is likely to be provider-specific, and
       * programmers are discouraged from parsing and programmatically interpreting the contents of this string.
       * @return  a <code>String</code> with a provider-specific representation of this <code>Endpoint</code> object
       */
      public String toString() {
          return id;
      }
  
      /** A string that identifies the party that this <code>Endpoint</code> object represents; a URI is the default. */
      protected String id;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/messaging/URLEndpoint.java
  
  Index: URLEndpoint.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.messaging;
  
  /**
   * A special case of the <code>Endpoint</code> class used for simple applications that want to communicate directly
   * with another SOAP-based application in a point-to-point fashion instead of going through a messaging provider.
   * <P>
   * A <code>URLEndpoint</code> object contains a URL, which is used to make connections to the remote party.
   * A standalone client can pass a <code>URLEndpoint</code> object to the <code>SOAPConnection</code> method <code>call</code> to
   * send a message synchronously.
   */
  public class URLEndpoint extends Endpoint {
  
      /**
       *  Constructs a new <code>URLEndpoint</code> object using the given URL.
       *  @param  url  a <code>String</code> giving the URL to use in constructing the new <code>URLEndpoint</code> object
       */
      public URLEndpoint(String url) {
          super(url);
      }
  
      /**
       *  Gets the URL associated with this <code>URLEndpoint</code> object.
       *  @return  a <code>String</code> giving the URL associated with this <code>URLEndpoint</code> object
       */
      public String getURL() {
          return super.id;
      }
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/AttachmentPart.java
  
  Index: AttachmentPart.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import javax.activation.DataHandler;
  
  import java.util.Iterator;
  
  /**
   * <P>A single attachment to a <CODE>SOAPMessage</CODE> object. A
   *   <CODE>SOAPMessage</CODE> object may contain zero, one, or many
   *   <CODE>AttachmentPart</CODE> objects. Each <CODE>
   *   AttachmentPart</CODE> object consists of two parts,
   *   application-specific content and associated MIME headers. The
   *   MIME headers consists of name/value pairs that can be used to
   *   identify and describe the content.</P>
   *
   *   <P>An <CODE>AttachmentPart</CODE> object must conform to
   *   certain standards.</P>
   *
   *   <OL>
   *     <LI>It must conform to <A href=
   *     "http://www.ietf.org/rfc/rfc2045.txt">MIME [RFC2045]
   *     standards</A></LI>
   *
   *     <LI>It MUST contain content</LI>
   *
   *     <LI>
   *       The header portion MUST include the following header:
   *
   *       <UL>
   *         <LI>
   *           <CODE>Content-Type</CODE><BR>
   *            This header identifies the type of data in the content
   *           of an <CODE>AttachmentPart</CODE> object and MUST
   *           conform to [RFC2045]. The following is an example of a
   *           Content-Type header:
   * <PRE>
   *      Content-Type:  application/xml
   *
   * </PRE>
   *           The following line of code, in which <CODE>ap</CODE> is
   *           an <CODE>AttachmentPart</CODE> object, sets the header
   *           shown in the previous example.
   * <PRE>
   *      ap.setMimeHeader("Content-Type", "application/xml");
   *
   * </PRE>
   *
   *           <P></P>
   *         </LI>
   *       </UL>
   *     </LI>
   *   </OL>
   *
   *   <P>There are no restrictions on the content portion of an
   *   <CODE>AttachmentPart</CODE> object. The content may be anything
   *   from a simple plain text object to a complex XML document or
   *   image file.</P>
   *
   *   <P>An <CODE>AttachmentPart</CODE> object is created with the
   *   method <CODE>SOAPMessage.createAttachmentPart</CODE>. After
   *   setting its MIME headers, the <CODE>AttachmentPart</CODE>
   *   object is added to the message that created it with the method
   *   <CODE>SOAPMessage.addAttachmentPart</CODE>.</P>
   *
   *   <P>The following code fragment, in which <CODE>m</CODE> is a
   *   <CODE>SOAPMessage</CODE> object and <CODE>contentStringl</CODE>
   *   is a <CODE>String</CODE>, creates an instance of <CODE>
   *   AttachmentPart</CODE>, sets the <CODE>AttachmentPart</CODE>
   *   object with some content and header information, and adds the
   *   <CODE>AttachmentPart</CODE> object to the <CODE>
   *   SOAPMessage</CODE> object.</P>
   * <PRE>
   *    AttachmentPart ap1 = m.createAttachmentPart();
   *    ap1.setContent(contentString1, "text/plain");
   *    m.addAttachmentPart(ap1);
   * </PRE>
   *
   *   <P>The following code fragment creates and adds a second <CODE>
   *   AttachmentPart</CODE> instance to the same message. <CODE>
   *   jpegData</CODE> is a binary byte buffer representing the jpeg
   *   file.</P>
   * <PRE>
   *    AttachmentPart ap2 = m.createAttachmentPart();
   *    byte[] jpegData =  ...;
   *    ap2.setContent(new ByteArrayInputStream(jpegData), "image/jpeg");
   *    m.addAttachmentPart(ap2);
   * </PRE>
   *
   *   <P>The <CODE>getContent</CODE> method retrieves the contents
   *   and header from an <CODE>AttachmentPart</CODE> object.
   *   Depending on the <CODE>DataContentHandler</CODE> objects
   *   present, the returned <CODE>Object</CODE> can either be a typed
   *   Java object corresponding to the MIME type or an <CODE>
   *   InputStream</CODE> object that contains the content as
   *   bytes.</P>
   * <PRE>
   *    String content1 = ap1.getContent();
   *    java.io.InputStream content2 = ap2.getContent();
   * </PRE>
   *   The method <CODE>clearContent</CODE> removes all the content
   *   from an <CODE>AttachmentPart</CODE> object but does not affect
   *   its header information.
   * <PRE>
   *    ap1.clearContent();
   * </PRE>
   */
  public abstract class AttachmentPart {
  
      /**  */
      public AttachmentPart() {}
  
      /**
       * Returns the number of bytes in this <CODE>
       * AttachmentPart</CODE> object.
       * @return the size of this <CODE>AttachmentPart</CODE> object
       *     in bytes or -1 if the size cannot be determined
       * @throws  SOAPException  if the content of this
       *     attachment is corrupted of if there was an exception
       *     while trying to determine the size.
       */
      public abstract int getSize() throws SOAPException;
  
      /**
       * Clears out the content of this <CODE>
       * AttachmentPart</CODE> object. The MIME header portion is left
       * untouched.
       */
      public abstract void clearContent();
  
      /**
       * Gets the content of this <CODE>AttachmentPart</CODE> object
       *   as a Java object. The type of the returned Java object
       *   depends on (1) the <CODE>DataContentHandler</CODE> object
       *   that is used to interpret the bytes and (2) the <CODE>
       *   Content-Type</CODE> given in the header.
       *
       *   <P>For the MIME content types "text/plain", "text/html" and
       *   "text/xml", the <CODE>DataContentHandler</CODE> object does
       *   the conversions to and from the Java types corresponding to
       *   the MIME types. For other MIME types,the <CODE>
       *   DataContentHandler</CODE> object can return an <CODE>
       *   InputStream</CODE> object that contains the content data as
       *   raw bytes.</P>
       *
       *   <P>A JAXM-compliant implementation must, as a minimum,
       *   return a <CODE>java.lang.String</CODE> object corresponding
       *   to any content stream with a <CODE>Content-Type</CODE>
       *   value of <CODE>text/plain</CODE> and a <CODE>
       *   javax.xml.transform.StreamSource</CODE> object
       *   corresponding to a content stream with a <CODE>
       *   Content-Type</CODE> value of <CODE>text/xml</CODE>. For
       *   those content types that an installed <CODE>
       *   DataContentHandler</CODE> object does not understand, the
       *   <CODE>DataContentHandler</CODE> object is required to
       *   return a <CODE>java.io.InputStream</CODE> object with the
       *   raw bytes.</P>
       * @return a Java object with the content of this <CODE>
       *     AttachmentPart</CODE> object
       * @throws  SOAPException  if there is no content set
       *     into this <CODE>AttachmentPart</CODE> object or if there
       *     was a data transformation error
       */
      public abstract Object getContent() throws SOAPException;
  
      /**
       * Sets the content of this attachment part to that of the
       * given <CODE>Object</CODE> and sets the value of the <CODE>
       * Content-Type</CODE> header to the given type. The type of the
       * <CODE>Object</CODE> should correspond to the value given for
       * the <CODE>Content-Type</CODE>. This depends on the particular
       * set of <CODE>DataContentHandler</CODE> objects in use.
       * @param  object  the Java object that makes up
            the content for this attachment part
       * @param  contentType the MIME string that
            specifies the type of the content
       * @throws java.lang.IllegalArgumentException if
       *     the contentType does not match the type of the content
       *     object, or if there was no <CODE>
       *     DataContentHandler</CODE> object for this content
       *     object
       * @see #getContent() getContent()
       */
      public abstract void setContent(Object object, String contentType);
  
      /**
       * Gets the <CODE>DataHandler</CODE> object for this <CODE>
       * AttachmentPart</CODE> object.
       * @return the <CODE>DataHandler</CODE> object associated with
       *     this <CODE>AttachmentPart</CODE> object
       * @throws  SOAPException  if there is
       *     no data in this <CODE>AttachmentPart</CODE> object
       */
      public abstract DataHandler getDataHandler() throws SOAPException;
  
      /**
       * Sets the given <CODE>DataHandler</CODE> object as the
       * data handler for this <CODE>AttachmentPart</CODE> object.
       * Typically, on an incoming message, the data handler is
       * automatically set. When a message is being created and
       * populated with content, the <CODE>setDataHandler</CODE>
       * method can be used to get data from various data sources into
       * the message.
       * @param  datahandler  <CODE>DataHandler</CODE> object to
       *     be set
       * @throws java.lang.IllegalArgumentException if
       *     there was a problem with the specified <CODE>
       *     DataHandler</CODE> object
       */
      public abstract void setDataHandler(DataHandler datahandler);
  
      /**
       * Gets the value of the MIME header whose name is
       * "Content-Id".
       * @return  a <CODE>String</CODE> giving the value of the
       *     "Content-Id" header or <CODE>null</CODE> if there is
       *     none
       * @see #setContentId(java.lang.String) setContentId(java.lang.String)
       */
      public String getContentId() {
  
          String as[] = getMimeHeader("Content-Id");
  
          if (as != null) {
              return as[0];
          } else {
              return null;
          }
      }
  
      /**
       * Gets the value of the MIME header
       * "Content-Location".
       * @return  a <CODE>String</CODE> giving the value of the
       *     "Content-Location" header or <CODE>null</CODE> if there
       *     is none
       */
      public String getContentLocation() {
  
          String as[] = getMimeHeader("Content-Location");
  
          if (as != null) {
              return as[0];
          } else {
              return null;
          }
      }
  
      /**
       * Gets the value of the MIME header "Content-Type".
       * @return  a <CODE>String</CODE> giving the value of the
       *     "Content-Type" header or <CODE>null</CODE> if there is
       *     none
       */
      public String getContentType() {
  
          String as[] = getMimeHeader("Content-Type");
  
          if (as != null) {
              return as[0];
          } else {
              return null;
          }
      }
  
      /**
       * Sets the MIME header "Content-Id" with the given
       * value.
       * @param  contentId a <CODE>String</CODE> giving
       *     the value of the "Content-Id" header
       * @throws java.lang.IllegalArgumentException if
       *     there was a problem with the specified <CODE>
       *     contentId</CODE> value
       * @see #getContentId() getContentId()
       */
      public void setContentId(String contentId) {
          setMimeHeader("Content-Id", contentId);
      }
  
      /**
       * Sets the MIME header "Content-Location" with the given
       * value.
       * @param  contentLocation a <CODE>String</CODE>
       *     giving the value of the "Content-Location" header
       * @throws java.lang.IllegalArgumentException if
       *     there was a problem with the specified content
       *     location
       */
      public void setContentLocation(String contentLocation) {
          setMimeHeader("Content-Location", contentLocation);
      }
  
      /**
       * Sets the MIME header "Content-Type" with the given
       * value.
       * @param  contentType  a <CODE>String</CODE>
       *     giving the value of the "Content-Type" header
       * @throws java.lang.IllegalArgumentException if
       * there was a problem with the specified content type
       */
      public void setContentType(String contentType) {
          setMimeHeader("Content-Type", contentType);
      }
  
      /**
       * Removes all MIME headers that match the given name.
       * @param  header - the string name of the MIME
       *     header/s to be removed
       */
      public abstract void removeMimeHeader(String header);
  
      /** Removes all the MIME header entries. */
      public abstract void removeAllMimeHeaders();
  
      /**
       * Gets all the values of the header identified by the given
       * <CODE>String</CODE>.
       * @param   name  the name of the header; example:
       *     "Content-Type"
       * @return a <CODE>String</CODE> array giving the value for the
       *     specified header
       * @see #setMimeHeader(java.lang.String, java.lang.String) setMimeHeader(java.lang.String, java.lang.String)
       */
      public abstract String[] getMimeHeader(String name);
  
      /**
       * Changes the first header entry that matches the given name
       *   to the given value, adding a new header if no existing
       *   header matches. This method also removes all matching
       *   headers but the first.
       *
       *   <P>Note that RFC822 headers can only contain US-ASCII
       *   characters.</P>
       * @param  name   a <CODE>String</CODE> giving the
       *     name of the header for which to search
       * @param  value  a <CODE>String</CODE> giving the
       *     value to be set for the header whose name matches the
       *     given name
       * @throws java.lang.IllegalArgumentException if
       *     there was a problem with the specified mime header name
       *     or value
       */
      public abstract void setMimeHeader(String name, String value);
  
      /**
       * Adds a MIME header with the specified name and value to
       *   this <CODE>AttachmentPart</CODE> object.
       *
       *   <P>Note that RFC822 headers can contain only US-ASCII
       *   characters.</P>
       * @param  name   a <CODE>String</CODE> giving the
       *     name of the header to be added
       * @param  value  a <CODE>String</CODE> giving the
       *     value of the header to be added
       * @throws java.lang.IllegalArgumentException if
       *     there was a problem with the specified mime header name
       *     or value
       */
      public abstract void addMimeHeader(String name, String value);
  
      /**
       * Retrieves all the headers for this <CODE>
       * AttachmentPart</CODE> object as an iterator over the <CODE>
       * MimeHeader</CODE> objects.
       * @return  an <CODE>Iterator</CODE> object with all of the Mime
       *     headers for this <CODE>AttachmentPart</CODE> object
       */
      public abstract Iterator getAllMimeHeaders();
  
      /**
       * Retrieves all <CODE>MimeHeader</CODE> objects that match
       * a name in the given array.
       * @param   names a <CODE>String</CODE> array with
       *     the name(s) of the MIME headers to be returned
       * @return all of the MIME headers that match one of the names
       *     in the given array as an <CODE>Iterator</CODE>
       *     object
       */
      public abstract Iterator getMatchingMimeHeaders(String names[]);
  
      /**
       * Retrieves all <CODE>MimeHeader</CODE> objects whose name
       * does not match a name in the given array.
       * @param   names  a <CODE>String</CODE> array with
       *     the name(s) of the MIME headers not to be returned
       * @return all of the MIME headers in this <CODE>
       *     AttachmentPart</CODE> object except those that match one
       *     of the names in the given array. The nonmatching MIME
       *     headers are returned as an <CODE>Iterator</CODE>
       *     object.
       */
      public abstract Iterator getNonMatchingMimeHeaders(String names[]);
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/Detail.java
  
  Index: Detail.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import java.util.Iterator;
  
  /**
   * A container for <code>DetailEntry</code> objects. <code>DetailEntry</code>
   * objects give detailed error information that is application-specific and
   * related to the <code>SOAPBody</code> object that contains it.
   * <P>
   * A <code>Detail</code> object, which is part of a <code>SOAPFault</code>
   * object, can be retrieved using the method <code>SOAPFault.getDetail</code>.
   * The <code>Detail</code> interface provides two methods. One creates a new
   * <code>DetailEntry</code> object and also automatically adds it to
   * the <code>Detail</code> object. The second method gets a list of the
   * <code>DetailEntry</code> objects contained in a <code>Detail</code>
   * object.
   * <P>
   * The following code fragment, in which <i>sf</i> is a <code>SOAPFault</code>
   * object, gets its <code>Detail</code> object (<i>d</i>), adds a new
   * <code>DetailEntry</code> object to <i>d</i>, and then gets a list of all the
   * <code>DetailEntry</code> objects in <i>d</i>. The code also creates a
   * <code>Name</code> object to pass to the method <code>addDetailEntry</code>.
   * The variable <i>se</i>, used to create the <code>Name</code> object,
   * is a <code>SOAPEnvelope</code> object.
   * <PRE>
   *    Detail d = sf.getDetail();
   *    Name name = se.createName("GetLastTradePrice", "WOMBAT",
   *                                "http://www.wombat.org/trader");
   *    d.addDetailEntry(name);
   *    Iterator it = d.getDetailEntries();
   * </PRE>
   */
  public interface Detail extends SOAPFaultElement {
  
      /**
       * Creates a new <code>DetailEntry</code> object with the given
       * name and adds it to this <code>Detail</code> object.
       * @param   name a <code>Name</code> object identifying the new <code>DetailEntry</code> object
       * @return DetailEntry.
       * @throws SOAPException  thrown when there is a problem in adding a DetailEntry object to this Detail object.
       */
      public abstract DetailEntry addDetailEntry(Name name) throws SOAPException;
  
      /**
       * Gets a list of the detail entries in this <code>Detail</code> object.
       * @return  an <code>Iterator</code> object over the <code>DetailEntry</code>
       *        objects in this <code>Detail</code> object
       */
      public abstract Iterator getDetailEntries();
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/DetailEntry.java
  
  Index: DetailEntry.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * The content for a <code>Detail</code> object, giving details for
   * a <code>SOAPFault</code> object.  A <code>DetailEntry</code> object,
   * which carries information about errors related to the <code>SOAPBody</code>
   * object that contains it, is application-specific.
   * <P>
   */
  public interface DetailEntry extends SOAPElement {}
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/FactoryFinder.java
  
  Index: FactoryFinder.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import java.io.BufferedReader;
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.InputStreamReader;
  
  import java.util.Properties;
  
  /**
   * TODO: Put description here.
   * <p>
   * @author  name TODO: put author's name here.
   */
  class FactoryFinder {
  
      /** TODO: Put description here. */
      FactoryFinder() {}
  
      /**
       * TODO: Put description here.
       * <p>
       * @param   s              String.
       * @param   classloader    ClassLoader.
       * @return                 Object.
       * @throws  SOAPException  TODO: Put exception class-name and description here.
       */
      private static Object newInstance(String s, ClassLoader classloader)
              throws SOAPException {
  
          try {
              Class class1;
  
              if (classloader == null) {
                  class1 = Class.forName(s);
              } else {
                  class1 = classloader.loadClass(s);
              }
  
              return class1.newInstance();
          } catch (ClassNotFoundException classnotfoundexception) {
              throw new SOAPException("Provider " + s + " not found",
                                      classnotfoundexception);
          } catch (Exception exception) {
              throw new SOAPException("Provider " + s
                                      + " could not be instantiated: "
                                      + exception, exception);
          }
      }
  
      /**
       * TODO: Put description here.
       * <p>
       * @param   s              String.
       * @param   s1             String.
       * @return                 Object.
       * @throws  SOAPException  TODO: Put exception class-name and description here.
       */
      static Object find(String s, String s1) throws SOAPException {
  
          ClassLoader classloader;
  
          try {
              classloader = Thread.currentThread().getContextClassLoader();
          } catch (Exception exception) {
              throw new SOAPException(exception.toString(), exception);
          }
  
          try {
              String s2 = System.getProperty(s);
  
              if (s2 != null) {
                  return newInstance(s2, classloader);
              }
          } catch (SecurityException securityexception) {}
  
          try {
              String s3   = System.getProperty("java.home");
              String s5   = s3 + File.separator + "lib" + File.separator
                            + "jaxm.properties";
              File   file = new File(s5);
  
              if (file.exists()) {
                  Properties properties = new Properties();
  
                  properties.load(new FileInputStream(file));
  
                  String s7 = properties.getProperty(s);
  
                  return newInstance(s7, classloader);
              }
          } catch (Exception exception1) {}
  
          String s4 = "META-INF/services/" + s;
  
          try {
              java.io.InputStream inputstream = null;
  
              if (classloader == null) {
                  inputstream = ClassLoader.getSystemResourceAsStream(s4);
              } else {
                  inputstream = classloader.getResourceAsStream(s4);
              }
  
              if (inputstream != null) {
                  BufferedReader bufferedreader =
                      new BufferedReader(new InputStreamReader(inputstream,
                          "UTF-8"));
                  String         s6             = bufferedreader.readLine();
  
                  bufferedreader.close();
  
                  if ((s6 != null) &&!"".equals(s6)) {
                      return newInstance(s6, classloader);
                  }
              }
          } catch (Exception exception2) {}
  
          if (s1 == null) {
              throw new SOAPException("Provider for " + s + " cannot be found",
                                      null);
          } else {
              return newInstance(s1, classloader);
          }
      }
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/MessageFactory.java
  
  Index: MessageFactory.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import java.io.IOException;
  import java.io.InputStream;
  
  /**
   * <P>A factory for creating <CODE>SOAPMessage</CODE> objects.</P>
   *
   *   <P>A JAXM client performs the following steps to create a
   *   message.</P>
   *
   *   <UL>
   *     <LI>
   *       Creates a <CODE>MessageFactory</CODE> object from a <CODE>
   *       ProviderConnection</CODE> object (<CODE>con</CODE> in the
   *       following line of code). The <CODE>String</CODE> passed to
   *       the <CODE>createMessageFactory</CODE> method is the name of
   *       of a messaging profile, which must be the URL for the
   *       schema.
   * <PRE>
   *      MessageFactory mf = con.createMessageFactory(schemaURL);
   * </PRE>
   *     </LI>
   *
   *     <LI>
   *       Calls the method <CODE>createMessage</CODE> on the <CODE>
   *       MessageFactory</CODE> object. All messages produced by this
   *       <CODE>MessageFactory</CODE> object will have the header
   *       information appropriate for the messaging profile that was
   *       specified when the <CODE>MessageFactory</CODE> object was
   *       created.
   * <PRE>
   *      SOAPMessage m = mf.createMessage();
   * </PRE>
   *     </LI>
   *   </UL>
   *   It is also possible to create a <CODE>MessageFactory</CODE>
   *   object using the method <CODE>newInstance</CODE>, as shown in
   *   the following line of code.
   * <PRE>
   *      MessageFactory mf = MessageFactory.newInstance();
   * </PRE>
   *   A standalone client (a client that is not running in a
   *   container) can use the <CODE>newInstance</CODE> method to
   *   create a <CODE>MessageFactory</CODE> object.
   *
   *   <P>All <CODE>MessageFactory</CODE> objects, regardless of how
   *   they are created, will produce <CODE>SOAPMessage</CODE> objects
   *   that have the following elements by default:</P>
   *
   *   <UL>
   *     <LI>A <CODE>SOAPPart</CODE> object</LI>
   *
   *     <LI>A <CODE>SOAPEnvelope</CODE> object</LI>
   *
   *     <LI>A <CODE>SOAPBody</CODE> object</LI>
   *
   *     <LI>A <CODE>SOAPHeader</CODE> object</LI>
   *   </UL>
   *   If a <CODE>MessageFactory</CODE> object was created using a
   *   <CODE>ProviderConnection</CODE> object, which means that it was
   *   initialized with a specified profile, it will produce messages
   *   that also come prepopulated with additional entries in the
   *   <CODE>SOAPHeader</CODE> object and the <CODE>SOAPBody</CODE>
   *   object. The content of a new <CODE>SOAPMessage</CODE> object
   *   depends on which of the two <CODE>MessageFactory</CODE> methods
   *   is used to create it.
   *
   *   <UL>
   *     <LI><CODE>createMessage()</CODE> -- message has no
   *     content<BR>
   *      This is the method clients would normally use to create a
   *     request message.</LI>
   *
   *     <LI><CODE>createMessage(MimeHeaders,
   *     java.io.InputStream)</CODE> -- message has content from the
   *     <CODE>InputStream</CODE> object and headers from the <CODE>
   *     MimeHeaders</CODE> object<BR>
   *      This method can be used internally by a service
   *     implementation to create a message that is a response to a
   *     request.</LI>
   *   </UL>
   */
  public abstract class MessageFactory {
  
      /**  */
      public MessageFactory() {}
  
      /**
       * Creates a new <CODE>MessageFactory</CODE> object that is
       * an instance of the default implementation.
       * @return a new <CODE>MessageFactory</CODE> object
       * @throws  SOAPException  if there was an error in
       *     creating the default implementation of the <CODE>
       *     MessageFactory</CODE>
       */
      public static MessageFactory newInstance() throws SOAPException {
  
          try {
              return (MessageFactory) FactoryFinder.find(
                  "javax.xml.soap.MessageFactory",
                  "com.sun.xml.messaging.soap.MessageFactoryImpl");
          } catch (Exception exception) {
              throw new SOAPException(
                  "Unable to create message factory for SOAP: "
                  + exception.getMessage());
          }
      }
  
      /**
       * Creates a new <CODE>SOAPMessage</CODE> object with the
       *   default <CODE>SOAPPart</CODE>, <CODE>SOAPEnvelope</CODE>,
       *   <CODE>SOAPBody</CODE>, and <CODE>SOAPHeader</CODE> objects.
       *   Profile-specific message factories can choose to
       *   prepopulate the <CODE>SOAPMessage</CODE> object with
       *   profile-specific headers.
       *
       *   <P>Content can be added to this message's <CODE>
       *   SOAPPart</CODE> object, and the message can be sent "as is"
       *   when a message containing only a SOAP part is sufficient.
       *   Otherwise, the <CODE>SOAPMessage</CODE> object needs to
       *   create one or more <CODE>AttachmentPart</CODE> objects and
       *   add them to itself. Any content that is not in XML format
       *   must be in an <CODE>AttachmentPart</CODE> object.</P>
       * @return  a new <CODE>SOAPMessage</CODE> object
       * @throws  SOAPException if a SOAP error occurs
       */
      public abstract SOAPMessage createMessage() throws SOAPException;
  
      /**
       * TODO: Internalizes the contents of the given <CODE>
       * InputStream</CODE> object into a new <CODE>SOAPMessage</CODE>
       * object and returns the <CODE>SOAPMessage</CODE> object.
       * @param   mimeheaders    the transport-specific headers
       *     passed to the message in a transport-independent fashion
       *     for creation of the message
       * @param   inputstream    the <CODE>InputStream</CODE> object
       *     that contains the data for a message
       * @return a new <CODE>SOAPMessage</CODE> object containing the
       *     data from the given <CODE>InputStream</CODE> object
       * @throws  IOException    if there is a
       *     problem in reading data from the input stream
       * @throws  SOAPException  if the message is invalid
       */
      public abstract SOAPMessage createMessage(
          MimeHeaders mimeheaders, InputStream inputstream)
              throws IOException, SOAPException;
  
      /**  */
      static Class clz = null;
  
      /**  */
      private static final String DEFAULT_MESSAGE_FACTORY =
          "com.sun.xml.messaging.soap.MessageFactoryImpl";
  
      /**  */
      private static final String MESSAGE_FACTORY_PROPERTY =
          "javax.xml.soap.MessageFactory";
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/MimeHeader.java
  
  Index: MimeHeader.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * An object that stores a MIME header name and its value. One
   *   or more <CODE>MimeHeader</CODE> objects may be contained in a
   *   <CODE>MimeHeaders</CODE> object.
   * @see MimeHeaders MimeHeaders
   */
  public class MimeHeader {
  
      /**
       * Constructs a <CODE>MimeHeader</CODE> object initialized
       * with the given name and value.
       * @param  name a <CODE>String</CODE> giving the
       *     name of the header
       * @param  value a <CODE>String</CODE> giving the
       *     value of the header
       */
      public MimeHeader(String name, String value) {
          this.name  = name;
          this.value = value;
      }
  
      /**
       * Returns the name of this <CODE>MimeHeader</CODE>
       * object.
       * @return  the name of the header as a <CODE>String</CODE>
       */
      public String getName() {
          return name;
      }
  
      /**
       * Returns the value of this <CODE>MimeHeader</CODE>
       * object.
       * @return the value of the header as a <CODE>String</CODE>
       */
      public String getValue() {
          return value;
      }
  
      /**  */
      private String name;
  
      /**  */
      private String value;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/MimeHeaders.java
  
  Index: MimeHeaders.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import java.util.Iterator;
  import java.util.Vector;
  
  /**
   * A container for <CODE>MimeHeader</CODE> objects, which
   *   represent the MIME headers present in a MIME part of a
   *   message.</P>
   *
   *   <P>This class is used primarily when an application wants to
   *   retrieve specific attachments based on certain MIME headers and
   *   values. This class will most likely be used by implementations
   *   of <CODE>AttachmentPart</CODE> and other MIME dependent parts
   *   of the JAXM API.
   * @see SOAPMessage#getAttachments() SOAPMessage.getAttachments()
   * @see AttachmentPart AttachmentPart
   */
  public class MimeHeaders {
  
      /**  */
      class MatchingIterator implements Iterator {
  
          /**
           *
           * @return
           */
          private Object nextMatch() {
  
              label0:
              while (iterator.hasNext()) {
                  MimeHeader mimeheader = (MimeHeader) iterator.next();
  
                  if (names == null) {
                      return match
                             ? null
                             : mimeheader;
                  }
  
                  for (int i = 0; i < names.length; i++) {
                      if (!mimeheader.getName().equalsIgnoreCase(names[i])) {
                          continue;
                      }
  
                      if (match) {
                          return mimeheader;
                      }
  
                      continue label0;
                  }
  
                  if (!match) {
                      return mimeheader;
                  }
              }
  
              return null;
          }
  
          /**
           *
           * @return
           */
          public boolean hasNext() {
  
              if (nextHeader == null) {
                  nextHeader = nextMatch();
              }
  
              return nextHeader != null;
          }
  
          /**
           *
           * @return
           */
          public Object next() {
  
              if (nextHeader != null) {
                  Object obj = nextHeader;
  
                  nextHeader = null;
  
                  return obj;
              }
  
              if (hasNext()) {
                  return nextHeader;
              } else {
                  return null;
              }
          }
  
          /**  */
          public void remove() {
              iterator.remove();
          }
  
          /**  */
          private boolean match;
  
          /**  */
          private Iterator iterator;
  
          /**  */
          private String names[];
  
          /**  */
          private Object nextHeader;
  
          /**
           *
           * @param as
           * @param flag
           */
          MatchingIterator(String as[], boolean flag) {
  
              match    = flag;
              names    = as;
              iterator = headers.iterator();
          }
      }
  
      /**
       * Constructs
       *   a default <CODE>MimeHeaders</CODE> object initialized with
       *   an empty <CODE>Vector</CODE> object.
       */
      public MimeHeaders() {
          headers = new Vector();
      }
  
      /**
       * Returns all of the values for the specified header as an
       * array of <CODE>String</CODE> objects.
       * @param   name  the name of the header for which
       *     values will be returned
       * @return a <CODE>String</CODE> array with all of the values
       *     for the specified header
       * @see #setHeader(java.lang.String, java.lang.String) setHeader(java.lang.String, java.lang.String)
       */
      public String[] getHeader(String name) {
  
          Vector vector = new Vector();
  
          for (int i = 0; i < headers.size(); i++) {
              MimeHeader mimeheader = (MimeHeader) headers.elementAt(i);
  
              if (mimeheader.getName().equalsIgnoreCase(name)
                      && (mimeheader.getValue() != null)) {
                  vector.addElement(mimeheader.getValue());
              }
          }
  
          if (vector.size() == 0) {
              return null;
          } else {
              String as[] = new String[vector.size()];
  
              vector.copyInto(as);
  
              return as;
          }
      }
  
      /**
       * Replaces the current value of the first header entry whose
       *   name matches the given name with the given value, adding a
       *   new header if no existing header name matches. This method
       *   also removes all matching headers after the first one.
       *
       *   <P>Note that RFC822 headers can contain only US-ASCII
       *   characters.</P>
       * @param  name a <CODE>String</CODE> with the
       *     name of the header for which to search
       * @param  value a <CODE>String</CODE> with the
       *     value that will replace the current value of the
       *     specified header
       */
      public void setHeader(String name, String value) {
  
          boolean flag = false;
  
          if ((name == null) || name.equals("") || (value == null)
                  || value.equals("")) {
              throw new IllegalArgumentException(
                  "Illegal MimeHeader name or value");
          }
  
          for (int i = 0; i < headers.size(); i++) {
              MimeHeader mimeheader = (MimeHeader) headers.elementAt(i);
  
              if (mimeheader.getName().equalsIgnoreCase(name)) {
                  if (!flag) {
                      headers.setElementAt(new MimeHeader(mimeheader
                          .getName(), value), i);
  
                      flag = true;
                  } else {
                      headers.removeElementAt(i--);
                  }
              }
          }
  
          if (!flag) {
              addHeader(name, value);
          }
      }
  
      /**
       * Adds a <CODE>MimeHeader</CODE> object with the specified
       *   name and value to this <CODE>MimeHeaders</CODE> object's
       *   list of headers.
       *
       *   <P>Note that RFC822 headers can contain only US-ASCII
       *   characters.</P>
       * @param  name   a <CODE>String</CODE> with the
       *     name of the header to be added
       * @param  value  a <CODE>String</CODE> with the
       *     value of the header to be added
       * @throws java.lang.IllegalArgumentException if
       *     there was a problem in the mime header name or value
       *     being added
       */
      public void addHeader(String name, String value) {
  
          if ((name == null) || name.equals("") || (value == null)
                  || value.equals("")) {
              throw new IllegalArgumentException(
                  "Illegal MimeHeader name or value");
          }
  
          int i = headers.size();
  
          for (int j = i - 1; j >= 0; j--) {
              MimeHeader mimeheader = (MimeHeader) headers.elementAt(j);
  
              if (mimeheader.getName().equalsIgnoreCase(name)) {
                  headers.insertElementAt(new MimeHeader(name, value), j + 1);
  
                  return;
              }
          }
  
          headers.addElement(new MimeHeader(name, value));
      }
  
      /**
       * Remove all <CODE>MimeHeader</CODE> objects whose name
       * matches the the given name.
       * @param  name  a <CODE>String</CODE> with the
       *     name of the header for which to search
       */
      public void removeHeader(String name) {
  
          for (int i = 0; i < headers.size(); i++) {
              MimeHeader mimeheader = (MimeHeader) headers.elementAt(i);
  
              if (mimeheader.getName().equalsIgnoreCase(name)) {
                  headers.removeElementAt(i--);
              }
          }
      }
  
      /**
       * Removes all the header entries from this <CODE>
       * MimeHeaders</CODE> object.
       */
      public void removeAllHeaders() {
          headers.removeAllElements();
      }
  
      /**
       * Returns all the headers in this <CODE>MimeHeaders</CODE>
       * object.
       * @return  an <CODE>Iterator</CODE> object over this <CODE>
       *     MimeHeaders</CODE> object's list of <CODE>
       *     MimeHeader</CODE> objects
       */
      public Iterator getAllHeaders() {
          return headers.iterator();
      }
  
      /**
       * Returns all the <CODE>MimeHeader</CODE> objects whose
       * name matches a name in the given array of names.
       * @param   names an array of <CODE>String</CODE>
       *    objects with the names for which to search
       * @return  an <CODE>Iterator</CODE> object over the <CODE>
       *     MimeHeader</CODE> objects whose name matches one of the
       *     names in the given list
       */
      public Iterator getMatchingHeaders(String names[]) {
          return new MatchingIterator(names, true);
      }
  
      /**
       * Returns all of the <CODE>MimeHeader</CODE> objects whose
       * name does not match a name in the given array of names.
       * @param   names  an array of <CODE>String</CODE>
       *     objects with the names for which to search
       * @return an <CODE>Iterator</CODE> object over the <CODE>
       *     MimeHeader</CODE> objects whose name does not match one
       *     of the names in the given list
       */
      public Iterator getNonMatchingHeaders(String names[]) {
          return new MatchingIterator(names, false);
      }
  
      /**  */
      private Vector headers;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/Name.java
  
  Index: Name.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * A representation of an XML name.  This interface provides methods for
   * getting the local and namespace-qualified names and also for getting the
   * prefix associated with the namespace for the name. It is also possible
   * to get the URI of the namespace.
   * <P>
   * The following is an example of a namespace declaration in an element.
   * <PRE>
   *  &lt;wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader"&gt;
   * </PRE>
   * ("xmlns" stands for "XML namespace".)
   * The following
   * shows what the methods in the <code>Name</code> interface will return.
   * <UL>
   * <LI><code>getQualifiedName</code> will return "prefix:LocalName" =
   *     "WOMBAT:GetLastTradePrice"
   * <LI><code>getURI</code> will return "http://www.wombat.org/trader"
   * <LI><code>getLocalName</code> will return "GetLastTracePrice"
   * <LI><code>getPrefix</code> will return "WOMBAT"
   * </UL>
   * <P>
   * XML namespaces are used to disambiguate SOAP identifiers from
   * application-specific identifiers.
   * <P>
   * <code>Name</code> objects are created using the method
   * <code>SOAPEnvelope.createName</code>, which has two versions.
   * One method creates <code>Name</code> objects with
   * a local name, a namespace prefix, and a namespace URI.
   * and the second creates <code>Name</code> objects with just a local name.
   * The following line of
   * code, in which <i>se</i> is a <code>SOAPEnvelope</code> object, creates a new
   * <code>Name</code> object with all three.
   * <PRE>
   *    Name name = se.createName("GetLastTradePrice", "WOMBAT",
   *                               "http://www.wombat.org/trader");
   * </PRE>
   * The following line of code gives an example of how a <code>Name</code> object
   * can be used. The variable <i>element</i> is a <code>SOAPElement</code> object.
   * This code creates a new <code>SOAPElement</code> object with the given name and
   * adds it to <i>element</i>.
   * <PRE>
   *    element.addChildElement(name);
   * </PRE>
   */
  public interface Name {
  
      /**
       * Gets the local name part of the XML name that this <code>Name</code>
       * object represents.
       * @return  a string giving the local name
       */
      public abstract String getLocalName();
  
      /**
       * Gets the namespace-qualified name of the XML name that this
       * <code>Name</code> object represents.
       * @return  the namespace-qualified name as a string
       */
      public abstract String getQualifiedName();
  
      /**
       * Returns the prefix associated with the namespace for the XML
       * name that this <code>Name</code> object represents.
       * @return  the prefix as a string
       */
      public abstract String getPrefix();
  
      /**
       * Returns the URI of the namespace for the XML
       * name that this <code>Name</code> object represents.
       * @return  the URI as a string
       */
      public abstract String getURI();
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/Node.java
  
  Index: Node.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * A representation of a node (element) in a DOM representation of an XML document
   * that provides some tree manipulation methods.
   * This interface provides methods for getting the value of a node, for
   * getting and setting the parent of a node, and for removing a node.
   */
  public interface Node {
  
      /**
       * Returns the the value of the immediate child of this <code>Node</code>
       * object if a child exists and its value is text.
       * @return  a <code>String</code> with the text of the immediate child of
       *    this <code>Node</code> object if (1) there is a child and
       *    (2) the child is a <code>Text</code> object;
       *      <code>null</code> otherwise
       */
      public abstract String getValue();
  
      /**
       * Sets the parent of this <code>Node</code> object to the given
       * <code>SOAPElement</code> object.
       * @param parent the <code>SOAPElement</code> object to be set as
       *  the parent of this <code>Node</code> object
       * @throws SOAPException if there is a problem in setting the
       *                     parent to the given element
       * @see #getParentElement() getParentElement()
       */
      public abstract void setParentElement(SOAPElement parent)
          throws SOAPException;
  
      /**
       * Returns the parent element of this <code>Node</code> object.
       * This method can throw an <code>UnsupportedOperationException</code>
       * if the tree is not kept in memory.
       * @return  the <code>SOAPElement</code> object that is the parent of
       *    this <code>Node</code> object or <code>null</code> if this
       *    <code>Node</code> object is root
       * @see #setParentElement(javax.xml.soap.SOAPElement) setParentElement(javax.xml.soap.SOAPElement)
       */
      public abstract SOAPElement getParentElement();
  
      /**
       * Removes this <code>Node</code> object from the tree. Once
       * removed, this node can be garbage collected if there are no
       * application references to it.
       */
      public abstract void detachNode();
  
      /**
       * Notifies the implementation that this <code>Node</code>
       * object is no longer being used by the application and that the
       * implementation is free to reuse this object for nodes that may
       * be created later.
       * <P>
       * Calling the method <code>recycleNode</code> implies that the method
       * <code>detachNode</code> has been called previously.
       */
      public abstract void recycleNode();
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPBody.java
  
  Index: SOAPBody.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * An object that represents the contents of the SOAP body
   * element in a SOAP message. A SOAP body element consists of XML data
   * that affects the way the application-specific content is processed.
   * <P>
   * A <code>SOAPBody</code> object contains <code>SOAPBodyElement</code>
   * objects, which have the content for the SOAP body.
   * A <code>SOAPFault</code> object, which carries status and/or
   * error information, is an example of a <code>SOAPBodyElement</code> object.
   * @see SOAPFault SOAPFault
   */
  public interface SOAPBody extends SOAPElement {
  
      /**
       * Creates a new <code>SOAPFault</code> object and adds it to
       * this <code>SOAPBody</code> object.
       * @return the new <code>SOAPFault</code> object
       * @throws  SOAPException if there is a SOAP error
       */
      public abstract SOAPFault addFault() throws SOAPException;
  
      /**
       * Indicates whether a <code>SOAPFault</code> object exists in
       * this <code>SOAPBody</code> object.
       * @return <code>true</code> if a <code>SOAPFault</code> object exists in
       *     this <code>SOAPBody</code> object; <code>false</code>
       *     otherwise
       */
      public abstract boolean hasFault();
  
      /**
       * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
       * object.
       * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
       *    object
       */
      public abstract SOAPFault getFault();
  
      /**
       * Creates a new <code>SOAPBodyElement</code> object with the
       * specified name and adds it to this <code>SOAPBody</code> object.
       * @param name a <code>Name</code> object with the name for the new
       *   <code>SOAPBodyElement</code> object
       * @return the new <code>SOAPBodyElement</code> object
       * @throws SOAPException  if a SOAP error occurs
       */
      public abstract SOAPBodyElement addBodyElement(Name name)
          throws SOAPException;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPBodyElement.java
  
  Index: SOAPBodyElement.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * A <code>SOAPBodyElement</code> object represents the contents in
   * a <code>SOAPBody</code> object.  The <code>SOAPFault</code> interface
   * is a <code>SOAPBodyElement</code> object that has been defined.
   * <P>
   * A new <code>SOAPBodyElement</code> object can be created and added
   * to a <code>SOAPBody</code> object with the <code>SOAPBody</code>
   * method <code>addBodyElement</code>. In the following line of code,
   * <code>sb</code> is a <code>SOAPBody</code> object, and
   * <code>myName</code> is a <code>Name</code> object.
   * <PRE>
   *   SOAPBodyElement sbe = sb.addBodyElement(myName);
   * </PRE>
   */
  public interface SOAPBodyElement extends SOAPElement {}
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPConnection.java
  
  Index: SOAPConnection.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import javax.xml.messaging.Endpoint;
  
  /**
   * <P>A point-to-point connection that a client can use for
   *   sending messages directly to a remote party (represented by a
   *   URL, for instance) without using a messaging provider. A
   *   standalone client uses a <CODE>SOAPConnection</CODE> object
   *   rather than a <CODE>ProviderConnection</CODE> object.</P>
   *
   *   <P>A client can obtain a <CODE>SOAPConnection</CODE> object
   *   simply by calling the following static method.</P>
   * <PRE>
   *     SOAPConnection con = SOAPConnection.newInstance();
   * </PRE>
   *   A <CODE>SOAPConnection</CODE> object can be used to send
   *   messages directly to a URL following the request/response
   *   paradigm. That is, messages are sent using the method <CODE>
   *   call</CODE>, which sends the message and then waits until it
   *   gets a reply.
   */
  public abstract class SOAPConnection {
  
      /**  */
      public SOAPConnection() {}
  
      /**
       * Sends the given message to the specified endpoint and
       * blocks until it has returned the response.
       * @param   request the <CODE>SOAPMessage</CODE>
       *     object to be sent
       * @param   endpoint a <CODE>URLEndpoint</CODE>
       *     object giving the URL to which the message should be
       *     sent
       * @return the <CODE>SOAPMessage</CODE> object that is the
       *     response to the message that was sent
       * @throws  SOAPException if there is a SOAP error
       */
      public abstract SOAPMessage call(SOAPMessage request, Endpoint endpoint)
          throws SOAPException;
  
      /**
       * Closes this <CODE>SOAPConnection</CODE> object.
       * @throws  SOAPException if there is a SOAP error
       */
      public abstract void close() throws SOAPException;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPConnectionFactory.java
  
  Index: SOAPConnectionFactory.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**  */
  public abstract class SOAPConnectionFactory {
  
      /**  */
      public SOAPConnectionFactory() {}
  
      /**
       * Creates an instance of the default <CODE>
       * SOAPConnectionFactory</CODE> object.
       * @return a new instance of a default <CODE>
       *     SOAPConnectionFactory</CODE> object
       * @throws  SOAPException  if there was an error creating
       *     the <CODE>SOAPConnectionFactory
       */
      public static SOAPConnectionFactory newInstance() throws SOAPException {
  
          try {
              return (SOAPConnectionFactory) FactoryFinder.find(
                  "javax.xml.soap.SOAPConnectionFactory",
                  "com.sun.xml.messaging.client.p2p.HttpSOAPConnectionFactory");
          } catch (Exception exception) {
              throw new SOAPException("Unable to create SOAP connection factory: "
                                      + exception.getMessage());
          }
      }
  
      /**
       * Create a new <CODE>SOAPConnection</CODE>.
       * @return the new <CODE>SOAPConnection</CODE> object.
       * @throws  SOAPException if there was an exception
       *     creating the <CODE>SOAPConnection</CODE> object.
       */
      public abstract SOAPConnection createConnection() throws SOAPException;
  
      /**  */
      private static final String DEFAULT_SOAP_CONNECTION_FACTORY =
          "com.sun.xml.messaging.client.p2p.HttpSOAPConnectionFactory";
  
      /**  */
      private static final String SF_PROPERTY =
          "javax.xml.soap.SOAPConnectionFactory";
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPConstants.java
  
  Index: SOAPConstants.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /** The definition of constants pertaining to the SOAP 1.1 protocol. */
  public interface SOAPConstants {
  
      /** The namespace identifier for the SOAP envelope. */
      public static final String URI_NS_SOAP_ENVELOPE =
          "http://schemas.xmlsoap.org/soap/envelope/";
  
      /**
       * The namespace identifier for the SOAP encoding (see section 5 of
       * the SOAP 1.1 specification). 
       */
      public static final String URI_NS_SOAP_ENCODING =
          "http://schemas.xmlsoap.org/soap/encoding/";
  
      /**
       * The URI identifying the first application processing a SOAP request as the intended
       * actor for a SOAP header entry (see section 4.2.2 of the SOAP 1.1 specification). 
       */
      public static final String URI_SOAP_ACTOR_NEXT =
          "http://schemas.xmlsoap.org/soap/actor/next";
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPElement.java
  
  Index: SOAPElement.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import java.util.Iterator;
  
  /**
   * An object representing the contents in a
   * <code>SOAPBody</code> object, the contents in a <code>SOAPHeader</code>
   * object, the content that can follow the <code>SOAPBody</code> object in a
   * <code>SOAPEnvelope</code> object, or what can follow the detail element
   * in a <code>SOAPFault</code> object. It is
   * the base class for all of the classes that represent the SOAP objects as
   * defined in the SOAP specification.
   */
  public interface SOAPElement extends Node {
  
      /**
       * Creates a new <code>SOAPElement</code> object initialized with the
       * given <code>Name</code> object and adds the new element to this
       * <code>SOAPElement</code> object.
       * @param   name a <code>Name</code> object with the XML name for the
       *   new element
       * @return the new <code>SOAPElement</code> object that was created
       * @throws  SOAPException  if there is an error in creating the
       *                     <code>SOAPElement</code> object
       */
      public abstract SOAPElement addChildElement(Name name) throws SOAPException;
  
      /**
       * Creates a new <code>SOAPElement</code> object initialized with the
       * given <code>String</code> object and adds the new element to this
       * <code>SOAPElement</code> object.
       * @param   localName a <code>String</code> giving the local name for
       *     the element
       * @return the new <code>SOAPElement</code> object that was created
       * @throws  SOAPException  if there is an error in creating the
       *                     <code>SOAPElement</code> object
       */
      public abstract SOAPElement addChildElement(String localName)
          throws SOAPException;
  
      /**
       * Creates a new <code>SOAPElement</code> object initialized with the
       * specified local name and prefix and adds the new element to this
       * <code>SOAPElement</code> object.
       * @param   localName a <code>String</code> giving the local name for
       *   the new element
       * @param   prefix a <code>String</code> giving the namespace prefix for
       *   the new element
       * @return the new <code>SOAPElement</code> object that was created
       * @throws  SOAPException  if there is an error in creating the
       *                     <code>SOAPElement</code> object
       */
      public abstract SOAPElement addChildElement(String localName, String prefix)
          throws SOAPException;
  
      /**
       * Creates a new <code>SOAPElement</code> object initialized with the
       * specified local name, prefix, and URI and adds the new element to this
       * <code>SOAPElement</code> object.
       * @param   localName a <code>String</code> giving the local name for
       *   the new element
       * @param   prefix  a <code>String</code> giving the namespace prefix for
       *   the new element
       * @param   uri  a <code>String</code> giving the URI of the namespace
       *   to which the new element belongs
       * @return the new <code>SOAPElement</code> object that was created
       * @throws  SOAPException  if there is an error in creating the
       *                     <code>SOAPElement</code> object
       */
      public abstract SOAPElement addChildElement(
          String localName, String prefix, String uri) throws SOAPException;
  
      /**
       * Add a <code>SOAPElement</code> as a child of this
       * <code>SOAPElement</code> instance. The <code>SOAPElement</code>
       * is expected to be created by a
       * <code>SOAPElementFactory</code>. Callers should not rely on the
       * element instance being added as is into the XML
       * tree. Implementations could end up copying the content
       * of the <code>SOAPElement</code> passed into an instance of
       * a different <code>SOAPElement</code> implementation. For
       * instance if <code>addChildElement()</code> is called on a
       * <code>SOAPHeader</code>, <code>element</code> will be copied
       * into an instance of a <code>SOAPHeaderElement</code>.
       *
       * <P>The fragment rooted in <code>element</code> is either added
       * as a whole or not at all, if there was an error.
       *
       * <P>The fragment rooted in <code>element</code> cannot contain
       * elements named "Envelope", "Header" or "Body" and in the SOAP
       * namespace. Any namespace prefixes present in the fragment
       * should be fully resolved using appropriate namespace
       * declarations within the fragment itself.
       * @param   element the <code>SOAPElement</code> to be added as a
       *           new child
       * @return  an instance representing the new SOAP element that was
       *    actually added to the tree.
       * @throws  SOAPException if there was an error in adding this
       *                     element as a child
       */
      public abstract SOAPElement addChildElement(SOAPElement element)
          throws SOAPException;
  
      /**
       * Creates a new <code>Text</code> object initialized with the given
       * <code>String</code> and adds it to this <code>SOAPElement</code> object.
       * @param   text a <code>String</code> object with the textual content to be added
       * @return  the <code>SOAPElement</code> object into which
       *    the new <code>Text</code> object was inserted
       * @throws  SOAPException  if there is an error in creating the
       *               new <code>Text</code> object
       */
      public abstract SOAPElement addTextNode(String text) throws SOAPException;
  
      /**
       * Adds an attribute with the specified name and value to this
       * <code>SOAPElement</code> object.
       * <p>
       * @param   name a <code>Name</code> object with the name of the attribute
       * @param   value a <code>String</code> giving the value of the attribute
       * @return  the <code>SOAPElement</code> object into which the attribute was
       *    inserted
       * @throws  SOAPException  if there is an error in creating the
       *                     Attribute
       */
      public abstract SOAPElement addAttribute(Name name, String value)
          throws SOAPException;
  
      /**
       * Adds a namespace declaration with the specified prefix and URI to this
       * <code>SOAPElement</code> object.
       * <p>
       * @param   prefix a <code>String</code> giving the prefix of the namespace
       * @param  uri a <CODE>String</CODE> giving
       *     the prefix of the namespace
       * @return  the <code>SOAPElement</code> object into which this
       *     namespace declaration was inserted.
       * @throws  SOAPException  if there is an error in creating the
       *                     namespace
       */
      public abstract SOAPElement addNamespaceDeclaration(
          String prefix, String uri) throws SOAPException;
  
      /**
       * Returns the value of the attribute with the specified
       * name.
       * @param   name  a <CODE>Name</CODE> object with
       *     the name of the attribute
       * @return a <CODE>String</CODE> giving the value of the
       *     specified attribute
       */
      public abstract String getAttributeValue(Name name);
  
      /**
       * Returns an iterator over all of the attribute names in
       * this <CODE>SOAPElement</CODE> object. The iterator can be
       * used to get the attribute names, which can then be passed to
       * the method <CODE>getAttributeValue</CODE> to retrieve the
       * value of each attribute.
       * @return  an iterator over the names of the attributes
       */
      public abstract Iterator getAllAttributes();
  
      /**
       * Returns the URI of the namespace that has the given
       * prefix.
       *
       * @param prefix a <CODE>String</CODE> giving
       *     the prefix of the namespace for which to search
       * @return a <CODE>String</CODE> with the uri of the namespace
       *     that has the given prefix
       */
      public abstract String getNamespaceURI(String prefix);
  
      /**
       * Returns an iterator of namespace prefixes. The iterator
       * can be used to get the namespace prefixes, which can then be
       * passed to the method <CODE>getNamespaceURI</CODE> to retrieve
       * the URI of each namespace.
       * @return  an iterator over the namespace prefixes in this
       *     <CODE>SOAPElement</CODE> object
       */
      public abstract Iterator getNamespacePrefixes();
  
      /**
       * Returns the name of this <CODE>SOAPElement</CODE>
       * object.
       * @return  a <CODE>Name</CODE> object with the name of this
       *     <CODE>SOAPElement</CODE> object
       */
      public abstract Name getElementName();
  
      /**
       * Removes the attribute with the specified name.
       * @param   name  the <CODE>Name</CODE> object with
       *     the name of the attribute to be removed
       * @return <CODE>true</CODE> if the attribute was removed
       *     successfully; <CODE>false</CODE> if it was not
       */
      public abstract boolean removeAttribute(Name name);
  
      /**
       * Removes the namespace declaration corresponding to the
       * given prefix.
       * @param   prefix  a <CODE>String</CODE> giving
       *     the prefix for which to search
       * @return <CODE>true</CODE> if the namespace declaration was
       *     removed successfully; <CODE>false</CODE> if it was
       *     not
       */
      public abstract boolean removeNamespaceDeclaration(String prefix);
  
      /**
       * Returns an iterator over all the immediate content of
       * this element. This includes <CODE>Text</CODE> objects as well
       * as <CODE>SOAPElement</CODE> objects.
       * @return  an iterator with the content of this <CODE>
       *     SOAPElement</CODE> object
       */
      public abstract Iterator getChildElements();
  
      /**
       * Returns an iterator over all the child elements with the
       * specified name.
       * @param   name  a <CODE>Name</CODE> object with
       *     the name of the child elements to be returned
       * @return an <CODE>Iterator</CODE> object over all the elements
       *     in this <CODE>SOAPElement</CODE> object with the
       *     specified name
       */
      public abstract Iterator getChildElements(Name name);
  
      /**
       * Sets the encoding style for this <CODE>SOAPElement</CODE>
       * object to one specified.
       * @param   encodingStyle a <CODE>String</CODE>
       *     giving the encoding style
       * @throws  SOAPException  if
       *     there was a problem in the encoding style being set.
       * @see #getEncodingStyle() getEncodingStyle()
       */
      public abstract void setEncodingStyle(String encodingStyle)
          throws SOAPException;
  
      /**
       * Returns the encoding style for this <CODE>
       * SOAPElement</CODE> object.
       * @return  a <CODE>String</CODE> giving the encoding style
       * @see #setEncodingStyle(java.lang.String) setEncodingStyle(java.lang.String)
       */
      public abstract String getEncodingStyle();
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPElementFactory.java
  
  Index: SOAPElementFactory.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * <P><CODE>SOAPElementFactory</CODE> is a factory for XML
   * fragments that will eventually end up in the SOAP part. These
   * fragments can be inserted as children of the <CODE>
   * SOAPHeader</CODE> or <CODE>SOAPBody</CODE> or <CODE>
   * SOAPEnvelope</CODE>.</P>
   *
   * <P>Elements created using this factory do not have the
   * properties of an element that lives inside a SOAP header
   * document. These elements are copied into the XML document tree
   * when they are inserted.</P>
   */
  public abstract class SOAPElementFactory {
  
      /**  */
      public SOAPElementFactory() {}
  
      /**
       * Create a <CODE>SOAPElement</CODE> object initialized with
       * the given <CODE>Name</CODE> object.
       * @param   name a <CODE>Name</CODE> object with
       *     the XML name for the new element
       * @return the new <CODE>SOAPElement</CODE> object that was
       *     created
       * @throws  SOAPException if there is an error in
       *     creating the <CODE>SOAPElement</CODE> object
       */
      public abstract SOAPElement create(Name name) throws SOAPException;
  
      /**
       * Create a <CODE>SOAPElement</CODE> object initialized with
       * the given local name.
       * @param   localName a <CODE>String</CODE> giving
       *     the local name for the new element
       * @return the new <CODE>SOAPElement</CODE> object that was
       *     created
       * @throws  SOAPException if there is an error in
       *     creating the <CODE>SOAPElement</CODE> object
       */
      public abstract SOAPElement create(String localName) throws SOAPException;
  
      /**
       * TODO: Create a new <CODE>SOAPElement</CODE> object with the
       * given local name, prefix and uri.
       * @param   localName a <CODE>String</CODE> giving
       *     the local name for the new element
       * @param   prefix the prefix for this <CODE>
       *     SOAPElement</CODE>
       * @param   uri a <CODE>String</CODE> giving the
       *     URI of the namespace to which the new element
       *     belongs
       * @return the new <CODE>SOAPElement</CODE> object that was
       *     created
       * @throws  SOAPException if there is an error in
       *     creating the <CODE>SOAPElement</CODE> object
       */
      public abstract SOAPElement create(
          String localName, String prefix, String uri) throws SOAPException;
  
      /**
       * Creates a new instance of <CODE>
       * SOAPElementFactory</CODE>.
       * @return a new instance of a <CODE>
       *     SOAPElementFactory</CODE>
       * @throws  SOAPException if there was an error creating
       *     the default <CODE>SOAPElementFactory
       */
      public static SOAPElementFactory newInstance() throws SOAPException {
  
          try {
              return (SOAPElementFactory) FactoryFinder.find(
                  "javax.xml.soap.SOAPElementFactory",
                  "com.sun.xml.messaging.soap.SOAPElementFactoryImpl");
          } catch (Exception exception) {
              throw new SOAPException("Unable to create SOAP Element Factory: "
                                      + exception.getMessage());
          }
      }
  
      /**  */
      private static final String SEF_PROPERTY =
          "javax.xml.soap.SOAPElementFactory";
  
      /**  */
      private static final String DEFAULT_SEF =
          "com.sun.xml.messaging.soap.SOAPElementFactoryImpl";
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPEnvelope.java
  
  Index: SOAPEnvelope.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * The container for the SOAPHeader and SOAPBody portions of a
   *   <CODE>SOAPPart</CODE> object. By default, a <CODE>
   *   SOAPMessage</CODE> object is created with a <CODE>
   *   SOAPPart</CODE> object that has a <CODE>SOAPEnvelope</CODE>
   *   object. The <CODE>SOAPEnvelope</CODE> object by default has an
   *   empty <CODE>SOAPBody</CODE> object and an empty <CODE>
   *   SOAPHeader</CODE> object. The <CODE>SOAPBody</CODE> object is
   *   required, and the <CODE>SOAPHeader</CODE> object, though
   *   optional, is used in the majority of cases. If the <CODE>
   *   SOAPHeader</CODE> object is not needed, it can be deleted,
   *   which is shown later.</P>
   *
   *   <P>A client can access the <CODE>SOAPHeader</CODE> and <CODE>
   *   SOAPBody</CODE> objects by calling the methods <CODE>
   *   SOAPEnvelope.getHeader</CODE> and <CODE>
   *   SOAPEnvelope.getBody</CODE>. The following lines of code use
   *   these two methods after starting with the <CODE>
   *   SOAPMessage</CODE> object <I>message</I> to get the <CODE>
   *   SOAPPart</CODE> object <I>sp</I>, which is then used to get the
   *   <CODE>SOAPEnvelope</CODE> object <I>se</I>.</P>
   * <PRE>
   *    SOAPPart sp = message.getSOAPPart();
   *    SOAPEnvelope se = sp.getEnvelope();
   *    SOAPHeader sh = se.getHeader();
   *    SOAPBody sb = se.getBody();
   * </PRE>
   *
   *   <P>It is possible to change the body or header of a <CODE>
   *   SOAPEnvelope</CODE> object by retrieving the current one,
   *   deleting it, and then adding a new body or header. The <CODE>
   *   javax.xml.soap.Node</CODE> method <CODE>deleteNode</CODE>
   *   deletes the XML element (node) on which it is called. For
   *   example, the following line of code deletes the <CODE>
   *   SOAPBody</CODE> object that is retrieved by the method <CODE>
   *   getBody</CODE>.</P>
   * <PRE>
   *     se.getBody().detachNode();
   * </PRE>
   *   To create a <CODE>SOAPHeader</CODE> object to replace the one
   *   that was removed, a client uses the method <CODE>
   *   SOAPEnvelope.addHeader</CODE>, which creates a new header and
   *   adds it to the <CODE>SOAPEnvelope</CODE> object. Similarly, the
   *   method <CODE>addBody</CODE> creates a new <CODE>SOAPBody</CODE>
   *   object and adds it to the <CODE>SOAPEnvelope</CODE> object. The
   *   following code fragment retrieves the current header, removes
   *   it, and adds a new one. Then it retrieves the current body,
   *   removes it, and adds a new one.
   * <PRE>
   *    SOAPPart sp = message.getSOAPPart();
   *    SOAPEnvelope se = sp.getEnvelope();
   *    se.getHeader().detachNode();
   *    SOAPHeader sh = se.addHeader();
   *    se.getBody().detachNode();
   *    SOAPBody sb = se.addBody();
   * </PRE>
   *   It is an error to add a <CODE>SOAPBody</CODE> or <CODE>
   *   SOAPHeader</CODE> object if one already exists.
   *
   *   <P>The <CODE>SOAPEnvelope</CODE> interface provides three
   *   methods for creating <CODE>Name</CODE> objects. One method
   *   creates <CODE>Name</CODE> objects with a local name, a
   *   namespace prefix, and a namesapce URI. The second method
   *   creates <CODE>Name</CODE> objects with a local name and a
   *   namespace prefix, and the third creates <CODE>Name</CODE>
   *   objects with just a local name. The following line of code, in
   *   which <I>se</I> is a <CODE>SOAPEnvelope</CODE> object, creates
   *   a new <CODE>Name</CODE> object with all three.</P>
   * <PRE>
   *    Name name = se.createName("GetLastTradePrice", "WOMBAT",
   *                               "http://www.wombat.org/trader");
   * </PRE>
   */
  public interface SOAPEnvelope extends SOAPElement {
  
      /**
       * Creates a new <CODE>Name</CODE> object initialized with the
       *   given local name, namespace prefix, and namespace URI.
       *
       *   <P>This factory method creates <CODE>Name</CODE> objects
       *   for use in the SOAP/XML document.
       * @param   localName a <CODE>String</CODE> giving
       *     the local name
       * @param   prefix a <CODE>String</CODE> giving
       *     the prefix of the namespace
       * @param   uri  a <CODE>String</CODE> giving the
       *     URI of the namespace
       * @return a <CODE>Name</CODE> object initialized with the given
       *     local name, namespace prefix, and namespace URI
       * @throws  SOAPException  if there is a SOAP error
       */
      public abstract Name createName(String localName, String prefix, String uri)
          throws SOAPException;
  
      /**
       * Creates a new <CODE>Name</CODE> object initialized with the
       *   given local name.
       *
       *   <P>This factory method creates <CODE>Name</CODE> objects
       *   for use in the SOAP/XML document.
       *
       * @param localName a <CODE>String</CODE> giving
            the local name
       * @return a <CODE>Name</CODE> object initialized with the given
       *     local name
       * @throws  SOAPException  if there is a SOAP error
       */
      public abstract Name createName(String localName) throws SOAPException;
  
      /**
       * Returns the <CODE>SOAPHeader</CODE> object for this <CODE>
       *   SOAPEnvelope</CODE> object.
       *
       *   <P>A new <CODE>SOAPMessage</CODE> object is by default
       *   created with a <CODE>SOAPEnvelope</CODE> object that
       *   contains an empty <CODE>SOAPHeader</CODE> object. As a
       *   result, the method <CODE>getHeader</CODE> will always
       *   return a <CODE>SOAPHeader</CODE> object unless the header
       *   has been removed and a new one has not been added.
       * @return the <CODE>SOAPHeader</CODE> object or <CODE>
       *     null</CODE> if there is none
       * @throws  SOAPException if there is a problem
       *     obtaining the <CODE>SOAPHeader</CODE> object
       */
      public abstract SOAPHeader getHeader() throws SOAPException;
  
      /**
       * Returns the <CODE>SOAPBody</CODE> object associated with
       *   this <CODE>SOAPEnvelope</CODE> object.
       *
       *   <P>A new <CODE>SOAPMessage</CODE> object is by default
       *   created with a <CODE>SOAPEnvelope</CODE> object that
       *   contains an empty <CODE>SOAPBody</CODE> object. As a
       *   result, the method <CODE>getBody</CODE> will always return
       *   a <CODE>SOAPBody</CODE> object unless the body has been
       *   removed and a new one has not been added.
       * @return the <CODE>SOAPBody</CODE> object for this <CODE>
       *     SOAPEnvelope</CODE> object or <CODE>null</CODE> if there
       *     is none
       * @throws  SOAPException  if there is a problem
       *     obtaining the <CODE>SOAPBody</CODE> object
       */
      public abstract SOAPBody getBody() throws SOAPException;
  
      /**
       * Creates a <CODE>SOAPHeader</CODE> object and sets it as the
       *   <CODE>SOAPHeader</CODE> object for this <CODE>
       *   SOAPEnvelope</CODE> object.
       *
       *   <P>It is illegal to add a header when the envelope already
       *   contains a header. Therefore, this method should be called
       *   only after the existing header has been removed.
       * @return the new <CODE>SOAPHeader</CODE> object
       * @throws  SOAPException  if this <CODE>
       *     SOAPEnvelope</CODE> object already contains a valid
       *     <CODE>SOAPHeader</CODE> object
       */
      public abstract SOAPHeader addHeader() throws SOAPException;
  
      /**
       * Creates a <CODE>SOAPBody</CODE> object and sets it as the
       *   <CODE>SOAPBody</CODE> object for this <CODE>
       *   SOAPEnvelope</CODE> object.
       *
       *   <P>It is illegal to add a body when the envelope already
       *   contains a body. Therefore, this method should be called
       *   only after the existing body has been removed.
       * @return  the new <CODE>SOAPBody</CODE> object
       * @throws  SOAPException  if this <CODE>
       *     SOAPEnvelope</CODE> object already contains a valid
       *     <CODE>SOAPBody</CODE> object
       */
      public abstract SOAPBody addBody() throws SOAPException;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPException.java
  
  Index: SOAPException.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * An exception that signals that a SOAP exception has
   *   occurred. A <CODE>SOAPException</CODE> object may contain a
   *   <CODE>String</CODE> that gives the reason for the exception, an
   *   embedded <CODE>Throwable</CODE> object, or both. This class
   *   provides methods for retrieving reason messages and for
   *   retrieving the embedded <CODE>Throwable</CODE> object.</P>
   *
   *   <P>Typical reasons for throwing a <CODE>SOAPException</CODE>
   *   object are problems such as difficulty setting a header, not
   *   being able to send a message, and not being able to get a
   *   connection with the provider. Reasons for embedding a <CODE>
   *   Throwable</CODE> object include problems such as input/output
   *   errors or a parsing problem, such as an error in parsing a
   *   header.
   */
  public class SOAPException extends Exception {
  
      /**
       * Constructs a <CODE>SOAPException</CODE> object with no
       * reason or embedded <CODE>Throwable</CODE> object.
       */
      public SOAPException() {
          cause = null;
      }
  
      /**
       * Constructs a <CODE>SOAPException</CODE> object with the
       * given <CODE>String</CODE> as the reason for the exception
       * being thrown.
       * @param  reason  a description of what caused
       *     the exception
       */
      public SOAPException(String reason) {
  
          super(reason);
  
          cause = null;
      }
  
      /**
       * Constructs a <CODE>SOAPException</CODE> object with the
       * given <CODE>String</CODE> as the reason for the exception
       * being thrown and the given <CODE>Throwable</CODE> object as
       * an embedded exception.
       * @param  reason a description of what caused
       *     the exception
       * @param  cause  a <CODE>Throwable</CODE> object
       *     that is to be embedded in this <CODE>SOAPException</CODE>
       *     object
       */
      public SOAPException(String reason, Throwable cause) {
  
          super(reason);
  
          initCause(cause);
      }
  
      /**
       * Constructs a <CODE>SOAPException</CODE> object
       * initialized with the given <CODE>Throwable</CODE>
       * object.
       * @param  cause  a <CODE>Throwable</CODE> object
       *     that is to be embedded in this <CODE>SOAPException</CODE>
       *     object
       */
      public SOAPException(Throwable cause) {
  
          super(cause.toString());
  
          initCause(cause);
      }
  
      /**
       * Returns the detail message for this <CODE>
       *   SOAPException</CODE> object.
       *
       *   <P>If there is an embedded <CODE>Throwable</CODE> object,
       *   and if the <CODE>SOAPException</CODE> object has no detail
       *   message of its own, this method will return the detail
       *   message from the embedded <CODE>Throwable</CODE>
       *   object.</P>
       * @return  the error or warning message for this <CODE>
       *     SOAPException</CODE> or, if it has none, the message of
       *     the embedded <CODE>Throwable</CODE> object, if there is
       *     one
       */
      public String getMessage() {
  
          String s = super.getMessage();
  
          if ((s == null) && (cause != null)) {
              return cause.getMessage();
          } else {
              return s;
          }
      }
  
      /**
       * Returns the <CODE>Throwable</CODE> object embedded in
       * this <CODE>SOAPException</CODE> if there is one. Otherwise,
       * this method returns <CODE>null</CODE>.
       * @return  the embedded <CODE>Throwable</CODE> object or <CODE>
       *     null</CODE> if there is none
       */
      public Throwable getCause() {
          return cause;
      }
  
      /**
       * Initializes the <CODE>cause</CODE> field of this <CODE>
       *   SOAPException</CODE> object with the given <CODE>
       *   Throwable</CODE> object.
       *
       *   <P>This method can be called at most once. It is generally
       *   called from within the constructor or immediately after the
       *   constructor has returned a new <CODE>SOAPException</CODE>
       *   object. If this <CODE>SOAPException</CODE> object was
       *   created with the constructor {@link #SOAPException(java.lang.Throwable) SOAPException(java.lang.Throwable)}
       *   or {@link #SOAPException(java.lang.String, java.lang.Throwable) SOAPException(java.lang.String, java.lang.Throwable)}, meaning
       *   that its <CODE>cause</CODE> field already has a value, this
       *   method cannot be called even once.
       *
       * @param cause  the <CODE>Throwable</CODE>
       *     object that caused this <CODE>SOAPException</CODE> object
       *     to be thrown. The value of this parameter is saved for
       *     later retrieval by the <A href=
       *     "../../../javax/xml/soap/SOAPException.html#getCause()">
       *     <CODE>getCause()</CODE></A> method. A <TT>null</TT> value
       *     is permitted and indicates that the cause is nonexistent
       *     or unknown.
       * @return a reference to this <CODE>SOAPException</CODE>
       *     instance
       * @throws java.lang.IllegalArgumentException if
       *     <CODE>cause</CODE> is this <CODE>Throwable</CODE> object.
       *     (A <CODE>Throwable</CODE> object cannot be its own
       *     cause.)
       * @throws java.lang.IllegalStateException if this <CODE>
       *     SOAPException</CODE> object was created with {@link #SOAPException(java.lang.Throwable) SOAPException(java.lang.Throwable)}
       *   or {@link #SOAPException(java.lang.String, java.lang.Throwable) SOAPException(java.lang.String, java.lang.Throwable)}, or this
       *     method has already been called on this <CODE>
       *     SOAPException</CODE> object
       */
      public synchronized Throwable initCause(Throwable cause) {
  
          if (this.cause != null) {
              throw new IllegalStateException("Can't override cause");
          }
  
          if (cause == this) {
              throw new IllegalArgumentException("Self-causation not permitted");
          } else {
              this.cause = cause;
  
              return this;
          }
      }
  
      /** TODO: Put description here. */
      private Throwable cause;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPFault.java
  
  Index: SOAPFault.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * An element in the <CODE>SOAPBody</CODE> object that contains
   *   error and/or status information. This information may relate to
   *   errors in the <CODE>SOAPMessage</CODE> object or to problems
   *   that are not related to the content in the message itself.
   *   Problems not related to the message itself are generally errors
   *   in processing, such as the inability to communicate with an
   *   upstream server.
   *   <P>
   *   The <CODE>SOAPFault</CODE> interface provides methods for
   *   retrieving the information contained in a <CODE>
   *   SOAPFault</CODE> object and for setting the fault code, the
   *   fault actor, and a string describing the fault. A fault code is
   *   one of the codes defined in the SOAP 1.1 specification that
   *   describe the fault. An actor is an intermediate recipient to
   *   whom a message was routed. The message path may include one or
   *   more actors, or, if no actors are specified, the message goes
   *   only to the default actor, which is the final intended
   *   recipient.
   */
  public interface SOAPFault extends SOAPBodyElement {
  
      /**
       * Sets this <CODE>SOAPFault</CODE> object with the given
       *   fault code.
       *
       *   <P>Fault codes, which given information about the fault,
       *   are defined in the SOAP 1.1 specification.</P>
       * @param   faultCode a <CODE>String</CODE> giving
       *     the fault code to be set; must be one of the fault codes
       *     defined in the SOAP 1.1 specification
       * @throws  SOAPException if there was an error in
       *     adding the <CODE>faultCode</CODE> to the underlying XML
       *     tree.
       */
      public abstract void setFaultCode(String faultCode) throws SOAPException;
  
      /**
       * Gets the fault code for this <CODE>SOAPFault</CODE>
       * object.
       * @return a <CODE>String</CODE> with the fault code
       */
      public abstract String getFaultCode();
  
      /**
       *  Sets this <CODE>SOAPFault</CODE> object with the given
       *   fault actor.
       *
       *   <P>The fault actor is the recipient in the message path who
       *   caused the fault to happen.</P>
       * @param   faultActor a <CODE>String</CODE>
       *     identifying the actor that caused this <CODE>
       *     SOAPFault</CODE> object
       * @throws  SOAPException  if there was an error in
       *     adding the <CODE>faultActor</CODE> to the underlying XML
       *     tree.
       */
      public abstract void setFaultActor(String faultActor) throws SOAPException;
  
      /**
       * Gets the fault actor for this <CODE>SOAPFault</CODE>
       * object.
       * @return  a <CODE>String</CODE> giving the actor in the message
       *     path that caused this <CODE>SOAPFault</CODE> object
       * @see #setFaultActor(java.lang.String) setFaultActor(java.lang.String)
       */
      public abstract String getFaultActor();
  
      /**
       * Sets the fault string for this <CODE>SOAPFault</CODE>
       * object to the given string.
       *
       * @param faultString a <CODE>String</CODE>
       *     giving an explanation of the fault
       * @throws  SOAPException  if there was an error in
       *     adding the <CODE>faultString</CODE> to the underlying XML
       *     tree.
       * @see #getFaultString() getFaultString()
       */
      public abstract void setFaultString(String faultString)
          throws SOAPException;
  
      /**
       * Gets the fault string for this <CODE>SOAPFault</CODE>
       * object.
       * @return a <CODE>String</CODE> giving an explanation of the
       *     fault
       */
      public abstract String getFaultString();
  
      /**
       * Returns the detail element for this <CODE>SOAPFault</CODE>
       *   object.
       *
       *   <P>A <CODE>Detail</CODE> object carries
       *   application-specific error information related to <CODE>
       *   SOAPBodyElement</CODE> objects.</P>
       * @return  a <CODE>Detail</CODE> object with
       *     application-specific error information
       */
      public abstract Detail getDetail();
  
      /**
       * Creates a <CODE>Detail</CODE> object and sets it as the
       *   <CODE>Detail</CODE> object for this <CODE>SOAPFault</CODE>
       *   object.
       *
       *   <P>It is illegal to add a detail when the fault already
       *   contains a detail. Therefore, this method should be called
       *   only after the existing detail has been removed.</P>
       * @return the new <CODE>Detail</CODE> object
       * @throws  SOAPException  if this
       *     <CODE>SOAPFault</CODE> object already contains a valid
       *     <CODE>Detail</CODE> object
       */
      public abstract Detail addDetail() throws SOAPException;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPFaultElement.java
  
  Index: SOAPFaultElement.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /** TODO: Put description here. */
  public interface SOAPFaultElement extends SOAPElement {}
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPHeader.java
  
  Index: SOAPHeader.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import java.util.Iterator;
  
  /**
   * <P>A representation of the SOAP header element. A SOAP header
   *   element consists of XML data that affects the way the
   *   application-specific content is processed by the message
   *   provider. For example, transaction semantics, authentication
   *   information, and so on, can be specified as the content of a
   *   <CODE>SOAPHeader</CODE> object.</P>
   *
   *   <P>A <CODE>SOAPEnvelope</CODE> object contains an empty <CODE>
   *   SOAPHeader</CODE> object by default. If the <CODE>
   *   SOAPHeader</CODE> object, which is optional, is not needed, it
   *   can be retrieved and deleted with the following line of code.
   *   The variable <I>se</I> is a <CODE>SOAPEnvelope</CODE>
   *   object.</P>
   * <PRE>
   *     se.getHeader().detachNode();
   * </PRE>
   *   A <CODE>SOAPHeader</CODE> object is created with the <CODE>
   *   SOAPEnvelope</CODE> method <CODE>addHeader</CODE>. This method,
   *   which creates a new header and adds it to the envelope, may be
   *   called only after the existing header has been removed.
   * <PRE>
   *     se.getHeader().detachNode();
   *     SOAPHeader sh = se.addHeader();
   * </PRE>
   *
   *   <P>A <CODE>SOAPHeader</CODE> object can have only <CODE>
   *   SOAPHeaderElement</CODE> objects as its immediate children. The
   *   method <CODE>addHeaderElement</CODE> creates a new <CODE>
   *   HeaderElement</CODE> object and adds it to the <CODE>
   *   SOAPHeader</CODE> object. In the following line of code, the
   *   argument to the method <CODE>addHeaderElement</CODE> is a
   *   <CODE>Name</CODE> object that is the name for the new <CODE>
   *   HeaderElement</CODE> object.</P>
   * <PRE>
   *     SOAPHeaderElement shElement = sh.addHeaderElement(name);
   * </PRE>
   * @see SOAPHeaderElement SOAPHeaderElement
   */
  public interface SOAPHeader extends SOAPElement {
  
      /**
       * Creates a new <CODE>SOAPHeaderElement</CODE> object
       * initialized with the specified name and adds it to this
       * <CODE>SOAPHeader</CODE> object.
       * @param   name a <CODE>Name</CODE> object with
       *     the name of the new <CODE>SOAPHeaderElement</CODE>
       *     object
       * @return the new <CODE>SOAPHeaderElement</CODE> object that
       *     was inserted into this <CODE>SOAPHeader</CODE>
       *     object
       * @throws  SOAPException if a SOAP error occurs
       */
      public abstract SOAPHeaderElement addHeaderElement(Name name)
          throws SOAPException;
  
      /**
       * Returns a list of all the <CODE>SOAPHeaderElement</CODE>
       * objects in this <CODE>SOAPHeader</CODE> object that have the
       * the specified actor. An actor is a global attribute that
       * indicates the intermediate parties to whom the message should
       * be sent. An actor receives the message and then sends it to
       * the next actor. The default actor is the ultimate intended
       * recipient for the message, so if no actor attribute is
       * included in a <CODE>SOAPHeader</CODE> object, the message is
       * sent to its ultimate destination.
       * @param   actor  a <CODE>String</CODE> giving the
       *     URI of the actor for which to search
       * @return an <CODE>Iterator</CODE> object over all the <CODE>
       *     SOAPHeaderElement</CODE> objects that contain the
       *     specified actor
       * @see #extractHeaderElements(java.lang.String) extractHeaderElements(java.lang.String)
       */
      public abstract Iterator examineHeaderElements(String actor);
  
      /**
       * Returns a list of all the <CODE>SOAPHeaderElement</CODE>
       *   objects in this <CODE>SOAPHeader</CODE> object that have
       *   the the specified actor and detaches them from this <CODE>
       *   SOAPHeader</CODE> object.
       *
       *   <P>This method allows an actor to process only the parts of
       *   the <CODE>SOAPHeader</CODE> object that apply to it and to
       *   remove them before passing the message on to the next
       *   actor.
       * @param   actor  a <CODE>String</CODE> giving the
       *     URI of the actor for which to search
       * @return an <CODE>Iterator</CODE> object over all the <CODE>
       *     SOAPHeaderElement</CODE> objects that contain the
       *     specified actor
       * @see #examineHeaderElements(java.lang.String) examineHeaderElements(java.lang.String)
       */
      public abstract Iterator extractHeaderElements(String actor);
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPHeaderElement.java
  
  Index: SOAPHeaderElement.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   *     <P>An object representing the contents in the SOAP header part
   *   of the SOAP envelope. The immediate children of a <CODE>
   *   SOAPHeader</CODE> object can be represented only as <CODE>
   *   SOAPHeaderElement</CODE> objects.</P>
   *
   *   <P>A <CODE>SOAPHeaderElement</CODE> object can have other
   *   <CODE>SOAPElement</CODE> objects as its children.</P>
   */
  public interface SOAPHeaderElement extends SOAPElement {
  
      /**
       * Sets the actor associated with this <CODE>
       * SOAPHeaderElement</CODE> object to the specified actor. The
       * default value of an actor is: <CODE>
       * SOAPConstants.URI_SOAP_ACTOR_NEXT</CODE>
       * @param  actorURI  a <CODE>String</CODE> giving
       *     the URI of the actor to set
       * @see #getActor() getActor()
       * @throws java.lang.IllegalArgumentException if
       *     there is a problem in setting the actor.
       */
      public abstract void setActor(String actorURI);
  
      /**
       * Returns the uri of the actor associated with this <CODE>
       * SOAPHeaderElement</CODE> object.
       * @return  a <CODE>String</CODE> giving the URI of the
       *     actor
       * @see #setActor() setActor()
       */
      public abstract String getActor();
  
      /**
       * Sets the mustUnderstand attribute for this <CODE>
       *   SOAPHeaderElement</CODE> object to be on or off.
       *
       *   <P>If the mustUnderstand attribute is on, the actor who
       *   receives the <CODE>SOAPHeaderElement</CODE> must process it
       *   correctly. This ensures, for example, that if the <CODE>
       *   SOAPHeaderElement</CODE> object modifies the message, that
       *   the message is being modified correctly.</P>
       * @param  mustUnderstand  <CODE>true</CODE> to
       *     set the mustUnderstand attribute on; <CODE>false</CODE>
       *     to turn if off
       * @throws java.lang.IllegalArgumentException if
       *     there is a problem in setting the actor.
       * @see #getMustUnderstand() getMustUnderstand()
       */
      public abstract void setMustUnderstand(boolean mustUnderstand);
  
      /**
       * Returns whether the mustUnderstand attribute for this
       * <CODE>SOAPHeaderElement</CODE> object is turned on.
       * @return  <CODE>true</CODE> if the mustUnderstand attribute of
       *     this <CODE>SOAPHeaderElement</CODE> object is turned on;
       *     <CODE>false</CODE> otherwise
       */
      public abstract boolean getMustUnderstand();
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPMessage.java
  
  Index: SOAPMessage.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import javax.activation.DataHandler;
  
  import java.io.IOException;
  import java.io.OutputStream;
  
  import java.util.Iterator;
  
  /**
   * <P>The root class for all SOAP messages. As transmitted on the
   * "wire", a SOAP message is an XML document or a MIME message
   * whose first body part is an XML/SOAP document.</P>
   *
   * <P>A <CODE>SOAPMessage</CODE> object consists of a SOAP part
   * and optionally one or more attachment parts. The SOAP part for
   * a <CODE>SOAPMessage</CODE> object is a <CODE>SOAPPart</CODE>
   * object, which contains information used for message routing and
   * identification, and which can contain application-specific
   * content. All data in the SOAP Part of a message must be in XML
   * format.</P>
   *
   * <P>A new <CODE>SOAPMessage</CODE> object contains the following
   * by default:</P>
   *
   * <UL>
   *  <LI>A <CODE>SOAPPart</CODE> object</LI>
   *
   *  <LI>A <CODE>SOAPEnvelope</CODE> object</LI>
   *
   *  <LI>A <CODE>SOAPBody</CODE> object</LI>
   *
   *  <LI>A <CODE>SOAPHeader</CODE> object</LI>
   * </UL>
   * The SOAP part of a message can be retrieved by calling the
   * method <CODE>SOAPMessage.getSOAPPart()</CODE>. The <CODE>
   * SOAPEnvelope</CODE> object is retrieved from the <CODE>
   * SOAPPart</CODE> object, and the <CODE>SOAPEnvelope</CODE>
   * object is used to retrieve the <CODE>SOAPBody</CODE> and <CODE>
   * SOAPHeader</CODE> objects.
   * <PRE>
   * SOAPPart sp = message.getSOAPPart();
   * SOAPEnvelope se = sp.getEnvelope();
   * SOAPBody sb = se.getBody();
   * SOAPHeader sh = se.getHeader();
   * </PRE>
   *
   * <P>In addition to the mandatory <CODE>SOAPPart</CODE> object, a
   * <CODE>SOAPMessage</CODE> object may contain zero or more <CODE>
   * AttachmentPart</CODE> objects, each of which contains
   * application-specific data. The <CODE>SOAPMessage</CODE>
   * interface provides methods for creating <CODE>
   * AttachmentPart</CODE> objects and also for adding them to a
   * <CODE>SOAPMessage</CODE> object. A party that has received a
   * <CODE>SOAPMessage</CODE> object can examine its contents by
   * retrieving individual attachment parts.</P>
   *
   * <P>Unlike the rest of a SOAP message, an attachment is not
   * required to be in XML format and can therefore be anything from
   * simple text to an image file. Consequently, any message content
   * that is not in XML format must be in an <CODE>
   * AttachmentPart</CODE> object.</P>
   *
   * <P>A <CODE>MessageFactory</CODE> object creates new <CODE>
   * SOAPMessage</CODE> objects. If the <CODE>MessageFactory</CODE>
   * object was initialized with a messaging Profile, it produces
   * <CODE>SOAPMessage</CODE> objects that conform to that Profile.
   * For example, a <CODE>SOAPMessage</CODE> object created by a
   * <CODE>MessageFactory</CODE> object initialized with the ebXML
   * Profile will have the appropriate ebXML headers.</P>
   * @see MessageFactory MessageFactory
   * @see AttachmentPart AttachmentPart
   */
  public abstract class SOAPMessage {
  
      /**  */
      public SOAPMessage() {}
  
      /**
       * Retrieves a description of this <CODE>SOAPMessage</CODE>
       * object's content.
       * @return  a <CODE>String</CODE> describing the content of this
       *     message or <CODE>null</CODE> if no description has been
       *     set
       * @see #setContentDescription(java.lang.String) setContentDescription(java.lang.String)
       */
      public abstract String getContentDescription();
  
      /**
       * Sets the description of this <CODE>SOAPMessage</CODE>
       * object's content with the given description.
       * @param  description a <CODE>String</CODE>
       *     describing the content of this message
       * @see #getContentDescription() getContentDescription()
       */
      public abstract void setContentDescription(String description);
  
      /**
       * Gets the SOAP part of this <CODE>SOAPMessage</CODE> object.
       *
       *
       *   <P>If a <CODE>SOAPMessage</CODE> object contains one or
       *   more attachments, the SOAP Part must be the first MIME body
       *   part in the message.</P>
       * @return the <CODE>SOAPPart</CODE> object for this <CODE>
       *     SOAPMessage</CODE> object
       */
      public abstract SOAPPart getSOAPPart();
  
      /**
       * Removes all <CODE>AttachmentPart</CODE> objects that have
       *   been added to this <CODE>SOAPMessage</CODE> object.
       *
       *   <P>This method does not touch the SOAP part.</P>
       */
      public abstract void removeAllAttachments();
  
      /**
       * Gets a count of the number of attachments in this
       * message. This count does not include the SOAP part.
       * @return  the number of <CODE>AttachmentPart</CODE> objects
       *     that are part of this <CODE>SOAPMessage</CODE>
       *     object
       */
      public abstract int countAttachments();
  
      /**
       * Retrieves all the <CODE>AttachmentPart</CODE> objects
       * that are part of this <CODE>SOAPMessage</CODE> object.
       * @return  an iterator over all the attachments in this
       *     message
       */
      public abstract Iterator getAttachments();
  
      /**
       * Retrieves all the <CODE>AttachmentPart</CODE> objects
       * that have header entries that match the specified headers.
       * Note that a returned attachment could have headers in
       * addition to those specified.
       * @param   headers a <CODE>MimeHeaders</CODE>
       *     object containing the MIME headers for which to
       *     search
       * @return an iterator over all attachments that have a header
       *     that matches one of the given headers
       */
      public abstract Iterator getAttachments(MimeHeaders headers);
  
      /**
       * Adds the given <CODE>AttachmentPart</CODE> object to this
       * <CODE>SOAPMessage</CODE> object. An <CODE>
       * AttachmentPart</CODE> object must be created before it can be
       * added to a message.
       * @param  attachmentpart an <CODE>
       *     AttachmentPart</CODE> object that is to become part of
       *     this <CODE>SOAPMessage</CODE> object
       * @throws java.lang.IllegalArgumentException
       */
      public abstract void addAttachmentPart(AttachmentPart attachmentpart);
  
      /**
       * Creates a new empty <CODE>AttachmentPart</CODE> object.
       * Note that the method <CODE>addAttachmentPart</CODE> must be
       * called with this new <CODE>AttachmentPart</CODE> object as
       * the parameter in order for it to become an attachment to this
       * <CODE>SOAPMessage</CODE> object.
       * @return  a new <CODE>AttachmentPart</CODE> object that can be
       *     populated and added to this <CODE>SOAPMessage</CODE>
       *     object
       */
      public abstract AttachmentPart createAttachmentPart();
  
      /**
       * Creates an <CODE>AttachmentPart</CODE> object and
       * populates it using the given <CODE>DataHandler</CODE>
       * object.
       * @param   datahandler  the <CODE>
       *     javax.activation.DataHandler</CODE> object that will
       *     generate the content for this <CODE>SOAPMessage</CODE>
       *     object
       * @return a new <CODE>AttachmentPart</CODE> object that
       *     contains data generated by the given <CODE>
       *     DataHandler</CODE> object
       * @throws java.lang.IllegalArgumentException if
       *     there was a problem with the specified <CODE>
       *     DataHandler</CODE> object
       * @see DataHandler DataHandler
       * @see DataContentHandler DataContentHandler
       */
      public AttachmentPart createAttachmentPart(DataHandler datahandler) {
  
          AttachmentPart attachmentpart = createAttachmentPart();
  
          attachmentpart.setDataHandler(datahandler);
  
          return attachmentpart;
      }
  
      /**
       * Returns all the transport-specific MIME headers for this
       * <CODE>SOAPMessage</CODE> object in a transport-independent
       * fashion.
       * @return a <CODE>MimeHeaders</CODE> object containing the
       *     <CODE>MimeHeader</CODE> objects
       */
      public abstract MimeHeaders getMimeHeaders();
  
      /**
       * Creates an <CODE>AttachmentPart</CODE> object and
       * populates it with the specified data of the specified content
       * type.
       * @param   content  an <CODE>Object</CODE>
       *     containing the content for this <CODE>SOAPMessage</CODE>
       *     object
       * @param   contentType a <CODE>String</CODE>
       *     object giving the type of content; examples are
       *     "text/xml", "text/plain", and "image/jpeg"
       * @return a new <CODE>AttachmentPart</CODE> object that
       *     contains the given data
       * @throws java.lang.IllegalArgumentException if the contentType does not match the type of the content
       *     object, or if there was no <CODE>
       *     DataContentHandler</CODE> object for the given content
       *     object
       * @see DataHandler DataHandler
       * @see DataContentHandler DataContentHandler
       */
      public AttachmentPart createAttachmentPart(Object content,
                                                 String contentType) {
  
          AttachmentPart attachmentpart = createAttachmentPart();
  
          attachmentpart.setContent(content, contentType);
  
          return attachmentpart;
      }
  
      /**
       * Updates this <CODE>SOAPMessage</CODE> object with all the
       *   changes that have been made to it. This method is called
       *   automatically when a message is sent or written to by the
       *   methods <CODE>ProviderConnection.send</CODE>, <CODE>
       *   SOAPConnection.call</CODE>, or <CODE>
       *   SOAPMessage.writeTo</CODE>. However, if changes are made to
       *   a message that was received or to one that has already been
       *   sent, the method <CODE>saveChanges</CODE> needs to be
       *   called explicitly in order to save the changes. The method
       *   <CODE>saveChanges</CODE> also generates any changes that
       *   can be read back (for example, a MessageId in profiles that
       *   support a message id). All MIME headers in a message that
       *   is created for sending purposes are guaranteed to have
       *   valid values only after <CODE>saveChanges</CODE> has been
       *   called.
       *
       *   <P>In addition, this method marks the point at which the
       *   data from all constituent <CODE>AttachmentPart</CODE>
       *   objects are pulled into the message.</P>
       * @throws  SOAPException if there
       *     was a problem saving changes to this message.
       */
      public abstract void saveChanges() throws SOAPException;
  
      /**
       * Indicates whether this <CODE>SOAPMessage</CODE> object
       * has had the method <CODE>saveChanges</CODE> called on
       * it.
       * @return <CODE>true</CODE> if <CODE>saveChanges</CODE> has
       *     been called on this message at least once; <CODE>
       *     false</CODE> otherwise.
       */
      public abstract boolean saveRequired();
  
      /**
       * TODO: Writes this <CODE>SOAPMessage</CODE> object to the given
       *   output stream. The externalization format is as defined by
       *   the SOAP 1.1 with Attachments specification.
       *
       *   <P>If there are no attachments, just an XML stream is
       *   written out. For those messages that have attachments,
       *   <CODE>writeTo</CODE> writes a MIME-encoded byte stream.</P>
       * @param   out the <CODE>OutputStream</CODE>
       *     object to which this <CODE>SOAPMessage</CODE> object will
       *     be written
       * @throws  SOAPException  if there was a problem in
       *     externalizing this SOAP message
       * @throws  IOException  if an I/O error
       *     occurs
       */
      public abstract void writeTo(OutputStream out)
          throws SOAPException, IOException;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/SOAPPart.java
  
  Index: SOAPPart.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  import javax.xml.transform.Source;
  
  import java.util.Iterator;
  
  /**
   * <P>The container for the SOAP-specific portion of a <CODE>
   * SOAPMessage</CODE> object. All messages are required to have a
   * SOAP part, so when a <CODE>SOAPMessage</CODE> object is
   * created, it will automatically have a <CODE>SOAPPart</CODE>
   * object.</P>
   *
   * <P>A <CODE>SOAPPart</CODE> object is a MIME part and has the
   * MIME headers Content-Id, Content-Location, and Content-Type.
   * Because the value of Content-Type must be "text/xml", a <CODE>
   * SOAPPart</CODE> object automatically has a MIME header of
   * Content-Type with its value set to "text/xml". The value must
   * be "text/xml" because content in the SOAP part of a message
   * must be in XML format. Content that is not of type "text/xml"
   * must be in an <CODE>AttachmentPart</CODE> object rather than in
   * the <CODE>SOAPPart</CODE> object.</P>
   *
   * <P>When a message is sent, its SOAP part must have the MIME
   * header Content-Type set to "text/xml". Or, from the other
   * perspective, the SOAP part of any message that is received must
   * have the MIME header Content-Type with a value of
   * "text/xml".</P>
   *
   * <P>A client can access the <CODE>SOAPPart</CODE> object of a
   * <CODE>SOAPMessage</CODE> object by calling the method <CODE>
   * SOAPMessage.getSOAPPart</CODE>. The following line of code, in
   * which <CODE>message</CODE> is a <CODE>SOAPMessage</CODE>
   * object, retrieves the SOAP part of a message.</P>
   * <PRE>
   * SOAPPart soapPart = message.getSOAPPart();
   * </PRE>
   *
   * <P>A <CODE>SOAPPart</CODE> object contains a <CODE>
   * SOAPEnvelope</CODE> object, which in turn contains a <CODE>
   * SOAPBody</CODE> object and a <CODE>SOAPHeader</CODE> object.
   * The <CODE>SOAPPart</CODE> method <CODE>getEnvelope</CODE> can
   * be used to retrieve the <CODE>SOAPEnvelope</CODE> object.</P>
   */
  public abstract class SOAPPart {
  
      /**  */
      public SOAPPart() {}
  
      /**
       * Gets the <CODE>SOAPEnvelope</CODE> object associated with
       * this <CODE>SOAPPart</CODE> object. Once the SOAP envelope is
       * obtained, it can be used to get its contents.
       * @return the <CODE>SOAPEnvelope</CODE> object for this <CODE>
       *     SOAPPart</CODE> object
       * @throws  SOAPException if there is a SOAP error
       */
      public abstract SOAPEnvelope getEnvelope() throws SOAPException;
  
      /**
       * Retrieves the value of the MIME header whose name is
       * "Content-Id".
       * @return  a <CODE>String</CODE> giving the value of the MIME
       *     header named "Content-Id"
       * @see #setContentId(java.lang.String) setContentId(java.lang.String)
       */
      public String getContentId() {
  
          String as[] = getMimeHeader("Content-Id");
  
          if (as != null) {
              return as[0];
          } else {
              return null;
          }
      }
  
      /**
       * Retrieves the value of the MIME header whose name is
       * "Content-Location".
       * @return a <CODE>String</CODE> giving the value of the MIME
       *     header whose name is "Content-Location"
       * @see #setContentLocation(java.lang.String) setContentLocation(java.lang.String)
       */
      public String getContentLocation() {
  
          String as[] = getMimeHeader("Content-Location");
  
          if (as != null) {
              return as[0];
          } else {
              return null;
          }
      }
  
      /**
       * Sets the value of the MIME header named "Content-Id" to
       * the given <CODE>String</CODE>.
       * @param  contentId  a <CODE>String</CODE> giving
       *     the value of the MIME header "Content-Id"
       * @throws java.lang.IllegalArgumentException if
       *     there is a problem in setting the content id
       * @see #getContentId() getContentId()
       */
      public void setContentId(String contentId) {
          setMimeHeader("Content-Id", contentId);
      }
  
      /**
       * Sets the value of the MIME header "Content-Location" to
       * the given <CODE>String</CODE>.
       * @param  contentLocation a <CODE>String</CODE>
       *     giving the value of the MIME header
       *     "Content-Location"
       * @throws java.lang.IllegalArgumentException if
       *     there is a problem in setting the content location.
       * @see #getContentLocation() getContentLocation()
       */
      public void setContentLocation(String contentLocation) {
          setMimeHeader("Content-Location", contentLocation);
      }
  
      /**
       * Removes all MIME headers that match the given name.
       * @param  header  a <CODE>String</CODE> giving
       *     the name of the MIME header(s) to be removed
       */
      public abstract void removeMimeHeader(String header);
  
      /**
       * Removes all the <CODE>MimeHeader</CODE> objects for this
       * <CODE>SOAPEnvelope</CODE> object.
       */
      public abstract void removeAllMimeHeaders();
  
      /**
       * Gets all the values of the <CODE>MimeHeader</CODE> object
       * in this <CODE>SOAPPart</CODE> object that is identified by
       * the given <CODE>String</CODE>.
       * @param   name  the name of the header; example:
       *     "Content-Type"
       * @return a <CODE>String</CODE> array giving all the values for
       *     the specified header
       * @see #setMimeHeader(java.lang.String, java.lang.String) setMimeHeader(java.lang.String, java.lang.String)
       */
      public abstract String[] getMimeHeader(String name);
  
      /**
       * Changes the first header entry that matches the given
       *   header name so that its value is the given value, adding a
       *   new header with the given name and value if no existing
       *   header is a match. If there is a match, this method clears
       *   all existing values for the first header that matches and
       *   sets the given value instead. If more than one header has
       *   the given name, this method removes all of the matching
       *   headers after the first one.
       *
       *   <P>Note that RFC822 headers can contain only US-ASCII
       *   characters.</P>
       * @param  name a <CODE>String</CODE> giving the
       *     header name for which to search
       * @param  value a <CODE>String</CODE> giving the
       *     value to be set. This value will be substituted for the
       *     current value(s) of the first header that is a match if
       *     there is one. If there is no match, this value will be
       *     the value for a new <CODE>MimeHeader</CODE> object.
       * @ throws java.lang.IllegalArgumentException if
       *     there was a problem with the specified mime header name
       *     or value
       * @see #getMimeHeader(java.lang.String) getMimeHeader(java.lang.String)
       */
      public abstract void setMimeHeader(String name, String value);
  
      /**
       *  Creates a <CODE>MimeHeader</CODE> object with the specified
       *   name and value and adds it to this <CODE>SOAPPart</CODE>
       *   object. If a <CODE>MimeHeader</CODE> with the specified
       *   name already exists, this method adds the specified value
       *   to the already existing value(s).
       *
       *   <P>Note that RFC822 headers can contain only US-ASCII
       *   characters.</P>
       *
       * @param  name a <CODE>String</CODE> giving the
       *     header name
       * @param  value a <CODE>String</CODE> giving the
       *     value to be set or added
       * @throws java.lang.IllegalArgumentException if
       * there was a problem with the specified mime header name
       *     or value
       */
      public abstract void addMimeHeader(String name, String value);
  
      /**
       * Retrieves all the headers for this <CODE>SOAPPart</CODE>
       * object as an iterator over the <CODE>MimeHeader</CODE>
       * objects.
       * @return an <CODE>Iterator</CODE> object with all of the Mime
       *     headers for this <CODE>SOAPPart</CODE> object
       */
      public abstract Iterator getAllMimeHeaders();
  
      /**
       * Retrieves all <CODE>MimeHeader</CODE> objects that match
       * a name in the given array.
       * @param   names a <CODE>String</CODE> array with
       *     the name(s) of the MIME headers to be returned
       * @return all of the MIME headers that match one of the names
       *     in the given array, returned as an <CODE>Iterator</CODE>
       *     object
       */
      public abstract Iterator getMatchingMimeHeaders(String names[]);
  
      /**
       * TODO: Retrieves all <CODE>MimeHeader</CODE> objects whose name
       * does not match a name in the given array.
       * @param   names a <CODE>String</CODE> array with
       *     the name(s) of the MIME headers not to be returned
       * @return all of the MIME headers in this <CODE>SOAPPart</CODE>
       *     object except those that match one of the names in the
       *     given array. The nonmatching MIME headers are returned as
       *     an <CODE>Iterator</CODE> object.
       */
      public abstract Iterator getNonMatchingMimeHeaders(String names[]);
  
      /**
       * Sets the content of the <CODE>SOAPEnvelope</CODE> object
       * with the data from the given <CODE>Source</CODE> object.
       * @param   source javax.xml.transform.Source</CODE> object with the data to
       *     be set
       * @throws  SOAPException if there is a problem in
       *     setting the source
       * @see #getContent() getContent()
       */
      public abstract void setContent(Source source) throws SOAPException;
  
      /**
       * Returns the content of the SOAPEnvelope as a JAXP <CODE>
       * Source</CODE> object.
       * @return the content as a <CODE>
       *     javax.xml.transform.Source</CODE> object
       * @throws  SOAPException  if the implementation cannot
       *     convert the specified <CODE>Source</CODE> object
       * @see #setContent(javax.xml.transform.Source) setContent(javax.xml.transform.Source)
       */
      public abstract Source getContent() throws SOAPException;
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/soap/Text.java
  
  Index: Text.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.soap;
  
  /**
   * A representation of a node whose value is text. A <CODE>
   *   Text</CODE> object may represent text that is content or text
   *   that is a comment. 
   */
  public interface Text extends Node {
  
      /**
       * Retrieves whether this <CODE>Text</CODE> object
       * represents a comment.
       * @return  <CODE>true</CODE> if this <CODE>Text</CODE> object is
       *     a comment; <CODE>false</CODE> otherwise
       */
      public abstract boolean isComment();
  }
  
  
  
  1.1                  xml-axis/java/src/javax/xml/transform/Source.java
  
  Index: Source.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above 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 the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The name "Apache Software Foundation" must not be used to endorse or
   *    promote products derived from this software without prior written
   *    permission. For written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package javax.xml.transform;
  
  import java.lang.String;
  
  import java.io.InputStream;
  import java.io.Reader;
  
  
  /**
   * An object that implements this interface contains the information
   * needed to act as source input (XML source or transformation instructions).
   */
  public interface Source {
  
      /**
       * Set the system identifier for this Source.
       *
       * <p>The system identifier is optional if the source does not
       * get its data from a URL, but it may still be useful to provide one.
       * The application can use a system identifier, for example, to resolve
       * relative URIs and to include in error messages and warnings.</p>
       *
       * @param systemId The system identifier as a URL string.
       */
      public void setSystemId(String systemId);
  
      /**
       * Get the system identifier that was set with setSystemId.
       *
       * @return The system identifier that was set with setSystemId, or null
       * if setSystemId was not called.
       */
      public String getSystemId();
  }