geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r601048 [3/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/Node.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Node.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Node.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/Node.java Tue Dec  4 11:25:44 2007
@@ -1,95 +1,89 @@
 /*
  * 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 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.
+ * 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 extends org.w3c.dom.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
+     * 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
+     * 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;
+            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
-     * @throws java.lang.UnsupportedOperationException if the whole tree is not kept in memory
-     * @see #setParentElement(javax.xml.soap.SOAPElement) setParentElement(javax.xml.soap.SOAPElement)
+     * 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
+     * @throws UnsupportedOperationException
+     *          if the whole tree is not kept in memory
+     * @see #setParentElement(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.
+     * 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.
+     * 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();
 
     /**
-     * If this is a Text node then this method will set its value, otherwise it
-     * sets the value of the immediate (Text) child of this node. The value of
-     * the immediate child of this node can be set only if, there is one child
-     * node and that node is a Text node, or if there are no children in which
-     * case a child Text node will be created.
+     * If this is a Text node then this method will set its value, otherwise it sets the value of
+     * the immediate (Text) child of this node. The value of the immediate child of this node can be
+     * set only if, there is one child node and that node is a Text node, or if there are no
+     * children in which case a child Text node will be created.
      *
      * @param value the text to set
-     * @throws IllegalStateException   if the node is not a Text  node and
-     *              either has more than one child node or has a child node that
-     *              is not a Text node
+     * @throws IllegalStateException if the node is not a Text  node and either has more than one
+     *                               child node or has a child node that is not a Text node
      */
 
     public abstract void setValue(String value);

Added: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJMetaFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJMetaFactory.java?rev=601048&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJMetaFactory.java (added)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJMetaFactory.java Tue Dec  4 11:25:44 2007
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.xml.soap;
+
+public abstract class SAAJMetaFactory {
+
+    static synchronized SAAJMetaFactory getInstance()
+            throws SOAPException {
+        if (instance == null) {
+            try {
+                instance = (SAAJMetaFactory)FactoryFinder.find("javax.xml.soap.MetaFactory",
+                                                               "org.apache.axis2.saaj.SAAJMetaFactoryImpl");
+            } catch (Exception exception) {
+                throw new SOAPException(exception.getMessage());
+            }
+        }
+        return instance;
+    }
+
+    protected SAAJMetaFactory() {
+    }
+
+    protected abstract MessageFactory newMessageFactory(String s)
+            throws SOAPException;
+
+    protected abstract SOAPFactory newSOAPFactory(String s)
+            throws SOAPException;
+
+    private static SAAJMetaFactory instance = null;
+}

Added: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJResult.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJResult.java?rev=601048&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJResult.java (added)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJResult.java Tue Dec  4 11:25:44 2007
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.xml.soap;
+
+import org.w3c.dom.NodeList;
+
+import javax.xml.transform.dom.DOMResult;
+
+public class SAAJResult extends DOMResult {
+
+    public SAAJResult()
+            throws SOAPException {
+        this(MessageFactory.newInstance().createMessage());
+        org.w3c.dom.Node node = this.getNode();
+        NodeList nodeList = node.getChildNodes();
+        if (nodeList != null) {
+            int size = nodeList.getLength();
+            for (int a = 0; a < size; a++) {
+                node.removeChild(nodeList.item(a));
+            }
+        }
+        this.setNode(null);
+    }
+
+    public SAAJResult(String s)
+            throws SOAPException {
+        this(MessageFactory.newInstance(s).createMessage());
+    }
+
+    public SAAJResult(SOAPMessage soapmessage) {
+        super(soapmessage.getSOAPPart());
+    }
+
+    public SAAJResult(SOAPElement soapelement) {
+        super(soapelement);
+    }
+
+    public javax.xml.soap.Node getResult() {
+        org.w3c.dom.Node node = super.getNode();
+        //When using SAAJResult saajResult = new SAAJResult();
+        if (node == null) {
+            return null;
+        }
+        if (node instanceof SOAPPart) {
+            try {
+                return ((SOAPPart)node).getEnvelope();
+            } catch (SOAPException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return (javax.xml.soap.Node)node.getFirstChild();
+    }
+}

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBody.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBody.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBody.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBody.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 org.w3c.dom.Document;
@@ -24,106 +23,113 @@
 import java.util.Locale;
 
 /**
- * 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.
+ * 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.
+     * 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
+     * @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
+     * 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
+     * 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
+     * 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
+     * @throws SOAPException if a SOAP error occurs
      */
     public abstract SOAPBodyElement addBodyElement(Name name)
-        throws SOAPException;
+            throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to this
-     * <code>SOAPBody</code> object. The new <code>SOAPFault</code> will have a
-     * <code>faultcode</code> element that is set to the <code>faultCode</code>
-     * parameter and a <code>faultstring</code> set to <code>faultstring</code>
-     * and localized to <code>locale</code>.
-     *
-     * @param faultCode a <code>Name</code> object giving the fault code to be
-     *              set; must be one of the fault codes defined in the SOAP 1.1
-     *              specification and of type QName
-     * @param faultString a <code>String</code> giving an explanation of the
-     *              fault
-     * @param locale a <code>Locale</code> object indicating the native language
-     *              of the <ocde>faultString</code>
+     * Creates a new <code>SOAPFault</code> object and adds it to this <code>SOAPBody</code> object.
+     * The new <code>SOAPFault</code> will have a <code>faultcode</code> element that is set to the
+     * <code>faultCode</code> parameter and a <code>faultstring</code> set to
+     * <code>faultstring</code> and localized to <code>locale</code>.
+     *
+     * @param faultCode   a <code>Name</code> object giving the fault code to be set; must be one of
+     *                    the fault codes defined in the SOAP 1.1 specification and of type QName
+     * @param faultString a <code>String</code> giving an explanation of the fault
+     * @param locale      a <code>Locale</code> object indicating the native language of the
+     *                    <ocde>faultString</code>
      * @return the new <code>SOAPFault</code> object
-     * @throws SOAPException  if there is a SOAP error
+     * @throws SOAPException if there is a SOAP error
      */
     public abstract SOAPFault addFault(Name faultCode,
                                        String faultString,
                                        Locale locale) throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to this
-     * <code>SOAPBody</code> object. The new <code>SOAPFault</code> will have a
-     * <code>faultcode</code> element that is set to the <code>faultCode</code>
-     * parameter and a <code>faultstring</code> set to <code>faultstring</code>.
-     *
-     * @param faultCode a <code>Name</code> object giving the fault code to be
-     *              set; must be one of the fault codes defined in the SOAP 1.1
-     *              specification and of type QName
-     * @param faultString a <code>String</code> giving an explanation of the
-     *              fault
+     * Creates a new <code>SOAPFault</code> object and adds it to this <code>SOAPBody</code> object.
+     * The new <code>SOAPFault</code> will have a <code>faultcode</code> element that is set to the
+     * <code>faultCode</code> parameter and a <code>faultstring</code> set to
+     * <code>faultstring</code>.
+     *
+     * @param faultCode   a <code>Name</code> object giving the fault code to be set; must be one of
+     *                    the fault codes defined in the SOAP 1.1 specification and of type QName
+     * @param faultString a <code>String</code> giving an explanation of the fault
      * @return the new <code>SOAPFault</code> object
-     * @throws SOAPException  if there is a SOAP error
+     * @throws SOAPException if there is a SOAP error
      */
     public abstract SOAPFault addFault(Name faultCode, String faultString) throws SOAPException;
 
     /**
-     * Adds the root node of the DOM <code>Document</code> to this
-     * <code>SOAPBody</code> object.
-     * <p>
-     * Calling this method invalidates the <code>document</code> parameter. The
-     * client application should discard all references to this
-     * <code>Document</code> and its contents upon calling
-     * <code>addDocument</code>. The behavior of an application that continues
-     * to use such references is undefined.
-     *
-     * @param document the <code>Document</code> object whose root node will be
-     *              added to this <code>SOAPBody</code>
-     * @return the <code>SOAPBodyElement</code> that represents the root node
-     *              that was added
+     * Adds the root node of the DOM <code>Document</code> to this <code>SOAPBody</code> object.
+     * <p/>
+     * Calling this method invalidates the <code>document</code> parameter. The client application
+     * should discard all references to this <code>Document</code> and its contents upon calling
+     * <code>addDocument</code>. The behavior of an application that continues to use such
+     * references is undefined.
+     *
+     * @param document the <code>Document</code> object whose root node will be added to this
+     *                 <code>SOAPBody</code>
+     * @return the <code>SOAPBodyElement</code> that represents the root node that was added
      * @throws SOAPException if the <code>Document</code> cannot be added
      */
     public abstract SOAPBodyElement addDocument(Document document) throws SOAPException;
-    }
+
+    public abstract SOAPBodyElement addBodyElement(javax.xml.namespace.QName qname)
+            throws SOAPException;
+
+    public abstract SOAPFault addFault(javax.xml.namespace.QName qname,
+                                       java.lang.String s)
+            throws SOAPException;
+
+    public abstract SOAPFault addFault(javax.xml.namespace.QName qname,
+                                       java.lang.String s,
+                                       java.util.Locale locale)
+            throws SOAPException;
+
+    public abstract org.w3c.dom.Document extractContentAsDocument()
+            throws SOAPException;
+}

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBodyElement.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBodyElement.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBodyElement.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPBodyElement.java Tue Dec  4 11:25:44 2007
@@ -1,36 +1,32 @@
 /*
  * 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 <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>
+ * 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 {}
+public interface SOAPBodyElement extends SOAPElement {
+}

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnection.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnection.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnection.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnection.java Tue Dec  4 11:25:44 2007
@@ -1,64 +1,74 @@
 /*
  * 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 point-to-point connection that a client can use for sending messages
- * directly to a remote party (represented by a URL, for instance).
- * <p>
- * A client can obtain a <code>SOAPConnection</code> object simply by
- * calling the following static method.
+ * A point-to-point connection that a client can use for sending messages directly to a remote party
+ * (represented by a URL, for instance).
+ * <p/>
+ * A client can obtain a <code>SOAPConnection</code> object simply by calling the following static
+ * method.
  * <pre>
- *
+ * <p/>
  *      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.
+ * 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() {}
+    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 an <code>Object</code> that identifies
-     *            where the message should be sent. It is required to
-     *            support Objects of type
-     *            <code>java.lang.String</code>,
-     *            <code>java.net.URL</code>, and when JAXM is present
-     *            <code>javax.xml.messaging.URLEndpoint</code>
-     * @return the <CODE>SOAPMessage</CODE> object that is the
-     *     response to the message that was sent
-     * @throws  SOAPException if there is a SOAP error
+     * 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 an <code>Object</code> that identifies where the message should be sent. It
+     *                 is required to support Objects of type <code>java.lang.String</code>,
+     *                 <code>java.net.URL</code>, and when JAXM is present <code>javax.xml.messaging.URLEndpoint</code>
+     * @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, Object endpoint)
-        throws SOAPException;
+            throws SOAPException;
 
     /**
      * Closes this <CODE>SOAPConnection</CODE> object.
-     * @throws  SOAPException if there is a SOAP error
+     *
+     * @throws SOAPException if there is a SOAP error
      */
     public abstract void close() throws SOAPException;
+
+    /**
+     * Gets a message from a specific endpoint and blocks until it receives,
+     *
+     * @param to - an Object that identifies where the request should be sent. Objects of type
+     *           java.lang.String and java.net.URL must be supported.
+     * @return the SOAPMessage object that is the response to the get message request
+     * @throws SOAPException - if there is a SOAP error
+     */
+    public SOAPMessage get(Object obj)
+            throws SOAPException {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnectionFactory.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnectionFactory.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnectionFactory.java Tue Dec  4 11:25:44 2007
@@ -1,69 +1,67 @@
 /*
  * 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 factory for creating <code>SOAPConnection</code> objects. Implementation of
- * this class is optional. If <code>SOAPConnectionFactory.newInstance()</code>
- * throws an <code>UnsupportedOperationException</code> then the implementation
- * does not support the SAAJ communication infrastructure. Otherwise
- * <code>SOAPConnection</code> objects can be created by calling
- * <code>createConnection()</code> on the newly created
- * <code>SOAPConnectionFactory</code> object.
+ * A factory for creating <code>SOAPConnection</code> objects. Implementation of this class is
+ * optional. If <code>SOAPConnectionFactory.newInstance()</code> throws an
+ * <code>UnsupportedOperationException</code> then the implementation does not support the SAAJ
+ * communication infrastructure. Otherwise <code>SOAPConnection</code> objects can be created by
+ * calling <code>createConnection()</code> on the newly created <code>SOAPConnectionFactory</code>
+ * object.
  */
 public abstract class SOAPConnectionFactory {
 
-    public 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
-     * @throws UnsupportedOperationException  if newInstance is not supported.
+     * 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
+     * @throws UnsupportedOperationException if newInstance is not supported.
      */
     public static SOAPConnectionFactory newInstance()
             throws SOAPException, UnsupportedOperationException {
 
         try {
-            return (SOAPConnectionFactory) FactoryFinder.find(SF_PROPERTY,
-                    DEFAULT_SOAP_CONNECTION_FACTORY);
+            return (SOAPConnectionFactory)FactoryFinder.find(SF_PROPERTY,
+                                                             DEFAULT_SOAP_CONNECTION_FACTORY);
         } catch (Exception exception) {
             throw new SOAPException("Unable to create SOAP connection factory: "
-                                    + exception.getMessage());
+                    + 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.
+     * @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 =
-        "org.apache.axis.soap.SOAPConnectionFactoryImpl";
+            "org.apache.axis2.saaj.SOAPConnectionFactoryImpl";
 
     private static final String SF_PROPERTY =
-        "javax.xml.soap.SOAPConnectionFactory";
+            "javax.xml.soap.SOAPConnectionFactory";
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConstants.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConstants.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConstants.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConstants.java Tue Dec  4 11:25:44 2007
@@ -1,42 +1,97 @@
 /*
  * 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;
+
 /** 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/";
+            "http://schemas.xmlsoap.org/soap/envelope/";
 
     /**
-     * The namespace identifier for the SOAP encoding (see section 5 of
-     * the SOAP 1.1 specification).
+     * 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/";
+            "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).
+     * 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";
+            "http://schemas.xmlsoap.org/soap/actor/next";
+
+    public static final String DYNAMIC_SOAP_PROTOCOL
+            = "Dynamic Protocol";
+
+    public static final String SOAP_1_1_PROTOCOL
+            = "SOAP 1.1 Protocol";
+
+    public static final String SOAP_1_2_PROTOCOL
+            = "SOAP 1.2 Protocol";
+
+    public static final String DEFAULT_SOAP_PROTOCOL
+            = "SOAP 1.1 Protocol";
+
+    public static final String URI_NS_SOAP_1_1_ENVELOPE
+            = "http://schemas.xmlsoap.org/soap/envelope/";
+
+    public static final String URI_NS_SOAP_1_2_ENVELOPE
+            = "http://www.w3.org/2003/05/soap-envelope";
+
+    public static final String URI_NS_SOAP_1_2_ENCODING
+            = "http://www.w3.org/2003/05/soap-encoding";
+
+    public static final String SOAP_1_1_CONTENT_TYPE
+            = "text/xml";
+
+    public static final String SOAP_1_2_CONTENT_TYPE
+            = "application/soap+xml";
+
+    public static final String URI_SOAP_1_2_ROLE_NEXT
+            = "http://www.w3.org/2003/05/soap-envelope/role/next";
+
+    public static final String URI_SOAP_1_2_ROLE_NONE
+            = "http://www.w3.org/2003/05/soap-envelope/role/none";
+
+    public static final String URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER
+            = "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
+
+    public static final String SOAP_ENV_PREFIX
+            = "env";
+
+    public static final QName SOAP_VERSIONMISMATCH_FAULT
+            = new QName("http://www.w3.org/2003/05/soap-envelope", "VersionMismatch", "env");
+
+    public static final QName SOAP_MUSTUNDERSTAND_FAULT
+            = new QName("http://www.w3.org/2003/05/soap-envelope", "MustUnderstand", "env");
+
+    public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT
+            = new QName("http://www.w3.org/2003/05/soap-envelope", "DataEncodingUnknown", "env");
+
+    public static final QName SOAP_SENDER_FAULT
+            = new QName("http://www.w3.org/2003/05/soap-envelope", "Sender", "env");
+
+    public static final QName SOAP_RECEIVER_FAULT
+            = new QName("http://www.w3.org/2003/05/soap-envelope", "Receiver", "env");
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElement.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElement.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElement.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElement.java Tue Dec  4 11:25:44 2007
@@ -1,292 +1,280 @@
 /*
  * 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;
 
 /**
- * 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.
+ * 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, org.w3c.dom.Element {
+public interface SOAPElement extends javax.xml.soap.Node, org.w3c.dom.Element {
 
     /**
-     * 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
+     * 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
+     * @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
+     * 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
+     * @throws SOAPException if there is an error in creating the <code>SOAPElement</code> object
      */
     public abstract SOAPElement addChildElement(String localName)
-        throws SOAPException;
+            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
+     * 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
+     * @throws SOAPException if there is an error in creating the <code>SOAPElement</code> object
      */
-    public abstract SOAPElement addChildElement(String localName, String prefix)
-        throws SOAPException;
+    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
+     * 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
+     * @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(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/>
+     * <P>The fragment rooted in <code>element</code> is either added as a whole or not at all, if
+     * there was an error.
+     * <p/>
+     * <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;
+            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
+     * 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
+     * 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;
+            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
+     * <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
+     * 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.
+     * 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
+     * @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
+     * 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
+     * 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
+     *
+     * @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
+     * 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
+     * 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
+     * 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  java.lang.IllegalArgumentException  if
-     *     there was a problem in the encoding style being set.
+     * Sets the encoding style for this <CODE>SOAPElement</CODE> object to one specified.
+     *
+     * @param encodingStyle a <CODE>String</CODE> giving the encoding style
+     * @throws IllegalArgumentException
+     *          if there was a problem in the encoding style being set.
      * @see #getEncodingStyle() getEncodingStyle()
      */
     public abstract void setEncodingStyle(String encodingStyle)
-        throws SOAPException;
+            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)
+     * Returns the encoding style for this <CODE> SOAPElement</CODE> object.
+     *
+     * @return a <CODE>String</CODE> giving the encoding style
+     * @see #setEncodingStyle(String) setEncodingStyle(java.lang.String)
      */
     public abstract String getEncodingStyle();
 
     /**
      * Detaches all children of this <code>SOAPElement</code>.
-     * <p>
-     * This method is useful for rolling back the construction of partially
-     * completed <code>SOAPHeaders</code> and <code>SOAPBodys</code> in
-     * reparation for sending a fault when an error condition is detected. It is
-     * also useful for recycling portions of a document within a SOAP message.
+     * <p/>
+     * This method is useful for rolling back the construction of partially completed
+     * <code>SOAPHeaders</code> and <code>SOAPBodys</code> in reparation for sending a fault when an
+     * error condition is detected. It is also useful for recycling portions of a document within a
+     * SOAP message.
      */
     public abstract void removeContents();
 
     /**
-     * Returns an <code>Iterator</code> over the namespace prefix
-     * <code>String</code>s visible to this element. The prefixes returned by
-     * this iterator can be passed to the method <code>getNamespaceURI()</code>
-     * to retrieve the URI of each namespace.
+     * Returns an <code>Iterator</code> over the namespace prefix <code>String</code>s visible to
+     * this element. The prefixes returned by this iterator can be passed to the method
+     * <code>getNamespaceURI()</code> to retrieve the URI of each namespace.
      *
      * @return an iterator over the namespace prefixes are within scope of this
-     *              <code>SOAPElement</code> object
+     *         <code>SOAPElement</code> object
      */
     public abstract Iterator getVisibleNamespacePrefixes();
+
+    public abstract SOAPElement addAttribute(javax.xml.namespace.QName qname,
+                                             java.lang.String value)
+            throws SOAPException;
+
+    public abstract SOAPElement addChildElement(javax.xml.namespace.QName qname)
+            throws SOAPException;
+
+    public abstract javax.xml.namespace.QName createQName(String localName, String prefix)
+            throws SOAPException;
+
+    public abstract java.util.Iterator getAllAttributesAsQNames();
+
+    public abstract java.lang.String getAttributeValue(javax.xml.namespace.QName qname);
+
+    public abstract java.util.Iterator getChildElements(QName name);
+
+    public abstract javax.xml.namespace.QName getElementQName();
+
+    boolean removeAttribute(javax.xml.namespace.QName qname);
+
+    public abstract SOAPElement setElementQName(javax.xml.namespace.QName newName)
+            throws SOAPException;
 }

Modified: geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElementFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElementFactory.java?rev=601048&r1=600870&r2=601048&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElementFactory.java (original)
+++ geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPElementFactory.java Tue Dec  4 11:25:44 2007
@@ -1,97 +1,86 @@
 /*
  * 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;
 
 /**
- * <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><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/>
+ * <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>
  *
- * <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>
- * @deprecated - Use javax.xml.soap.SOAPFactory for creating SOAPElements.
  * @see SOAPFactory SOAPFactory
+ * @deprecated - Use javax.xml.soap.SOAPFactory for creating SOAPElements.
  */
 public class SOAPElementFactory {
 
     /**
      * Create a new <code>SOAPElementFactory from a <code>SOAPFactory</code>.
      *
-     * @param soapfactory  the <code>SOAPFactory</code> to use
+     * @param soapfactory the <code>SOAPFactory</code> to use
      */
     private SOAPElementFactory(SOAPFactory soapfactory) {
         sf = soapfactory;
     }
 
     /**
-     * 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
+     * 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
+     * @see SOAPFactory#createElement(Name) SOAPFactory.createElement(javax.xml.soap.Name)
      * @deprecated Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name) instead
-     * @see SOAPFactory#createElement(javax.xml.soap.Name) SOAPFactory.createElement(javax.xml.soap.Name)
      */
     public SOAPElement create(Name name) throws SOAPException {
         return sf.createElement(name);
     }
 
     /**
-     * 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
+     * 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
+     * @see SOAPFactory#createElement(String) SOAPFactory.createElement(java.lang.String)
      * @deprecated Use javax.xml.soap.SOAPFactory.createElement(String localName) instead
-     * @see SOAPFactory#createElement(java.lang.String) SOAPFactory.createElement(java.lang.String)
      */
     public SOAPElement create(String localName) throws SOAPException {
         return sf.createElement(localName);
     }
 
     /**
-     * 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
-     * @deprecated Use javax.xml.soap.SOAPFactory.createElement(String localName, String prefix, String uri) instead
-     * @see SOAPFactory#createElement(java.lang.String, java.lang.String, java.lang.String) SOAPFactory.createElement(java.lang.String, java.lang.String, java.lang.String)
+     * 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
+     * @see SOAPFactory#createElement(String, String, String)
+     *      SOAPFactory.createElement(java.lang.String, java.lang.String, java.lang.String)
+     * @deprecated Use javax.xml.soap.SOAPFactory.createElement(String localName, String prefix,
+     *             String uri) instead
      */
     public SOAPElement create(String localName, String prefix, String uri)
             throws SOAPException {
@@ -101,10 +90,8 @@
     /**
      * 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
+     * @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 {
 
@@ -112,7 +99,7 @@
             return new SOAPElementFactory(SOAPFactory.newInstance());
         } catch (Exception exception) {
             throw new SOAPException("Unable to create SOAP Element Factory: "
-                                    + exception.getMessage());
+                    + exception.getMessage());
         }
     }
 



Mime
View raw message