Author: chinthaka
Date: Tue Jul 18 03:05:32 2006
New Revision: 423035

URL: http://svn.apache.org/viewvc?rev=423035&view=rev
Log:
trying to detach a SOAPEnvelope was throwing an exception, which IMO is wrong. 
Fixing that.

Modified:
    
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java
    
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/SOAPConstants.java
    
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java
    
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java

Modified: 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java?rev=423035&r1=423034&r2=423035&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java
 Tue Jul 18 03:05:32 2006
@@ -22,10 +22,10 @@
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.util.StAXUtils;
+import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
 import org.apache.axiom.om.impl.OMContainerEx;
 import org.apache.axiom.om.impl.OMNodeEx;
-import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
+import org.apache.axiom.om.util.StAXUtils;
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
@@ -317,7 +317,6 @@
      * @param xmlWriter
      * @throws javax.xml.stream.XMLStreamException
      *
-     * @see 
#internalSerializeAndConsume(org.apache.axiom.om.impl.MTOMXMLStreamWriter)
      */
     public void serializeAndConsume(XMLStreamWriter xmlWriter) throws 
XMLStreamException {
         MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(xmlWriter);
@@ -330,7 +329,6 @@
      *
      * @param writer
      * @throws XMLStreamException
-     * @see #internalSerialize(org.apache.axiom.om.impl.MTOMXMLStreamWriter)
      */
     public void internalSerialize(XMLStreamWriter writer) throws 
XMLStreamException {
         throw new RuntimeException("Not implemented yet!");
@@ -341,7 +339,6 @@
      *
      * @param writer
      * @throws XMLStreamException
-     * @see 
#internalSerializeAndConsume(org.apache.axiom.om.impl.MTOMXMLStreamWriter)
      */
     public void internalSerializeAndConsume(XMLStreamWriter writer) throws 
XMLStreamException {
         throw new RuntimeException("Not implemented yet!");

Modified: 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/SOAPConstants.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/SOAPConstants.java?rev=423035&r1=423034&r2=423035&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/SOAPConstants.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/SOAPConstants.java
 Tue Jul 18 03:05:32 2006
@@ -65,12 +65,6 @@
      */
     public static final String SOAPFAULT_DETAIL_LOCAL_NAME = "detail";
 
-    /**
-     * Field SOAPFAULT_NAMESPACE_PREFIX
-     */
-    public static final String SOAPFAULT_NAMESPACE_PREFIX =
-            SOAP_DEFAULT_NAMESPACE_PREFIX;
-
     public static final String SOAP_FAULT_DETAIL_EXCEPTION_ENTRY = "Exception";
 
     // -------- SOAP Fault Codes ------------------------------

Modified: 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java?rev=423035&r1=423034&r2=423035&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java
 Tue Jul 18 03:05:32 2006
@@ -152,7 +152,13 @@
      * @throws OMException
      */
     public OMNode detach() throws OMException {
-        throw new OMException("Root Element can not be detached");
+//        throw new OMException("Root Element can not be detached");
+        // I'm confused why this threw an exception as above. One should be 
able to create
+        // a SOAP envelope and be able to detach from the its parent document.
+        // The example is if I want to send a SOAPEnvelope inside another SOAP 
message, then this will
+        // not allow to do that.
+        // Must be an idea of a DOM guy ;)
+        return this;
     }
 
     protected void checkParent(OMElement parent) throws 
SOAPProcessingException {

Modified: 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java?rev=423035&r1=423034&r2=423035&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
 Tue Jul 18 03:05:32 2006
@@ -20,8 +20,8 @@
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.llom.OMNodeImpl;
-import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import 
org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
@@ -79,10 +79,6 @@
         }
         OMSerializerUtil.serializeAttributes(this, writer);
         OMSerializerUtil.serializeNamespaces(this, writer);
-
-
-        String text = this.getText();
-        writer.writeCharacters(text);
 
         OMNode child = (OMNodeImpl) firstChild;
         while (child != null && ((!(child instanceof OMElement)) || 
child.isComplete())) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to