geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r601048 [2/5] - in /geronimo/specs/trunk: ./ geronimo-jsp_2.1_spec/src/main/resources/javax/servlet/jsp/resources/ geronimo-saaj_1.1_spec/ geronimo-saaj_1.3_spec/ geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/
Date Tue, 04 Dec 2007 19:25:48 GMT
Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/AttachmentPart.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/AttachmentPart.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/AttachmentPart.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/AttachmentPart.java Tue Dec  4 11:25:44 2007
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -23,217 +23,156 @@
 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();
+ * <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/>
+ * <P>An <CODE>AttachmentPart</CODE> object must conform to certain standards.</P>
+ * <p/>
+ * <OL> <LI>It must conform to <A href= "http://www.ietf.org/rfc/rfc2045.txt">MIME [RFC2045]
+ * standards</A></LI>
+ * <p/>
+ * <LI>It MUST contain content</LI>
+ * <p/>
+ * <LI> The header portion MUST include the following header:
+ * <p/>
+ * <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
+ * <p/>
+ * </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");
+ * <p/>
  * </PRE>
+ * <p/>
+ * <P></P> </LI> </UL> </LI> </OL>
+ * <p/>
+ * <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/>
+ * <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/>
+ * <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/>
+ * <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/>
+ * <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 {
 
     // fixme: should this constructor be protected?
+
     /** Create a new AttachmentPart. */
-    public 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.
+     * 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.
+     * 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>
+     * 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>
-     * 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>, 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>, a <code>java.awt.Image</code> object
-     * corresponding to a content stream with a
-     * <code>Content-Type</code> value of <code>image/gif</code> or
-     * <code>image/jpeg</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>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/>
+     * 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>, 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>, a
+     * <code>java.awt.Image</code> object corresponding to a content stream with a
+     * <code>Content-Type</code> value of <code>image/gif</code> or <code>image/jpeg</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.
      *
-     * @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
+     * @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
+     * 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 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
+     * 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
+     * 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 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)
+     * 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(String) setContentId(java.lang.String)
      */
     public String getContentId() {
 
@@ -247,11 +186,10 @@
     }
 
     /**
-     * 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
+     * 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() {
 
@@ -266,9 +204,9 @@
 
     /**
      * 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
+     *
+     * @return a <CODE>String</CODE> giving the value of the "Content-Type" header or
+     *         <CODE>null</CODE> if there is none
      */
     public String getContentType() {
 
@@ -282,13 +220,11 @@
     }
 
     /**
-     * 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
+     * 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 IllegalArgumentException
+     *          if there was a problem with the specified <CODE> contentId</CODE> value
      * @see #getContentId() getContentId()
      */
     public void setContentId(String contentId) {
@@ -296,25 +232,23 @@
     }
 
     /**
-     * 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
+     * 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 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
+     * 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 IllegalArgumentException
+     *          if there was a problem with the specified content type
      */
     public void setContentType(String contentType) {
         setMimeHeader("Content-Type", contentType);
@@ -322,8 +256,8 @@
 
     /**
      * Removes all MIME headers that match the given name.
-     * @param  header - the string name of the MIME
-     *     header/s to be removed
+     *
+     * @param header - the string name of the MIME header/s to be removed
      */
     public abstract void removeMimeHeader(String header);
 
@@ -331,81 +265,93 @@
     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)
+     * 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(String, 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
+     * 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/>
+     * <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 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.
+     * Adds a MIME header with the specified name and value to this <CODE>AttachmentPart</CODE>
+     * object.
+     * <p/>
+     * <P>Note that RFC822 headers can contain only US-ASCII characters.</P>
      *
-     *   <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
+     * @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 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
+     * 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
+     * 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.
+     * 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[]);
+
+    public abstract java.io.InputStream getBase64Content()
+            throws SOAPException;
+
+    public abstract java.io.InputStream getRawContent()
+            throws SOAPException;
+
+    public abstract byte[] getRawContentBytes()
+            throws SOAPException;
+
+    public abstract void setBase64Content(java.io.InputStream inputstream,
+                                          java.lang.String s)
+            throws SOAPException;
+
+    public abstract void setRawContent(java.io.InputStream inputstream,
+                                       java.lang.String s)
+            throws SOAPException;
+
+    public abstract void setRawContentBytes(byte[] abyte0,
+                                            int i,
+                                            int j,
+                                            java.lang.String s)
+            throws SOAPException;
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Detail.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Detail.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Detail.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Detail.java Tue Dec  4 11:25:44 2007
@@ -1,69 +1,68 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 
 package javax.xml.soap;
 
+import javax.xml.namespace.QName;
 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();
+ * 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
+     * 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.
+     * @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
+     *
+     * @return an <code>Iterator</code> object over the <code>DetailEntry</code> objects in this
+     *         <code>Detail</code> object
      */
     public abstract Iterator getDetailEntries();
+
+    public abstract DetailEntry addDetailEntry(QName qname)
+            throws SOAPException;
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/DetailEntry.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/DetailEntry.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/DetailEntry.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/DetailEntry.java Tue Dec  4 11:25:44 2007
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -20,10 +20,10 @@
 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>
+ * 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 {}
+public interface DetailEntry extends SOAPElement {
+}

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/FactoryFinder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/FactoryFinder.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/FactoryFinder.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/FactoryFinder.java Tue Dec  4 11:25:44 2007
@@ -1,22 +1,21 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package javax.xml.soap;
 
 import java.io.BufferedReader;
@@ -24,13 +23,11 @@
 import java.io.FileInputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-
 import java.util.Properties;
 
 /**
- * This class is used to locate factory classes for javax.xml.soap.
- * It has package scope since it is not part of JAXM and should not
- * be accessed from other packages.
+ * This class is used to locate factory classes for javax.xml.soap. It has package scope since it is
+ * not part of JAXM and should not be accessed from other packages.
  */
 class FactoryFinder {
     /**
@@ -55,7 +52,8 @@
             } else {
                 try {
                     factory = classloader.loadClass(factoryClassName);
-                } catch (ClassNotFoundException cnfe) {}
+                } catch (ClassNotFoundException cnfe) {
+                }
             }
             if (factory == null) {
                 classloader = FactoryFinder.class.getClassLoader();
@@ -63,60 +61,79 @@
             }
             return factory.newInstance();
         } catch (ClassNotFoundException classnotfoundexception) {
-            throw new SOAPException("Provider " + factoryClassName + " not found", classnotfoundexception);
+            throw new SOAPException(
+                    "Provider " + factoryClassName + " not found",
+                    classnotfoundexception);
         } catch (Exception exception) {
-            throw new SOAPException("Provider " + factoryClassName + " could not be instantiated: " + exception, exception);
+            throw new SOAPException(
+                    "Provider " + factoryClassName +
+                            " could not be instantiated: " +
+                            exception,
+                    exception);
         }
     }
 
     /**
-     * Instantiates a factory object given the factory's property name and the
-     * default class name.
+     * Instantiates a factory object given the factory's property name and the default class name.
      *
      * @param factoryPropertyName
      * @param defaultFactoryClassName
      * @return a factory object
      * @throws SOAPException
      */
-    static Object find(String factoryPropertyName, String defaultFactoryClassName) throws SOAPException {
+    static Object find(String factoryPropertyName,
+                       String defaultFactoryClassName) throws SOAPException {
         try {
             String factoryClassName = System.getProperty(factoryPropertyName);
             if (factoryClassName != null) {
                 return newInstance(factoryClassName);
             }
-        } catch (SecurityException securityexception) {}
+        } catch (SecurityException securityexception) {
+        }
 
         try {
             String propertiesFileName = System.getProperty("java.home")
-                                        + File.separator + "lib"
-                                        + File.separator + "jaxm.properties";
+                    + File.separator + "lib"
+                    + File.separator + "jaxm.properties";
             File file = new File(propertiesFileName);
             if (file.exists()) {
                 FileInputStream fileInput = new FileInputStream(file);
                 Properties properties = new Properties();
                 properties.load(fileInput);
                 fileInput.close();
-                String factoryClassName = properties.getProperty(factoryPropertyName);
+                String factoryClassName = properties.getProperty(
+                        factoryPropertyName);
                 return newInstance(factoryClassName);
             }
-        } catch (Exception exception1) {}
+        } catch (Exception exception1) {
+        }
 
         String factoryResource = "META-INF/services/" + factoryPropertyName;
 
         try {
             InputStream inputstream = getResource(factoryResource);
             if (inputstream != null) {
-                BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(inputstream, "UTF-8"));
+                BufferedReader bufferedreader = new BufferedReader(
+                        new InputStreamReader(inputstream, "UTF-8"));
                 String factoryClassName = bufferedreader.readLine();
                 bufferedreader.close();
                 if ((factoryClassName != null) && !"".equals(factoryClassName)) {
-                    return newInstance(factoryClassName);
+                    try {
+                        return newInstance(factoryClassName);
+                    } catch (Exception e) {
+                        throw new SOAPException(
+                                "Provider for " + factoryPropertyName + " cannot be found",
+                                null);
+                    }
                 }
             }
-        } catch (Exception exception2) {}
+        } catch (Exception exception2) {
+        }
 
         if (defaultFactoryClassName == null) {
-            throw new SOAPException("Provider for " + factoryPropertyName + " cannot be found", null);
+            throw new SOAPException(
+                    "Provider for " + factoryPropertyName + " cannot be found",
+                    null);
         } else {
             return newInstance(defaultFactoryClassName);
         }
@@ -124,33 +141,34 @@
 
     /**
      * Returns an input stream for the specified resource.
+     * <p/>
+     * <p>This method will firstly try <code>ClassLoader.getSystemResourceAsStream()</code> then the
+     * class loader of the current thread with <code>getResourceAsStream()</code> and finally
+     * attempt <code>getResourceAsStream()</code> on <code>FactoryFinder.class.getClassLoader()</code>.
      *
-     * <p>This method will firstly try
-     * <code>ClassLoader.getSystemResourceAsStream()</code> then
-     * the class loader of the current thread with
-     * <code>getResourceAsStream()</code> and finally attempt
-     * <code>getResourceAsStream()</code> on
-     * <code>FactoryFinder.class.getClassLoader()</code>.
-     *
-     * @param factoryResource  the resource name
-     * @return  an InputStream that can be used to read that resource, or
-     *              <code>null</code> if the resource could not be resolved
+     * @param factoryResource the resource name
+     * @return an InputStream that can be used to read that resource, or <code>null</code> if the
+     *         resource could not be resolved
      */
     private static InputStream getResource(String factoryResource) {
         ClassLoader classloader = null;
         try {
             classloader = Thread.currentThread().getContextClassLoader();
-        } catch (SecurityException securityexception) {}
+        } catch (SecurityException securityexception) {
+        }
 
         InputStream inputstream;
         if (classloader == null) {
-            inputstream = ClassLoader.getSystemResourceAsStream(factoryResource);
+            inputstream =
+                    ClassLoader.getSystemResourceAsStream(factoryResource);
         } else {
             inputstream = classloader.getResourceAsStream(factoryResource);
         }
 
         if (inputstream == null) {
-            inputstream = FactoryFinder.class.getClassLoader().getResourceAsStream(factoryResource);
+            inputstream =
+                    FactoryFinder.class.getClassLoader().getResourceAsStream(
+                            factoryResource);
         }
         return inputstream;
     }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MessageFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MessageFactory.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MessageFactory.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MessageFactory.java Tue Dec  4 11:25:44 2007
@@ -1,22 +1,21 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package javax.xml.soap;
 
 import java.io.IOException;
@@ -24,150 +23,116 @@
 
 /**
  * <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>
+ * <p/>
+ * <P>A JAXM client performs the following steps to create a message.</P>
+ * <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>
+ * <p/>
+ * <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/>
+ * <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>
+ * <p/>
+ * <UL> <LI>A <CODE>SOAPPart</CODE> object</LI>
+ * <p/>
+ * <LI>A <CODE>SOAPEnvelope</CODE> object</LI>
+ * <p/>
+ * <LI>A <CODE>SOAPBody</CODE> object</LI>
+ * <p/>
+ * <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.
+ * <p/>
+ * <UL> <LI><CODE>createMessage()</CODE> -- message has no content<BR> This is the method clients
+ * would normally use to create a request message.</LI>
+ * <p/>
+ * <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 {
 
-    // fixme: this should be protected as the class is abstract.
     /** Create a new MessageFactory. */
-    public MessageFactory() {}
+    public MessageFactory() {
+    }
 
     /**
-     * Creates a new <CODE>MessageFactory</CODE> object that is
-     * an instance of the default implementation.
+     * 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>
+     * @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(MESSAGE_FACTORY_PROPERTY,
-                                                       DEFAULT_MESSAGE_FACTORY);
+            return (MessageFactory)FactoryFinder.find(
+                    MESSAGE_FACTORY_PROPERTY,
+                    DEFAULT_MESSAGE_FACTORY);
         } catch (Exception exception) {
-            throw new SOAPException(
-                "Unable to create message factory for SOAP: "
-                + exception.getMessage());
+            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.
+     * 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/>
+     * <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>
      *
-     *   <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
+     * @return a new <CODE>SOAPMessage</CODE> object
+     * @throws SOAPException if a SOAP error occurs java.lang.UnsupportedOperationException - if the
+     *                       protocol of this MessageFactory instance is DYNAMIC_SOAP_PROTOCOL
      */
     public abstract SOAPMessage createMessage() throws SOAPException;
 
     /**
-     * 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
+     * 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)
+    public abstract SOAPMessage createMessage(MimeHeaders mimeheaders,
+                                              InputStream inputstream)
             throws IOException, SOAPException;
 
+    public static MessageFactory newInstance(String soapVersion)
+            throws SOAPException {
+        return SAAJMetaFactory.getInstance().newMessageFactory(soapVersion);
+    }
+
     private static final String DEFAULT_MESSAGE_FACTORY =
-        "org.apache.axis.soap.MessageFactoryImpl";
+            "org.apache.axis2.saaj.MessageFactoryImpl";
 
     private static final String MESSAGE_FACTORY_PROPERTY =
-        "javax.xml.soap.MessageFactory";
+            "javax.xml.soap.MessageFactory";
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeader.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeader.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeader.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeader.java Tue Dec  4 11:25:44 2007
@@ -1,57 +1,54 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
-
 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.
+ * 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
+     * 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.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>
+     * 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.
+     * Returns the value of this <CODE>MimeHeader</CODE> object.
+     *
      * @return the value of the header as a <CODE>String</CODE>
      */
     public String getValue() {

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeaders.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeaders.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeaders.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MimeHeaders.java Tue Dec  4 11:25:44 2007
@@ -1,37 +1,34 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
-
 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>
+ * A container for <CODE>MimeHeader</CODE> objects, which represent the MIME headers present in a
+ * MIME part of a message.</P>
+ * <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.
  *
- *   <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
  */
@@ -43,12 +40,12 @@
 
             label0:
             while (iterator.hasNext()) {
-                MimeHeader mimeheader = (MimeHeader) iterator.next();
+                MimeHeader mimeheader = (MimeHeader)iterator.next();
 
                 if (names == null) {
                     return match
-                           ? null
-                           : mimeheader;
+                            ? null
+                            : mimeheader;
                 }
 
                 for (int i = 0; i < names.length; i++) {
@@ -111,36 +108,35 @@
 
         MatchingIterator(String as[], boolean flag) {
 
-            match    = flag;
-            names    = as;
+            match = flag;
+            names = as;
             iterator = headers.iterator();
         }
     }
 
     /**
-     * Constructs
-     *   a default <CODE>MimeHeaders</CODE> object initialized with
-     *   an empty <CODE>Vector</CODE> object.
+     * 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)
+     * 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(String, 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);
+            MimeHeader mimeheader = (MimeHeader)headers.elementAt(i);
 
             if (mimeheader.getName().equalsIgnoreCase(name)
                     && (mimeheader.getValue() != null)) {
@@ -160,38 +156,34 @@
     }
 
     /**
-     * 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.
+     * 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/>
+     * <P>Note that RFC822 headers can contain only US-ASCII characters.</P>
      *
-     *   <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
-     * @throws java.lang.IllegalArgumentException if there was a
-     * problem in the mime header name or the value being set
-     * @see #getHeader(java.lang.String) getHeader(java.lang.String)
+     * @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
+     * @throws IllegalArgumentException
+     *          if there was a problem in the mime header name or the value being set
+     * @see #getHeader(String) getHeader(java.lang.String)
      */
     public void setHeader(String name, String value) {
 
         boolean flag = false;
 
-        if ((name == null) || name.equals("")) {
-            throw new IllegalArgumentException(
-                "Illegal MimeHeader name");
+        if ((name == null) || "".equals(name)) {
+            throw new IllegalArgumentException("Illegal MimeHeader name");
         }
 
         for (int i = 0; i < headers.size(); i++) {
-            MimeHeader mimeheader = (MimeHeader) headers.elementAt(i);
+            MimeHeader mimeheader = (MimeHeader)headers.elementAt(i);
 
             if (mimeheader.getName().equalsIgnoreCase(name)) {
                 if (!flag) {
                     headers.setElementAt(new MimeHeader(mimeheader
-                        .getName(), value), i);
+                            .getName(), value), i);
 
                     flag = true;
                 } else {
@@ -206,31 +198,26 @@
     }
 
     /**
-     * Adds a <CODE>MimeHeader</CODE> object with the specified
-     *   name and value to this <CODE>MimeHeaders</CODE> object's
-     *   list of headers.
+     * Adds a <CODE>MimeHeader</CODE> object with the specified name and value to this
+     * <CODE>MimeHeaders</CODE> object's list of headers.
+     * <p/>
+     * <P>Note that RFC822 headers can contain only US-ASCII characters.</P>
      *
-     *   <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
+     * @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 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("")) {
-            throw new IllegalArgumentException(
-                "Illegal MimeHeader name");
+        if ((name == null) || "".equals(name)) {
+            throw new IllegalArgumentException("Illegal MimeHeader name");
         }
 
         int i = headers.size();
 
         for (int j = i - 1; j >= 0; j--) {
-            MimeHeader mimeheader = (MimeHeader) headers.elementAt(j);
+            MimeHeader mimeheader = (MimeHeader)headers.elementAt(j);
 
             if (mimeheader.getName().equalsIgnoreCase(name)) {
                 headers.insertElementAt(new MimeHeader(name, value), j + 1);
@@ -243,15 +230,14 @@
     }
 
     /**
-     * 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
+     * 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);
+            MimeHeader mimeheader = (MimeHeader)headers.elementAt(i);
 
             if (mimeheader.getName().equalsIgnoreCase(name)) {
                 headers.removeElementAt(i--);
@@ -259,46 +245,40 @@
         }
     }
 
-    /**
-     * Removes all the header entries from this <CODE>
-     * MimeHeaders</CODE> object.
-     */
+    /** 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
+     * 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
+     * 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
+     * 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);
@@ -306,9 +286,6 @@
 
     // fixme: does this need to be a Vector? Will a non-synchronized impl of
     // List do?
-    /**
-     * A <code>Vector</code> containing the headers as <code>MimeHeader</code>
-     *              instances.
-     */
+    /** A <code>Vector</code> containing the headers as <code>MimeHeader</code> instances. */
     private Vector headers;
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Name.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Name.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Name.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Name.java Tue Dec  4 11:25:44 2007
@@ -1,95 +1,79 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
-
 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>
+ * 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
+     * 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
+     * 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
+     * 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
+     * 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();
 }



Mime
View raw message