You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ru...@apache.org on 2006/03/07 07:59:38 UTC

svn commit: r383805 [1/3] - in /webservices/commons/modules/axiom: src/org/apache/ws/commons/om/ src/org/apache/ws/commons/om/impl/llom/ src/org/apache/ws/commons/om/impl/llom/factory/ src/org/apache/ws/commons/om/xpath/ src/org/apache/ws/commons/soap/...

Author: ruchithf
Date: Mon Mar  6 22:59:32 2006
New Revision: 383805

URL: http://svn.apache.org/viewcvs?rev=383805&view=rev
Log:
changing axiom to let each OMNode, OmAttribute and OMNamespace hold the factory that was used to create it.


Modified:
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMAttribute.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMDocument.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMElement.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMException.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMFactoryException.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNamespace.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNode.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMAttributeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMCommentImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocTypeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocumentImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMElementImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNamespaceImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMProcessingInstructionImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMTextImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/factory/OMLinkedListImplFactory.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/om/xpath/DocumentNavigator.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPFactory.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPProcessingException.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPBodyImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPElement.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPEnvelopeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultCodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultDetailImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultNodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultReasonImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultRoleImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultSubCodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultTextImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultValueImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderBlockImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPTextImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/builder/SOAP11BuilderHelper.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11BodyImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11Factory.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultNodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultSubCodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultTextImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11FaultValueImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11HeaderImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12BodyImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12Factory.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultCodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultDetailImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultRoleImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultTextImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultValueImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java
    webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderImpl.java
    webservices/commons/modules/axiom/test/org/apache/ws/commons/attachments/ImageSampleTest.java
    webservices/commons/modules/axiom/test/org/apache/ws/commons/om/impl/llom/OMOutputTest.java
    webservices/commons/modules/axiom/test/org/apache/ws/commons/soap/impl/llom/OMHeaderTest.java

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMAttribute.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMAttribute.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMAttribute.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMAttribute.java Mon Mar  6 22:59:32 2006
@@ -56,4 +56,10 @@
      * @return Returns javax.xml.namespace.QName
      */
     public QName getQName();
+    
+    /**
+     * Returns the OMFactory that created this object
+     * @return
+     */
+    public OMFactory getOMFactory();
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMDocument.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMDocument.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMDocument.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMDocument.java Mon Mar  6 22:59:32 2006
@@ -107,4 +107,11 @@
      * @throws XMLStreamException
      */
     public void serialize(OutputStream output) throws XMLStreamException;
+    
+    /**
+     * Returns the OMFactory that created this object
+     * @return
+     */
+    public OMFactory getOMFactory();
+    
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMElement.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMElement.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMElement.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMElement.java Mon Mar  6 22:59:32 2006
@@ -293,7 +293,6 @@
      */
     public OMElement cloneOMElement();
 
-
     public void setLineNumber(int lineNumber);
     public int getLineNumber();
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMException.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMException.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMException.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMException.java Mon Mar  6 22:59:32 2006
@@ -20,6 +20,9 @@
  * Class OMException
  */
 public class OMException extends RuntimeException {
+    
+    private static final long serialVersionUID = -730218408325095333L;
+
     /**
      * Constructor OMException
      */

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMFactoryException.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMFactoryException.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMFactoryException.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMFactoryException.java Mon Mar  6 22:59:32 2006
@@ -20,6 +20,9 @@
  * Class OMFactoryException
  */
 public class OMFactoryException extends OMException {
+    
+    private static final long serialVersionUID = -9107212004470940807L;
+
     /**
      * Constructor OMFactoryException
      */

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNamespace.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNamespace.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNamespace.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNamespace.java Mon Mar  6 22:59:32 2006
@@ -42,4 +42,10 @@
      * @return Returns String.
      */
     public String getName();
+    
+    /**
+     * Returns the OMFactory that created this object
+     * @return
+     */
+    public OMFactory getOMFactory();
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNode.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNode.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNode.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/OMNode.java Mon Mar  6 22:59:32 2006
@@ -269,4 +269,11 @@
      * Builds itself.
      */
     public void build();
+    
+    /**
+     * Returns the OMFactory that created this object
+     * @return
+     */
+    public OMFactory getOMFactory();
+    
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMAttributeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMAttributeImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMAttributeImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMAttributeImpl.java Mon Mar  6 22:59:32 2006
@@ -17,6 +17,7 @@
 package org.apache.ws.commons.om.impl.llom;
 
 import org.apache.ws.commons.om.OMAttribute;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNamespace;
 
 import javax.xml.namespace.QName;
@@ -39,6 +40,11 @@
      * Field namespace
      */
     private OMNamespace namespace;
+    
+    /**
+     * <code>OMFactory</code> that created this <code>OMAttribute</code>
+     */
+    private OMFactory factory;
 
     /**
      * Constructor OMAttributeImpl.
@@ -47,10 +53,12 @@
      * @param ns
      * @param value
      */
-    public OMAttributeImpl(String localName, OMNamespace ns, String value) {
+    public OMAttributeImpl(String localName, OMNamespace ns, String value, 
+            OMFactory factory) {
         setLocalName(localName);
         setAttributeValue(value);
         setOMNamespace(ns);
+        this.factory = factory;
     }
 
     /**
@@ -120,4 +128,9 @@
     public OMNamespace getNamespace() {
         return namespace;
     }
+
+    public OMFactory getOMFactory() {
+        return this.factory;
+    }
+    
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMCommentImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMCommentImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMCommentImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMCommentImpl.java Mon Mar  6 22:59:32 2006
@@ -20,6 +20,7 @@
 import org.apache.ws.commons.om.OMContainer;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMException;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNode;
 import org.apache.ws.commons.om.impl.OMOutputImpl;
 
@@ -35,8 +36,9 @@
      * @param parentNode
      * @param contentText
      */
-    public OMCommentImpl(OMContainer parentNode, String contentText) {
-        super(parentNode);
+    public OMCommentImpl(OMContainer parentNode, String contentText, 
+            OMFactory factory) {
+        super(parentNode, factory);
         this.value = contentText;
         nodeType = OMNode.COMMENT_NODE;
         this.done = true;
@@ -47,8 +49,8 @@
      *
      * @param parentNode
      */
-    public OMCommentImpl(OMContainer parentNode) {
-        this(parentNode, null);
+    public OMCommentImpl(OMContainer parentNode, OMFactory factory) {
+        this(parentNode, null, factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocTypeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocTypeImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocTypeImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocTypeImpl.java Mon Mar  6 22:59:32 2006
@@ -20,6 +20,7 @@
 import org.apache.ws.commons.om.OMDocType;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMException;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNode;
 import org.apache.ws.commons.om.impl.OMOutputImpl;
 
@@ -35,8 +36,9 @@
      * @param parentNode
      * @param contentText
      */
-    public OMDocTypeImpl(OMContainer parentNode, String contentText) {
-        super(parentNode);
+    public OMDocTypeImpl(OMContainer parentNode, String contentText, 
+            OMFactory factory) {
+        super(parentNode, factory);
         this.value = contentText;
         nodeType = OMNode.DTD_NODE;
     }
@@ -46,8 +48,8 @@
      *
      * @param parentNode
      */
-    public OMDocTypeImpl(OMContainer parentNode) {
-        this(parentNode, null);
+    public OMDocTypeImpl(OMContainer parentNode, OMFactory factory) {
+        this(parentNode, null, factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocumentImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocumentImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocumentImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMDocumentImpl.java Mon Mar  6 22:59:32 2006
@@ -19,6 +19,7 @@
 import org.apache.ws.commons.om.OMDocument;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMException;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNode;
 import org.apache.ws.commons.om.OMOutputFormat;
 import org.apache.ws.commons.om.OMXMLParserWrapper;
@@ -75,7 +76,8 @@
 
     protected String isStandalone;
 
-
+    protected OMFactory factory;
+    
     /**
      * Default constructor
      */
@@ -100,6 +102,38 @@
     }
 
     /**
+     * Create a <code>OMDocument</code> given the <code>OMFactory</code>
+     * @param factory The <code>OMFactory</code> that created this instace
+     */
+    public OMDocumentImpl(OMFactory factory) {
+        this();
+        this.factory = factory;
+    }
+
+    /**
+     * Create the <code>OMDocument</code> with the factory
+     * @param parserWrapper
+     * @param factory
+     */
+    public OMDocumentImpl(OMXMLParserWrapper parserWrapper, OMFactory factory) {
+        this(parserWrapper);
+        this.factory = factory;
+    }
+    
+    /**
+     * Create the <code>OMDoucment</code> with the factory and set the given 
+     * <code>OMElement</code> as the document element
+     * @param documentElement
+     * @param parserWrapper
+     * @param factory
+     */
+    public OMDocumentImpl(OMElement documentElement, OMXMLParserWrapper parserWrapper, OMFactory factory) {
+        this(documentElement, parserWrapper);
+        this.factory = factory;
+    }
+
+    
+    /**
      * Method getDocumentElement.
      *
      * @return Returns OMElement.
@@ -396,6 +430,11 @@
                 omNode.serializeAndConsume(omOutput);
             }
         }
+    }
+
+    public OMFactory getOMFactory() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
     }
 
 

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMElementImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMElementImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMElementImpl.java Mon Mar  6 22:59:32 2006
@@ -22,6 +22,7 @@
 import org.apache.ws.commons.om.OMContainer;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMException;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNamespace;
 import org.apache.ws.commons.om.OMNode;
 import org.apache.ws.commons.om.OMText;
@@ -84,8 +85,8 @@
      * Constructor OMElementImpl.
      */
     public OMElementImpl(String localName, OMNamespace ns, OMContainer parent,
-                         OMXMLParserWrapper builder) {
-        super(parent);
+                         OMXMLParserWrapper builder, OMFactory factory) {
+        super(parent, factory);
         this.localName = localName;
         if (ns != null) {
             setNamespace(ns);
@@ -98,8 +99,8 @@
     /**
      * Constructor OMElementImpl.
      */
-    public OMElementImpl(String localName, OMNamespace ns) {
-        this(localName, ns, null);
+    public OMElementImpl(String localName, OMNamespace ns, OMFactory factory) {
+        this(localName, ns, null, factory);
     }
 
     /**
@@ -109,9 +110,11 @@
      * @param localName - this MUST always be not null
      * @param ns        - can be null
      * @param parent    - this should be an OMContainer
+     * @param factory   - factory that created this OMElement
      */
-    public OMElementImpl(String localName, OMNamespace ns, OMContainer parent) {
-        super(parent);
+    public OMElementImpl(String localName, OMNamespace ns, OMContainer parent, 
+            OMFactory factory) {
+        super(parent, factory);
         if (localName == null || localName.trim().length() == 0) {
             throw new OMException("localname can not be null or empty");
         }
@@ -128,8 +131,9 @@
      * @param qname - this should be valid qname according to javax.xml.namespace.QName
      * @throws OMException
      */
-    public OMElementImpl(QName qname, OMContainer parent) throws OMException {
-        this(qname.getLocalPart(), null, parent);
+    public OMElementImpl(QName qname, OMContainer parent, OMFactory factory) 
+    throws OMException {
+        this(qname.getLocalPart(), null, parent, factory);
         this.ns = handleNamespace(qname);
     }
 
@@ -285,7 +289,7 @@
      * @return Returns namespace.
      */
     public OMNamespace declareNamespace(String uri, String prefix) {
-        OMNamespaceImpl ns = new OMNamespaceImpl(uri, prefix);
+        OMNamespaceImpl ns = new OMNamespaceImpl(uri, prefix, this.factory);
         return declareNamespace(ns);
     }
 
@@ -348,7 +352,7 @@
 
         //If the prefix is available and uri is available and its the xml namespace
         if (prefix != null && prefix.equals(OMConstants.XMLNS_PREFIX) && uri.equals(OMConstants.XMLNS_URI)) {
-            return new OMNamespaceImpl(uri, prefix);
+            return new OMNamespaceImpl(uri, prefix, this.factory);
         }
 
         if (namespaces == null) {
@@ -490,7 +494,7 @@
                         + " and then use it with the attribute");
             }
         }
-        return addAttribute(new OMAttributeImpl(attributeName, ns, value));
+        return addAttribute(new OMAttributeImpl(attributeName, ns, value, this.factory));
     }
 
     /**
@@ -859,4 +863,5 @@
     public int getLineNumber() {
         return lineNumber;
     }
+
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNamespaceImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNamespaceImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNamespaceImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNamespaceImpl.java Mon Mar  6 22:59:32 2006
@@ -16,6 +16,7 @@
 
 package org.apache.ws.commons.om.impl.llom;
 
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNamespace;
 
 /**
@@ -31,14 +32,17 @@
      * Field uri
      */
     private String uri;
+    
+    private OMFactory factory;
 
     /**
      * @param uri
      * @param prefix
      */
-    public OMNamespaceImpl(String uri, String prefix) {
+    public OMNamespaceImpl(String uri, String prefix, OMFactory factory) {
         this.uri = uri;
         this.prefix = prefix;
+        this.factory = factory;
     }
 
     /**
@@ -70,5 +74,12 @@
      */
     public String getName() {
         return uri;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.ws.commons.om.OMNamespace#getOMFactory()
+     */
+    public OMFactory getOMFactory() {
+        return this.factory;
     }
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNodeImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNodeImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMNodeImpl.java Mon Mar  6 22:59:32 2006
@@ -16,22 +16,23 @@
 
 package org.apache.ws.commons.om.impl.llom;
 
+import java.io.OutputStream;
+import java.io.Writer;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
 import org.apache.ws.commons.om.OMContainer;
 import org.apache.ws.commons.om.OMException;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNode;
 import org.apache.ws.commons.om.OMOutputFormat;
 import org.apache.ws.commons.om.OMXMLParserWrapper;
-import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.impl.OMContainerEx;
 import org.apache.ws.commons.om.impl.OMNodeEx;
 import org.apache.ws.commons.om.impl.OMOutputImpl;
 
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.OutputStream;
-import java.io.Writer;
-
 /**
  * Class OMNodeImpl
  */
@@ -64,23 +65,47 @@
      * Field nodeType
      */
     protected int nodeType;
+    
+    protected OMFactory factory;
 
+//    /**
+//     * Constructor OMNodeImpl
+//     */
+//    public OMNodeImpl() {
+//    }
+//
+//    /**
+//     * For a node to exist there must be a parent.
+//     *
+//     * @param parent
+//     */
+//    public OMNodeImpl(OMContainer parent) {
+//        if ((parent != null)) {
+//            this.parent = (OMContainerEx) parent;
+//            parent.addChild(this);
+//        }
+//    }
+    
     /**
      * Constructor OMNodeImpl
+     * @param factory The <code>OMFactory</code> that created this
      */
-    public OMNodeImpl() {
+    public OMNodeImpl(OMFactory factory) {
+        this.factory = factory;
     }
 
     /**
      * For a node to exist there must be a parent.
      *
-     * @param parent
+     * @param parent Parent <code>OMContainer</code> of this node
+     * @param factory The <code>OMFactory</code> that created this
      */
-    public OMNodeImpl(OMContainer parent) {
+    public OMNodeImpl(OMContainer parent, OMFactory factory) {
         if ((parent != null)) {
             this.parent = (OMContainerEx) parent;
             parent.addChild(this);
         }
+        this.factory = factory;
     }
 
     /**
@@ -379,5 +404,9 @@
         omOutput.setOutputFormat(format);
         serializeAndConsume(omOutput);
         omOutput.flush();
+    }
+
+    public OMFactory getOMFactory() {
+        return this.factory;
     }
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMProcessingInstructionImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMProcessingInstructionImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMProcessingInstructionImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMProcessingInstructionImpl.java Mon Mar  6 22:59:32 2006
@@ -19,6 +19,7 @@
 import org.apache.ws.commons.om.OMContainer;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMException;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNode;
 import org.apache.ws.commons.om.OMProcessingInstruction;
 
@@ -36,8 +37,9 @@
      * @param target
      * @param value
      */
-    public OMProcessingInstructionImpl(OMContainer parentNode, String target, String value) {
-        super(parentNode);
+    public OMProcessingInstructionImpl(OMContainer parentNode, String target, 
+            String value, OMFactory factory) {
+        super(parentNode, factory);
         this.target = (target == null) ? null : target.trim();
         this.value = (value == null) ? null : value.trim();
         nodeType = OMNode.PI_NODE;
@@ -48,8 +50,9 @@
      *
      * @param parentNode
      */
-    public OMProcessingInstructionImpl(OMContainer parentNode) {
-        this(parentNode, null, null);
+    public OMProcessingInstructionImpl(OMContainer parentNode, 
+            OMFactory factory) {
+        this(parentNode, null, null, factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMTextImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMTextImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/OMTextImpl.java Mon Mar  6 22:59:32 2006
@@ -21,6 +21,7 @@
 import org.apache.ws.commons.om.OMConstants;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMException;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNamespace;
 import org.apache.ws.commons.om.OMText;
 import org.apache.ws.commons.om.OMXMLParserWrapper;
@@ -59,8 +60,7 @@
     /**
      * Field nameSpace used when serializing Binary stuff as MTOM optimized.
      */
-    protected OMNamespace ns = new OMNamespaceImpl(
-            "http://www.w3.org/2004/08/xop/include", "xop");
+    protected OMNamespace ns = null;
 
     /**
      * Field localName used when serializing Binary stuff as MTOM optimized.
@@ -77,9 +77,12 @@
      *
      * @param s
      */
-    public OMTextImpl(String s) {
+    public OMTextImpl(String s, OMFactory factory) {
+        super(factory);
         this.value = s;
         this.nodeType = TEXT_NODE;
+        this.ns = new OMNamespaceImpl(
+                "http://www.w3.org/2004/08/xop/include", "xop", factory);
     }
 
     /**
@@ -87,10 +90,13 @@
      * @param nodeType - OMText can handle CHARACTERS, SPACES, CDATA and ENTITY REFERENCES.
      *                 Constants for this can be found in OMNode.
      */
-    public OMTextImpl(String s, int nodeType) {
+    public OMTextImpl(String s, int nodeType, OMFactory factory) {
+        super(factory);
         this.value = s;
         this.nodeType = nodeType;
-    }
+        this.ns = new OMNamespaceImpl(
+                "http://www.w3.org/2004/08/xop/include", "xop", factory);
+    }   
 
     /**
      * Constructor OMTextImpl.
@@ -98,26 +104,32 @@
      * @param parent
      * @param text
      */
-    public OMTextImpl(OMElement parent, String text) {
-        super(parent);
+    public OMTextImpl(OMElement parent, String text, OMFactory factory) {
+        super(parent, factory);
         this.value = text;
         done = true;
         this.nodeType = TEXT_NODE;
+        this.ns = new OMNamespaceImpl(
+                "http://www.w3.org/2004/08/xop/include", "xop", factory);
     }
 
-    public OMTextImpl(OMElement parent, String text, int nodeType) {
-        super(parent);
+    public OMTextImpl(OMElement parent, String text, int nodeType, 
+            OMFactory factory) {
+        super(parent, factory);
         this.value = text;
         done = true;
         this.nodeType = nodeType;
+        this.ns = new OMNamespaceImpl(
+                "http://www.w3.org/2004/08/xop/include", "xop", factory);
     }
 
     /**
      * @param s        - base64 encoded String representation of Binary
      * @param mimeType of the Binary
      */
-    public OMTextImpl(String s, String mimeType, boolean optimize) {
-        this(null, s, mimeType, optimize);
+    public OMTextImpl(String s, String mimeType, boolean optimize, 
+            OMFactory factory) {
+        this(null, s, mimeType, optimize, factory);
     }
 
     /**
@@ -127,8 +139,8 @@
      * @param mimeType of the Binary
      */
     public OMTextImpl(OMElement parent, String s, String mimeType,
-                      boolean optimize) {
-        this(parent, s);
+                      boolean optimize, OMFactory factory) {
+        this(parent, s, factory);
         this.mimeType = mimeType;
         this.optimize = optimize;
         this.isBinary = true;
@@ -139,20 +151,23 @@
     /**
      * @param dataHandler To send binary optimised content Created programatically.
      */
-    public OMTextImpl(Object dataHandler) {
-        this(dataHandler, true);
+    public OMTextImpl(Object dataHandler, OMFactory factory) {
+        this(dataHandler, true, factory);
     }
 
     /**
      * @param dataHandler
      * @param optimize    To send binary content. Created progrmatically.
      */
-    public OMTextImpl(Object dataHandler, boolean optimize) {
+    public OMTextImpl(Object dataHandler, boolean optimize, OMFactory factory) {
+        super(factory);
         this.dataHandlerObject = dataHandler;
         this.isBinary = true;
         this.optimize = optimize;
         done = true;
         this.nodeType = TEXT_NODE;
+        this.ns = new OMNamespaceImpl(
+                "http://www.w3.org/2004/08/xop/include", "xop", factory);
     }
 
     /**
@@ -163,13 +178,15 @@
      *                  deferred parsing of MIME messages.
      */
     public OMTextImpl(String contentID, OMElement parent,
-                      OMXMLParserWrapper builder) {
-        super(parent);
+                      OMXMLParserWrapper builder, OMFactory factory) {
+        super(parent, factory);
         this.contentID = contentID;
         this.optimize = true;
         this.isBinary = true;
         this.builder = builder;
         this.nodeType = TEXT_NODE;
+        this.ns = new OMNamespaceImpl(
+                "http://www.w3.org/2004/08/xop/include", "xop", factory);
     }
 
     /**
@@ -316,7 +333,8 @@
                 }
                 // send binary as MTOM optimised
                 this.attribute = new OMAttributeImpl("href",
-                        new OMNamespaceImpl("", ""), "cid:" + getContentID());
+                        new OMNamespaceImpl("", "", this.factory), "cid:" + getContentID(), 
+                        this.factory);
                 this.serializeStartpart(omOutput);
                 omOutput.writeOptimized(this);
                 omOutput.getXmlStreamWriter().writeEndElement();

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/factory/OMLinkedListImplFactory.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/impl/llom/factory/OMLinkedListImplFactory.java Mon Mar  6 22:59:32 2006
@@ -61,11 +61,11 @@
      * @return Returns OMElement.
      */
     public OMElement createOMElement(String localName, OMNamespace ns) {
-        return new OMElementImpl(localName, ns);
+        return new OMElementImpl(localName, ns, this);
     }
 
     public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) {
-        return new OMElementImpl(localName, ns, parent);
+        return new OMElementImpl(localName, ns, parent, this);
     }
 
     /**
@@ -81,7 +81,7 @@
                                      OMContainer parent,
                                      OMXMLParserWrapper builder) {
         return new OMElementImpl(localName, ns, parent,
-                builder);
+                builder, this);
     }
 
     /**
@@ -109,7 +109,7 @@
      */
     public OMElement createOMElement(QName qname, OMContainer parent)
             throws OMException {
-        return new OMElementImpl(qname, parent);
+        return new OMElementImpl(qname, parent, this);
     }
 
     /**
@@ -123,7 +123,7 @@
         String key = uri + uriAndPrefixSeparator + prefix;
         OMNamespace existingNamespaceObject = (OMNamespace) namespaceTable.get(key);
         if (existingNamespaceObject == null) {
-            existingNamespaceObject = new OMNamespaceImpl(uri, prefix);
+            existingNamespaceObject = new OMNamespaceImpl(uri, prefix, this);
             namespaceTable.put(key, existingNamespaceObject);
         }
         return existingNamespaceObject;
@@ -137,11 +137,11 @@
      * @return Returns OMText.
      */
     public OMText createText(OMElement parent, String text) {
-        return new OMTextImpl(parent, text);
+        return new OMTextImpl(parent, text, this);
     }
 
     public OMText createText(OMElement parent, String text, int type) {
-        return new OMTextImpl(parent, text, type);
+        return new OMTextImpl(parent, text, type, this);
     }
 
     /**
@@ -151,11 +151,11 @@
      * @return Returns OMText.
      */
     public OMText createText(String s) {
-        return new OMTextImpl(s);
+        return new OMTextImpl(s, this);
     }
 
     public OMText createText(String s, int type) {
-        return new OMTextImpl(s, type);
+        return new OMTextImpl(s, type, this);
     }
 
     /**
@@ -167,7 +167,7 @@
      * @return Returns OMText.
      */
     public OMText createText(String s, String mimeType, boolean optimize) {
-        return new OMTextImpl(s, mimeType, optimize);
+        return new OMTextImpl(s, mimeType, optimize, this);
     }
 
     /**
@@ -178,12 +178,12 @@
      * @return Returns OMText.
      */
     public OMText createText(Object dataHandler, boolean optimize) {
-        return new OMTextImpl(dataHandler, optimize);
+        return new OMTextImpl(dataHandler, optimize, this);
     }
 
     public OMText createText(String contentID, OMElement parent,
                              OMXMLParserWrapper builder) {
-        return new OMTextImpl(contentID, parent, builder);
+        return new OMTextImpl(contentID, parent, builder, this);
     }
 
     /**
@@ -199,7 +199,7 @@
                              String s,
                              String mimeType,
                              boolean optimize) {
-        return new OMTextImpl(parent, s, mimeType, optimize);
+        return new OMTextImpl(parent, s, mimeType, optimize, this);
     }
 
     /**
@@ -213,7 +213,7 @@
     public OMAttribute createOMAttribute(String localName,
                                          OMNamespace ns,
                                          String value) {
-        return new OMAttributeImpl(localName, ns, value);
+        return new OMAttributeImpl(localName, ns, value, this);
     }
 
     /**
@@ -224,7 +224,7 @@
      * @return Returns doctype.
      */
     public OMDocType createOMDocType(OMContainer parent, String content) {
-        return new OMDocTypeImpl(parent, content);
+        return new OMDocTypeImpl(parent, content, this);
     }
 
     /**
@@ -236,7 +236,7 @@
      * @return Returns OMProcessingInstruction.
      */
     public OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData) {
-        return new OMProcessingInstructionImpl(parent, piTarget, piData);
+        return new OMProcessingInstructionImpl(parent, piTarget, piData, this);
     }
 
     /**
@@ -247,7 +247,7 @@
      * @return Returns OMComment.
      */
     public OMComment createOMComment(OMContainer parent, String content) {
-        return new OMCommentImpl(parent, content);
+        return new OMCommentImpl(parent, content, this);
     }
 
     /* (non-Javadoc)

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/om/xpath/DocumentNavigator.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/om/xpath/DocumentNavigator.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/om/xpath/DocumentNavigator.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/om/xpath/DocumentNavigator.java Mon Mar  6 22:59:32 2006
@@ -5,6 +5,7 @@
 import org.apache.ws.commons.om.OMContainer;
 import org.apache.ws.commons.om.OMDocument;
 import org.apache.ws.commons.om.OMElement;
+import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNamespace;
 import org.apache.ws.commons.om.OMNode;
 import org.apache.ws.commons.om.OMProcessingInstruction;
@@ -324,9 +325,9 @@
             ArrayList attributes = new ArrayList();
             Iterator i = ((OMElement) contextNode).getAllAttributes();
             while (i != null && i.hasNext()) {
-                attributes.add(
-                        new OMAttributeEx((OMAttribute) i.next(),
-                                (OMContainer) contextNode));
+                attributes.add(new OMAttributeEx((OMAttribute) i.next(),
+                        (OMContainer) contextNode, ((OMElement) contextNode)
+                                .getOMFactory()));
             }
             return attributes.iterator();
         }
@@ -371,7 +372,8 @@
                     String prefix = namespace.getPrefix();
                     if (prefix != null && !prefixes.contains(prefix)) {
                         prefixes.add(prefix);
-                        nsList.add(new OMNamespaceEx(namespace, context));
+                        nsList.add(new OMNamespaceEx(namespace, context,
+                                namespace.getOMFactory()));
                     }
                 }
             }
@@ -379,8 +381,11 @@
         nsList.add(
                 new OMNamespaceEx(
                         new OMNamespaceImpl(
-                                "http://www.w3.org/XML/1998/namespace", "xml"),
-                        (OMContainer) contextNode));
+                                "http://www.w3.org/XML/1998/namespace", 
+                                "xml", 
+                                ((OMNode)contextNode).getOMFactory()),
+                        (OMContainer) contextNode, 
+                        ((OMNode) contextNode).getOMFactory()));
         return nsList.iterator();
     }
 
@@ -670,10 +675,12 @@
     class OMNamespaceEx implements OMNamespace {
         OMNamespace originalNsp = null;
         OMContainer parent = null;
+        OMFactory factory = null;
 
-        OMNamespaceEx(OMNamespace nsp, OMContainer parent) {
+        OMNamespaceEx(OMNamespace nsp, OMContainer parent, OMFactory factory) {
             originalNsp = nsp;
             this.parent = parent;
+            this.factory = factory;
         }
 
         public boolean equals(String uri, String prefix) {
@@ -691,13 +698,19 @@
         public OMContainer getParent() {
             return parent;
         }
+
+        public OMFactory getOMFactory() {
+            return this.factory;
+        }
     }
 
     class OMAttributeEx implements OMAttribute {
         OMAttribute attribute = null;
         OMContainer parent = null;
+        OMFactory factory;
 
-        OMAttributeEx(OMAttribute attribute, OMContainer parent) {
+        OMAttributeEx(OMAttribute attribute, OMContainer parent, 
+                OMFactory factory) {
             this.attribute = attribute;
             this.parent = parent;
         }
@@ -732,6 +745,10 @@
 
         public OMContainer getParent() {
             return parent;
+        }
+
+        public OMFactory getOMFactory() {
+            return this.factory;
         }
     }
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPFactory.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPFactory.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPFactory.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPFactory.java Mon Mar  6 22:59:32 2006
@@ -334,4 +334,6 @@
 
     public SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException;
     
+    public OMNamespace getNamespace();
+    
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPProcessingException.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPProcessingException.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPProcessingException.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/SOAPProcessingException.java Mon Mar  6 22:59:32 2006
@@ -20,6 +20,8 @@
 
 public class SOAPProcessingException extends OMException {
 
+    private static final long serialVersionUID = -5432612295193716211L;
+    
     private String soapFaultCode;
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPBodyImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPBodyImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPBodyImpl.java Mon Mar  6 22:59:32 2006
@@ -27,6 +27,7 @@
 import org.apache.ws.commons.soap.SOAPBody;
 import org.apache.ws.commons.soap.SOAPConstants;
 import org.apache.ws.commons.soap.SOAPEnvelope;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPProcessingException;
 
@@ -40,15 +41,17 @@
      */
     private boolean hasSOAPFault = false;
 
-    protected SOAPBodyImpl(String localName, OMNamespace ns) {
-        super(localName, ns);
+    protected SOAPBodyImpl(String localName, OMNamespace ns, 
+            SOAPFactory factory) {
+        super(localName, ns, factory);
     }
 
     /**
      * @param envelope
      */
-    public SOAPBodyImpl(SOAPEnvelope envelope) throws SOAPProcessingException {
-        super(envelope, SOAPConstants.BODY_LOCAL_NAME, true);
+    public SOAPBodyImpl(SOAPEnvelope envelope, SOAPFactory factory) 
+                            throws SOAPProcessingException {
+        super(envelope, SOAPConstants.BODY_LOCAL_NAME, true, factory);
 
     }
 
@@ -58,8 +61,9 @@
      * @param envelope
      * @param builder
      */
-    public SOAPBodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
-        super(envelope, SOAPConstants.BODY_LOCAL_NAME, builder);
+    public SOAPBodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, 
+            SOAPFactory factory) {
+        super(envelope, SOAPConstants.BODY_LOCAL_NAME, builder, factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPElement.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPElement.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPElement.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPElement.java Mon Mar  6 22:59:32 2006
@@ -21,6 +21,7 @@
 import org.apache.ws.commons.om.OMNamespace;
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.om.impl.llom.OMElementImpl;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPProcessingException;
 
 public abstract class SOAPElement extends OMElementImpl {
@@ -32,8 +33,9 @@
      */
     protected SOAPElement(OMElement parent,
                           String localName,
-                          boolean extractNamespaceFromParent) throws SOAPProcessingException {
-        super(localName, null, parent);
+                          boolean extractNamespaceFromParent,
+                          SOAPFactory factory) throws SOAPProcessingException {
+        super(localName, null, parent, factory);
         if (parent == null) {
             throw new SOAPProcessingException(
                     " Can not create " + localName +
@@ -49,17 +51,18 @@
 
     protected SOAPElement(OMElement parent,
                           String localName,
-                          OMXMLParserWrapper builder) {
-        super(localName, null, parent, builder);
+                          OMXMLParserWrapper builder,
+                          SOAPFactory factory) {
+        super(localName, null, parent, builder, factory);
     }
 
     /**
      * @param localName
      * @param ns
      */
-    protected SOAPElement(String localName, OMNamespace ns) {
-        super(localName, ns);
-
+    protected SOAPElement(String localName, OMNamespace ns, 
+            SOAPFactory factory) {
+        super(localName, ns, factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPEnvelopeImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPEnvelopeImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPEnvelopeImpl.java Mon Mar  6 22:59:32 2006
@@ -42,14 +42,12 @@
  */
 public class SOAPEnvelopeImpl extends SOAPElement
         implements SOAPEnvelope, OMConstants {
-    SOAPFactory factory;
-
 
     /**
      * @param builder
      */
     public SOAPEnvelopeImpl(OMXMLParserWrapper builder, SOAPFactory factory) {
-        super(null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, builder);
+        super(null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, builder, factory);
         this.factory = factory;
     }
 
@@ -57,7 +55,7 @@
      * @param ns
      */
     public SOAPEnvelopeImpl(OMNamespace ns, SOAPFactory factory) {
-        super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns);
+        super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, factory);
         this.factory = factory;
     }
 
@@ -80,7 +78,7 @@
                         new QName(SOAPConstants.HEADER_LOCAL_NAME));
         if (builder == null && header == null) {
             inferFactory();
-            header = factory.createSOAPHeader(this);
+            header = ((SOAPFactory)factory).createSOAPHeader(this);
             addChild(header);
         }
         return header;

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultCodeImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultCodeImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultCodeImpl.java Mon Mar  6 22:59:32 2006
@@ -20,6 +20,7 @@
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.om.util.ElementHelper;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPFaultCode;
 import org.apache.ws.commons.soap.SOAPFaultSubCode;
@@ -29,8 +30,8 @@
 public abstract class SOAPFaultCodeImpl extends SOAPElement implements SOAPFaultCode {
 
 
-    protected SOAPFaultCodeImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, ns);
+    protected SOAPFaultCodeImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, ns, factory);
     }
 
     /**
@@ -39,18 +40,21 @@
      * @param parent
      * @param builder
      */
-    public SOAPFaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, builder);
+    public SOAPFaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder, 
+            SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, builder,
+                factory);
     }
 
     /**
      * @param parent
      */
     public SOAPFaultCodeImpl(SOAPFault parent,
-                             boolean extractNamespaceFromParent) throws SOAPProcessingException {
+                             boolean extractNamespaceFromParent,
+                             SOAPFactory factory) throws SOAPProcessingException {
         super(parent,
                 SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME,
-                extractNamespaceFromParent);
+                extractNamespaceFromParent, factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultDetailImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultDetailImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultDetailImpl.java Mon Mar  6 22:59:32 2006
@@ -24,6 +24,7 @@
 import org.apache.ws.commons.om.impl.llom.OMSerializerUtil;
 import org.apache.ws.commons.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPFaultDetail;
 import org.apache.ws.commons.soap.SOAPProcessingException;
@@ -35,20 +36,23 @@
 public abstract class SOAPFaultDetailImpl extends SOAPElement implements SOAPFaultDetail {
 
 
-    protected SOAPFaultDetailImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, ns);
+    protected SOAPFaultDetailImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, ns, factory);
     }
 
     protected SOAPFaultDetailImpl(SOAPFault parent,
-                                  boolean extractNamespaceFromParent) throws SOAPProcessingException {
+                                  boolean extractNamespaceFromParent, 
+                                  SOAPFactory factory) throws SOAPProcessingException {
         super(parent,
                 SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME,
-                extractNamespaceFromParent);
+                extractNamespaceFromParent, factory);
     }
 
     protected SOAPFaultDetailImpl(SOAPFault parent,
-                                  OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, builder);
+                                  OMXMLParserWrapper builder,
+                                  SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, builder,
+                factory);
     }
 
     public void addDetailEntry(OMElement detailElement) {

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultImpl.java Mon Mar  6 22:59:32 2006
@@ -16,8 +16,13 @@
 
 package org.apache.ws.commons.soap.impl.llom;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
 import org.apache.ws.commons.om.OMConstants;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMException;
@@ -31,6 +36,7 @@
 import org.apache.ws.commons.soap.SOAP12Constants;
 import org.apache.ws.commons.soap.SOAPBody;
 import org.apache.ws.commons.soap.SOAPConstants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPFaultCode;
 import org.apache.ws.commons.soap.SOAPFaultDetail;
@@ -39,12 +45,6 @@
 import org.apache.ws.commons.soap.SOAPFaultRole;
 import org.apache.ws.commons.soap.SOAPProcessingException;
 
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Iterator;
-
 /**
  * Class SOAPFaultImpl
  */
@@ -52,10 +52,9 @@
         implements SOAPFault, OMConstants {
 
     protected Exception e;
-    private Log log = LogFactory.getLog(getClass());
 
-    protected SOAPFaultImpl(OMNamespace ns) {
-        super(SOAPConstants.SOAPFAULT_LOCAL_NAME, ns);
+    protected SOAPFaultImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAPConstants.SOAPFAULT_LOCAL_NAME, ns, factory);
     }
 
     /**
@@ -64,8 +63,8 @@
      * @param parent
      * @param e
      */
-    public SOAPFaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true);
+    public SOAPFaultImpl(SOAPBody parent, Exception e, SOAPFactory factory) throws SOAPProcessingException {
+        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory);
         setException(e);
     }
 
@@ -74,8 +73,8 @@
         putExceptionToSOAPFault(e);
     }
 
-    public SOAPFaultImpl(SOAPBody parent) throws SOAPProcessingException {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true);
+    public SOAPFaultImpl(SOAPBody parent, SOAPFactory factory) throws SOAPProcessingException {
+        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory);
     }
 
     /**
@@ -84,8 +83,9 @@
      * @param parent
      * @param builder
      */
-    public SOAPFaultImpl(SOAPBody parent, OMXMLParserWrapper builder) {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, builder);
+    public SOAPFaultImpl(SOAPBody parent, OMXMLParserWrapper builder,
+            SOAPFactory factory) {
+        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, builder, factory);
     }
 
 
@@ -164,7 +164,9 @@
             detail = getNewSOAPFaultDetail(this);
             setDetail(detail);
         }
-        OMElement faultDetailEnty = new OMElementImpl(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY,null, detail);
+        OMElement faultDetailEnty = new OMElementImpl(
+                SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY, null, detail,
+                factory);
         faultDetailEnty.setText(sw.getBuffer().toString());
     }
 

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultNodeImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultNodeImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultNodeImpl.java Mon Mar  6 22:59:32 2006
@@ -22,6 +22,7 @@
 import org.apache.ws.commons.om.impl.llom.OMSerializerUtil;
 import org.apache.ws.commons.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPFaultNode;
 import org.apache.ws.commons.soap.SOAPProcessingException;
@@ -30,16 +31,17 @@
 
 public abstract class SOAPFaultNodeImpl extends SOAPElement implements SOAPFaultNode {
 
-    protected SOAPFaultNodeImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, ns);
+    protected SOAPFaultNodeImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, ns, factory);
     }
 
-    public SOAPFaultNodeImpl(SOAPFault parent) throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true);
+    public SOAPFaultNodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException {
+        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true, factory);
     }
 
-    public SOAPFaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder);
+    public SOAPFaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder, 
+            SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder, factory);
     }
 
     public void setNodeValue(String uri) {

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultReasonImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultReasonImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultReasonImpl.java Mon Mar  6 22:59:32 2006
@@ -24,6 +24,7 @@
 import org.apache.ws.commons.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.ws.commons.om.util.ElementHelper;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPFaultReason;
 import org.apache.ws.commons.soap.SOAPFaultText;
@@ -34,8 +35,8 @@
 public abstract class SOAPFaultReasonImpl extends SOAPElement implements SOAPFaultReason {
     protected SOAPFaultText text;
 
-    protected SOAPFaultReasonImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, ns);
+    protected SOAPFaultReasonImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, ns, factory);
     }
 
     /**
@@ -44,18 +45,22 @@
      * @param parent
      * @param builder
      */
-    public SOAPFaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, builder);
+    public SOAPFaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder,
+            SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, builder,
+                factory);
     }
 
     /**
      * @param parent
      */
     public SOAPFaultReasonImpl(OMElement parent,
-                               boolean extractNamespaceFromParent) throws SOAPProcessingException {
+            boolean extractNamespaceFromParent, SOAPFactory factory)
+            throws SOAPProcessingException {
         super(parent,
                 SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME,
-                extractNamespaceFromParent);
+                extractNamespaceFromParent,
+                factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultRoleImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultRoleImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultRoleImpl.java Mon Mar  6 22:59:32 2006
@@ -23,6 +23,7 @@
 import org.apache.ws.commons.om.impl.llom.OMSerializerUtil;
 import org.apache.ws.commons.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPProcessingException;
 
@@ -30,19 +31,22 @@
 
 public abstract class SOAPFaultRoleImpl extends SOAPElement implements org.apache.ws.commons.soap.SOAPFaultRole {
 
-    protected SOAPFaultRoleImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, ns);
+    protected SOAPFaultRoleImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, ns, factory);
     }
 
     public SOAPFaultRoleImpl(SOAPFault parent,
-                             boolean extractNamespaceFromParent) throws SOAPProcessingException {
+                             boolean extractNamespaceFromParent,
+                             SOAPFactory factory) throws SOAPProcessingException {
         super(parent,
                 SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME,
-                extractNamespaceFromParent);
+                extractNamespaceFromParent, 
+                factory);
     }
 
-    public SOAPFaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, builder);
+    public SOAPFaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder,
+            SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, builder, factory);
     }
 
     public void setRoleValue(String uri) {

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultSubCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultSubCodeImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultSubCodeImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultSubCodeImpl.java Mon Mar  6 22:59:32 2006
@@ -21,6 +21,7 @@
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.om.util.ElementHelper;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFaultSubCode;
 import org.apache.ws.commons.soap.SOAPFaultValue;
 import org.apache.ws.commons.soap.SOAPProcessingException;
@@ -30,19 +31,21 @@
     protected SOAPFaultValue value;
     protected SOAPFaultSubCode subCode;
 
-    protected SOAPFaultSubCodeImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, ns);
+    protected SOAPFaultSubCodeImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, ns, factory);
     }
 
 
-    protected SOAPFaultSubCodeImpl(OMElement parent, String localName) throws SOAPProcessingException {
-        super(parent, localName, true);
+    protected SOAPFaultSubCodeImpl(OMElement parent, String localName,
+            SOAPFactory factory) throws SOAPProcessingException {
+        super(parent, localName, true, factory);
     }
 
     protected SOAPFaultSubCodeImpl(OMElement parent,
                                    String localName,
-                                   OMXMLParserWrapper builder) {
-        super(parent, localName, builder);
+                                   OMXMLParserWrapper builder,
+                                   SOAPFactory factory) {
+        super(parent, localName, builder, factory);
     }
 
     public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException {

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultTextImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultTextImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultTextImpl.java Mon Mar  6 22:59:32 2006
@@ -22,6 +22,7 @@
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.om.impl.llom.OMAttributeImpl;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFaultReason;
 import org.apache.ws.commons.soap.SOAPFaultText;
 import org.apache.ws.commons.soap.SOAPProcessingException;
@@ -30,23 +31,32 @@
 
 public abstract class SOAPFaultTextImpl extends SOAPElement implements SOAPFaultText {
     protected OMAttribute langAttr;
-    protected OMNamespace langNamespace = OMAbstractFactory.getOMFactory()
-            .createOMNamespace(
-                    SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
-                    SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
+    protected OMNamespace langNamespace = null;
 
 
-    protected SOAPFaultTextImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, ns);
+    protected SOAPFaultTextImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, ns, factory);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
-    protected SOAPFaultTextImpl(SOAPFaultReason parent) throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true);
+    protected SOAPFaultTextImpl(SOAPFaultReason parent, SOAPFactory factory)
+            throws SOAPProcessingException {
+        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
     protected SOAPFaultTextImpl(SOAPFaultReason parent,
-                                OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder);
+                                OMXMLParserWrapper builder,
+                                SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder,
+                factory);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
 
@@ -56,7 +66,8 @@
                 new OMAttributeImpl(
                         SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
                         langNamespace,
-                        lang);
+                        lang,
+                        this.factory);
         this.addAttribute(langAttr);
     }
 

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultValueImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultValueImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultValueImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPFaultValueImpl.java Mon Mar  6 22:59:32 2006
@@ -20,20 +20,25 @@
 import org.apache.ws.commons.om.OMNamespace;
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFaultValue;
 import org.apache.ws.commons.soap.SOAPProcessingException;
 
 public abstract class SOAPFaultValueImpl extends SOAPElement implements SOAPFaultValue {
 
-    protected SOAPFaultValueImpl(OMElement parent) throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, true);
+    protected SOAPFaultValueImpl(OMElement parent, SOAPFactory factory)
+            throws SOAPProcessingException {
+        super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, true,
+                factory);
     }
 
-    protected SOAPFaultValueImpl(OMNamespace ns) {
-        super(SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, ns);
+    protected SOAPFaultValueImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, ns, factory);
     }
 
-    protected SOAPFaultValueImpl(OMElement parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, builder);
+    protected SOAPFaultValueImpl(OMElement parent, OMXMLParserWrapper builder,
+            SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, builder,
+                factory);
     }
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderBlockImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderBlockImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderBlockImpl.java Mon Mar  6 22:59:32 2006
@@ -24,6 +24,7 @@
 import org.apache.ws.commons.om.impl.llom.OMElementImpl;
 import org.apache.ws.commons.om.impl.llom.OMNamespaceImpl;
 import org.apache.ws.commons.soap.SOAPConstants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPHeader;
 import org.apache.ws.commons.soap.SOAPHeaderBlock;
 import org.apache.ws.commons.soap.SOAPProcessingException;
@@ -39,8 +40,8 @@
     private boolean processed = false;
 
 
-    public SOAPHeaderBlockImpl(String localName, OMNamespace ns) {
-        super(localName, ns);
+    public SOAPHeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory) {
+        super(localName, ns, factory);
     }
 
     /**
@@ -50,8 +51,9 @@
      */
     public SOAPHeaderBlockImpl(String localName,
                                OMNamespace ns,
-                               SOAPHeader parent) throws SOAPProcessingException {
-        super(localName, ns, parent);
+                               SOAPHeader parent,
+                               SOAPFactory factory) throws SOAPProcessingException {
+        super(localName, ns, parent, factory);
         this.setNamespace(ns);
     }
 
@@ -64,8 +66,9 @@
      * @param builder
      */
     public SOAPHeaderBlockImpl(String localName, OMNamespace ns,
-                               OMElement parent, OMXMLParserWrapper builder) {
-        super(localName, ns, parent, builder);
+                               OMElement parent, OMXMLParserWrapper builder,
+                               SOAPFactory factory) {
+        super(localName, ns, parent, builder, factory);
         this.setNamespace(ns);
     }
 
@@ -84,8 +87,9 @@
         } else {
             OMAttribute attribute = new OMAttributeImpl(attributeName,
                     new OMNamespaceImpl(soapEnvelopeNamespaceURI,
-                            SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX),
-                    attrValue);
+                            SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX, 
+                            this.factory),
+                    attrValue, this.factory);
             this.addAttribute(attribute);
         }
     }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPHeaderImpl.java Mon Mar  6 22:59:32 2006
@@ -23,6 +23,7 @@
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.soap.SOAPConstants;
 import org.apache.ws.commons.soap.SOAPEnvelope;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPHeader;
 import org.apache.ws.commons.soap.SOAPHeaderBlock;
 import org.apache.ws.commons.soap.SOAPProcessingException;
@@ -36,15 +37,16 @@
 public abstract class SOAPHeaderImpl extends SOAPElement implements SOAPHeader {
 
 
-    protected SOAPHeaderImpl(OMNamespace ns) {
-        super(SOAPConstants.HEADER_LOCAL_NAME, ns);
+    protected SOAPHeaderImpl(OMNamespace ns, SOAPFactory factory) {
+        super(SOAPConstants.HEADER_LOCAL_NAME, ns, factory);
     }
 
     /**
      * @param envelope
      */
-    public SOAPHeaderImpl(SOAPEnvelope envelope) throws SOAPProcessingException {
-        super(envelope, SOAPConstants.HEADER_LOCAL_NAME, true);
+    public SOAPHeaderImpl(SOAPEnvelope envelope, SOAPFactory factory)
+            throws SOAPProcessingException {
+        super(envelope, SOAPConstants.HEADER_LOCAL_NAME, true, factory);
 
     }
 
@@ -54,8 +56,9 @@
      * @param envelope
      * @param builder
      */
-    public SOAPHeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
-        super(envelope, SOAPConstants.HEADER_LOCAL_NAME, builder);
+    public SOAPHeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder,
+            SOAPFactory factory) {
+        super(envelope, SOAPConstants.HEADER_LOCAL_NAME, builder, factory);
     }
 
     /**

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPTextImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPTextImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/SOAPTextImpl.java Mon Mar  6 22:59:32 2006
@@ -19,16 +19,20 @@
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.soap.SOAP12Constants;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPProcessingException;
 
 public class SOAPTextImpl extends SOAPElement {
 
-    protected SOAPTextImpl(OMElement parent) throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true);
+    protected SOAPTextImpl(OMElement parent, SOAPFactory factory)
+            throws SOAPProcessingException {
+        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory);
     }
 
-    protected SOAPTextImpl(OMElement parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder);
+    protected SOAPTextImpl(OMElement parent, OMXMLParserWrapper builder,
+            SOAPFactory factory) {
+        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder,
+                factory);
     }
 
     public void setLang(String lang) {

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/builder/SOAP11BuilderHelper.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/builder/SOAP11BuilderHelper.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/builder/SOAP11BuilderHelper.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/builder/SOAP11BuilderHelper.java Mon Mar  6 22:59:32 2006
@@ -38,8 +38,6 @@
     private boolean faultcodePresent = false;
     private boolean faultstringPresent = false;
 
-    private OMElement lastProcessedSOAPElement;
-
     public SOAP11BuilderHelper(StAXSOAPModelBuilder builder) {
         super(builder);
         factory = builder.getSoapFactory();

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/factory/SOAPLinkedListImplFactory.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/factory/SOAPLinkedListImplFactory.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/factory/SOAPLinkedListImplFactory.java Mon Mar  6 22:59:32 2006
@@ -287,15 +287,17 @@
         SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());
 
         SOAPFaultCode faultCode = createSOAPFaultCode(fault);
-        SOAPFaultValue value = createSOAPFaultValue(faultCode);
+        createSOAPFaultValue(faultCode);
 
         SOAPFaultReason reason = createSOAPFaultReason(fault);
-        SOAPFaultText faultText = createSOAPFaultText(reason);
+        createSOAPFaultText(reason);
 
-//        SOAPFaultNode faultNode = createSOAPFaultNode(fault);
-//        SOAPFaultRole faultRole = createSOAPFaultRole(fault);
-        SOAPFaultDetail faultDetail = createSOAPFaultDetail(fault);
+        createSOAPFaultDetail(fault);
 
         return defaultEnvelope;
+    }
+
+    public OMNamespace getNamespace() {
+        throw new UnsupportedOperationException();
     }
 }

Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11BodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11BodyImpl.java?rev=383805&r1=383804&r2=383805&view=diff
==============================================================================
--- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11BodyImpl.java (original)
+++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap11/SOAP11BodyImpl.java Mon Mar  6 22:59:32 2006
@@ -20,6 +20,7 @@
 import org.apache.ws.commons.om.OMXMLParserWrapper;
 import org.apache.ws.commons.soap.SOAPConstants;
 import org.apache.ws.commons.soap.SOAPEnvelope;
+import org.apache.ws.commons.soap.SOAPFactory;
 import org.apache.ws.commons.soap.SOAPFault;
 import org.apache.ws.commons.soap.SOAPProcessingException;
 import org.apache.ws.commons.soap.impl.llom.SOAPBodyImpl;
@@ -28,12 +29,14 @@
     /**
      * @param envelope
      */
-    public SOAP11BodyImpl(SOAPEnvelope envelope) throws SOAPProcessingException {
-        super(envelope);
+    public SOAP11BodyImpl(SOAPEnvelope envelope, SOAPFactory factory)
+            throws SOAPProcessingException {
+        super(envelope, factory);
     }
 
-    public SOAP11BodyImpl() throws SOAPProcessingException {
-        super(SOAPConstants.BODY_LOCAL_NAME, SOAP11Factory.getNamespace());
+    public SOAP11BodyImpl(SOAPFactory factory) throws SOAPProcessingException {
+        super(SOAPConstants.BODY_LOCAL_NAME, factory.getNamespace(),
+                factory);
     }
 
     /**
@@ -42,11 +45,12 @@
      * @param envelope
      * @param builder
      */
-    public SOAP11BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
-        super(envelope, builder);
+    public SOAP11BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder,
+            SOAPFactory factory) {
+        super(envelope, builder, factory);
     }
 
     public SOAPFault addFault(Exception e) throws OMException {
-        return new SOAP11Factory().createSOAPFault(this, e);
+        return ((SOAP11Factory)this.factory).createSOAPFault(this, e);
     }
 }