axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r216290 [6/8] - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis2/transport/ core/src/org/apache/axis2/transport/http/ core/webapp/ saaj/src/org/apache/axis2/saaj/ samples/src/sample/amazon/search/ samples/src/userguide/cli...
Date Thu, 14 Jul 2005 00:30:59 GMT
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultImpl.java Wed Jul 13 17:30:55 2005
@@ -1,224 +1,224 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.axis2.soap.impl.llom;
-
-import org.apache.axis2.om.*;
-import org.apache.axis2.om.impl.llom.OMElementImpl;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.soap.*;
-import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Iterator;
-
-/**
- * Class SOAPFaultImpl
- */
-public abstract class SOAPFaultImpl extends SOAPElement
-        implements SOAPFault, OMConstants {
-
-    protected Exception e;
-
-
-    /**
-     * Constructor SOAPFaultImpl
-     *
-     * @param parent
-     * @param e
-     */
-    public SOAPFaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true);
-        setException(e);
-    }
-
-    public void setException(Exception e) {
-        this.e = e;
-        putExceptionToSOAPFault(e);
-    }
-
-    public SOAPFaultImpl(SOAPBody parent) throws SOAPProcessingException {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true);
-    }
-
-    /**
-     * Constructor SOAPFaultImpl
-     *
-     * @param parent
-     * @param builder
-     */
-    public SOAPFaultImpl(SOAPBody parent, OMXMLParserWrapper builder) {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, builder);
-    }
-
-
-    protected abstract SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException;
-
-    // --------------- Getters and Settors --------------------------- //
-
-    public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException {
-        setNewElement(getCode(), soapFaultCode);
-    }
-
-    public SOAPFaultCode getCode() {
-        return (SOAPFaultCode) this.getChildWithName(
-                SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
-    }
-
-    public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
-        setNewElement(getReason(), reason);
-    }
-
-    public SOAPFaultReason getReason() {
-        return (SOAPFaultReason) this.getChildWithName(
-                SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
-    }
-
-    public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
-        setNewElement(getNode(), node);
-    }
-
-    public SOAPFaultNode getNode() {
-        return (SOAPFaultNode) this.getChildWithName(
-                SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
-    }
-
-    public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
-        setNewElement(getRole(), role);
-    }
-
-    public SOAPFaultRole getRole() {
-        return (SOAPFaultRoleImpl) this.getChildWithName(
-                SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
-    }
-
-    public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
-        setNewElement(getDetail(), detail);
-    }
-
-    public SOAPFaultDetail getDetail() {
-        return (SOAPFaultDetail) this.getChildWithName(
-                SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
-    }
-
-
-    // ---------------------------------------------------------------------------------------------//
-
-    public Exception getException() throws OMException {
-        getDetail();
-        if (getDetail() == null) {
-            return new Exception(
-                    "No Exception element found in the SOAP Detail element");
-        }
-
-        OMElement exceptionElement = getDetail().getFirstChildWithName(
-                new QName(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY));
-        if (exceptionElement != null) {
-            return new Exception(exceptionElement.getText());
-        }
-        return new Exception(
-                "No Exception element found in the SOAP Detail element");
-    }
-
-    protected void putExceptionToSOAPFault(Exception e) throws SOAPProcessingException {
-        StringWriter sw = new StringWriter();
-        e.printStackTrace(new PrintWriter(sw));
-
-        getDetail();
-        if (getDetail() == null) {
-            setDetail(getNewSOAPFaultDetail(this));
-
-        }
-        OMElement faultDetailEnty = new OMElementImpl(
-                SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY,
-                this.getNamespace());
-        faultDetailEnty.setText(sw.getBuffer().toString());
-        getDetail().addChild(faultDetailEnty);
-    }
-
-    protected void setNewElement(OMElement myElement, OMElement newElement) {
-        if (myElement != null) {
-            myElement.discard();
-        }
-        if (newElement != null && newElement.getParent() != null) {
-            newElement.discard();
-        }
-        this.addChild(newElement);
-        myElement = newElement;
-    }
-
-    protected OMElement getChildWithName(String childName) {
-        Iterator childrenIter = getChildren();
-        while (childrenIter.hasNext()) {
-            OMNode node = (OMNode) childrenIter.next();
-            if (node.getType() == OMNode.ELEMENT_NODE &&
-                    childName.equals(((OMElement) node).getLocalName())) {
-                return (OMElement) node;
-            }
-        }
-        return null;
-    }
-
-    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
-        }
-
-
-        // this is a special case. This fault element may contain its children in any order. But spec mandates a specific order
-        // the overriding of the method will facilitate that. Not sure this is the best method to do this :(
-        build();
-
-        OMSerializerUtil.serializeStartpart(this, omOutput);
-        SOAPFaultCode faultCode = getCode();
-        if (faultCode != null) {
-            faultCode.serializeWithCache(omOutput);
-        }
-        SOAPFaultReason faultReason = getReason();
-        if (faultReason != null) {
-            faultReason.serializeWithCache(omOutput);
-        }
-
-        SOAPFaultNode faultNode = getNode();
-        if (faultNode != null) {
-            faultNode.serializeWithCache(omOutput);
-        }
-
-        SOAPFaultRole faultRole = getRole();
-        if (faultRole != null) {
-            faultRole.serializeWithCache(omOutput);
-        }
-
-
-
-        SOAPFaultDetail faultDetail = getDetail();
-        if (faultDetail != null) {
-            faultDetail.serializeWithCache(omOutput);
-        }
-
-
-    }
-
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.soap.impl.llom;
+
+import org.apache.axis2.om.*;
+import org.apache.axis2.om.impl.llom.OMElementImpl;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.*;
+import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Iterator;
+
+/**
+ * Class SOAPFaultImpl
+ */
+public abstract class SOAPFaultImpl extends SOAPElement
+        implements SOAPFault, OMConstants {
+
+    protected Exception e;
+
+
+    /**
+     * Constructor SOAPFaultImpl
+     *
+     * @param parent
+     * @param e
+     */
+    public SOAPFaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
+        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true);
+        setException(e);
+    }
+
+    public void setException(Exception e) {
+        this.e = e;
+        putExceptionToSOAPFault(e);
+    }
+
+    public SOAPFaultImpl(SOAPBody parent) throws SOAPProcessingException {
+        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true);
+    }
+
+    /**
+     * Constructor SOAPFaultImpl
+     *
+     * @param parent
+     * @param builder
+     */
+    public SOAPFaultImpl(SOAPBody parent, OMXMLParserWrapper builder) {
+        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, builder);
+    }
+
+
+    protected abstract SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException;
+
+    // --------------- Getters and Settors --------------------------- //
+
+    public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException {
+        setNewElement(getCode(), soapFaultCode);
+    }
+
+    public SOAPFaultCode getCode() {
+        return (SOAPFaultCode) this.getChildWithName(
+                SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+    }
+
+    public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
+        setNewElement(getReason(), reason);
+    }
+
+    public SOAPFaultReason getReason() {
+        return (SOAPFaultReason) this.getChildWithName(
+                SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
+    }
+
+    public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
+        setNewElement(getNode(), node);
+    }
+
+    public SOAPFaultNode getNode() {
+        return (SOAPFaultNode) this.getChildWithName(
+                SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
+    }
+
+    public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
+        setNewElement(getRole(), role);
+    }
+
+    public SOAPFaultRole getRole() {
+        return (SOAPFaultRoleImpl) this.getChildWithName(
+                SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
+    }
+
+    public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
+        setNewElement(getDetail(), detail);
+    }
+
+    public SOAPFaultDetail getDetail() {
+        return (SOAPFaultDetail) this.getChildWithName(
+                SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+    }
+
+
+    // ---------------------------------------------------------------------------------------------//
+
+    public Exception getException() throws OMException {
+        getDetail();
+        if (getDetail() == null) {
+            return new Exception(
+                    "No Exception element found in the SOAP Detail element");
+        }
+
+        OMElement exceptionElement = getDetail().getFirstChildWithName(
+                new QName(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY));
+        if (exceptionElement != null) {
+            return new Exception(exceptionElement.getText());
+        }
+        return new Exception(
+                "No Exception element found in the SOAP Detail element");
+    }
+
+    protected void putExceptionToSOAPFault(Exception e) throws SOAPProcessingException {
+        StringWriter sw = new StringWriter();
+        e.printStackTrace(new PrintWriter(sw));
+
+        getDetail();
+        if (getDetail() == null) {
+            setDetail(getNewSOAPFaultDetail(this));
+
+        }
+        OMElement faultDetailEnty = new OMElementImpl(
+                SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY,
+                this.getNamespace());
+        faultDetailEnty.setText(sw.getBuffer().toString());
+        getDetail().addChild(faultDetailEnty);
+    }
+
+    protected void setNewElement(OMElement myElement, OMElement newElement) {
+        if (myElement != null) {
+            myElement.discard();
+        }
+        if (newElement != null && newElement.getParent() != null) {
+            newElement.discard();
+        }
+        this.addChild(newElement);
+        myElement = newElement;
+    }
+
+    protected OMElement getChildWithName(String childName) {
+        Iterator childrenIter = getChildren();
+        while (childrenIter.hasNext()) {
+            OMNode node = (OMNode) childrenIter.next();
+            if (node.getType() == OMNode.ELEMENT_NODE &&
+                    childName.equals(((OMElement) node).getLocalName())) {
+                return (OMElement) node;
+            }
+        }
+        return null;
+    }
+
+    protected void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+        // select the builder
+        short builderType = PULL_TYPE_BUILDER;    // default is pull type
+        if (builder != null) {
+            builderType = this.builder.getBuilderType();
+        }
+        if ((builderType == PUSH_TYPE_BUILDER)
+                && (builder.getRegisteredContentHandler() == null)) {
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
+        }
+
+
+        // this is a special case. This fault element may contain its children in any order. But spec mandates a specific order
+        // the overriding of the method will facilitate that. Not sure this is the best method to do this :(
+        build();
+
+        OMSerializerUtil.serializeStartpart(this, omOutput);
+        SOAPFaultCode faultCode = getCode();
+        if (faultCode != null) {
+            faultCode.serializeWithCache(omOutput);
+        }
+        SOAPFaultReason faultReason = getReason();
+        if (faultReason != null) {
+            faultReason.serializeWithCache(omOutput);
+        }
+
+        SOAPFaultNode faultNode = getNode();
+        if (faultNode != null) {
+            faultNode.serializeWithCache(omOutput);
+        }
+
+        SOAPFaultRole faultRole = getRole();
+        if (faultRole != null) {
+            faultRole.serializeWithCache(omOutput);
+        }
+
+
+
+        SOAPFaultDetail faultDetail = getDetail();
+        if (faultDetail != null) {
+            faultDetail.serializeWithCache(omOutput);
+        }
+
+
+    }
+
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultNodeImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultNodeImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultNodeImpl.java Wed Jul 13 17:30:55 2005
@@ -1,92 +1,91 @@
-package org.apache.axis2.soap.impl.llom;
-
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.SOAPFaultNode;
-import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
-
-import javax.xml.stream.XMLStreamException;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * author : Eran Chinthaka (chinthaka@apache.org)
- */
-
-public abstract class SOAPFaultNodeImpl extends SOAPElement implements SOAPFaultNode {
-
-    public SOAPFaultNodeImpl(SOAPFault parent) throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true);
-    }
-
-    public SOAPFaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder);
-    }
-
-    public void setNodeValue(String uri) {
-        this.setText(uri);
-    }
-
-    public String getNodeValue() {
-        return this.getText();
-    }
-
-    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-            // select the builder
-            short builderType = PULL_TYPE_BUILDER;    // default is pull type
-            if (builder != null) {
-                builderType = this.builder.getBuilderType();
-            }
-            if ((builderType == PUSH_TYPE_BUILDER)
-                    && (builder.getRegisteredContentHandler() == null)) {
-                builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
-            }
-
-
-            if (!cache) {
-                //No caching
-                if (this.firstChild != null) {
-                    OMSerializerUtil.serializeStartpart(this, omOutput);
-                    firstChild.serialize(omOutput);
-                    OMSerializerUtil.serializeEndpart(omOutput);
-                } else if (!this.done) {
-                    if (builderType == PULL_TYPE_BUILDER) {
-                        OMSerializerUtil.serializeByPullStream(this, omOutput);
-                    } else {
-                        OMSerializerUtil.serializeStartpart(this, omOutput);
-                        builder.setCache(cache);
-                        builder.next();
-                        OMSerializerUtil.serializeEndpart(omOutput);
-                    }
-                } else {
-                    OMSerializerUtil.serializeNormal(this, omOutput, cache);
-                }
-                // do not serialise the siblings
-
-
-            } else {
-                //Cached
-                OMSerializerUtil.serializeNormal(this, omOutput, cache);
-
-                // do not serialise the siblings
-            }
-
-
-        }
-    
-}
+package org.apache.axis2.soap.impl.llom;
+
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultNode;
+import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
+
+import javax.xml.stream.XMLStreamException;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+public abstract class SOAPFaultNodeImpl extends SOAPElement implements SOAPFaultNode {
+
+    public SOAPFaultNodeImpl(SOAPFault parent) throws SOAPProcessingException {
+        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true);
+    }
+
+    public SOAPFaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder);
+    }
+
+    public void setNodeValue(String uri) {
+        this.setText(uri);
+    }
+
+    public String getNodeValue() {
+        return this.getText();
+    }
+
+    protected void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+            // select the builder
+            short builderType = PULL_TYPE_BUILDER;    // default is pull type
+            if (builder != null) {
+                builderType = this.builder.getBuilderType();
+            }
+            if ((builderType == PUSH_TYPE_BUILDER)
+                    && (builder.getRegisteredContentHandler() == null)) {
+                builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
+            }
+
+
+            if (!cache) {
+                //No caching
+                if (this.firstChild != null) {
+                    OMSerializerUtil.serializeStartpart(this, omOutput);
+                    firstChild.serialize(omOutput);
+                    OMSerializerUtil.serializeEndpart(omOutput);
+                } else if (!this.done) {
+                    if (builderType == PULL_TYPE_BUILDER) {
+                        OMSerializerUtil.serializeByPullStream(this, omOutput);
+                    } else {
+                        OMSerializerUtil.serializeStartpart(this, omOutput);
+                        builder.setCache(cache);
+                        builder.next();
+                        OMSerializerUtil.serializeEndpart(omOutput);
+                    }
+                } else {
+                    OMSerializerUtil.serializeNormal(this, omOutput, cache);
+                }
+                // do not serialise the siblings
+
+
+            } else {
+                //Cached
+                OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+                // do not serialise the siblings
+            }
+
+
+        }
+    
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultReasonImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultReasonImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultReasonImpl.java Wed Jul 13 17:30:55 2005
@@ -1,110 +1,109 @@
-package org.apache.axis2.soap.impl.llom;
-
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.SOAPFaultReason;
-import org.apache.axis2.soap.SOAPFaultText;
-import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
-import org.apache.axis2.soap.impl.llom.util.UtilProvider;
-
-import javax.xml.stream.XMLStreamException;
-
-/**
- * Copyright 2001-2004 The Apache Software Foundation.
- * <p/>
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * <p/>
- */
-public abstract class SOAPFaultReasonImpl extends SOAPElement implements SOAPFaultReason {
-    protected SOAPFaultText text;
-
-    /**
-     * Constructor OMElementImpl
-     *
-     * @param parent
-     * @param builder
-     */
-    public SOAPFaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, builder);
-    }
-
-    /**
-     * @param parent
-     */
-    public SOAPFaultReasonImpl(OMElement parent,
-                               boolean extractNamespaceFromParent) throws SOAPProcessingException {
-        super(parent,
-                SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME,
-                extractNamespaceFromParent);
-    }
-
-    /**
-     * Eran Chinthaka (chinthaka@apache.org)
-     */
-    public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException {
-        UtilProvider.setNewElement(this, text, soapFaultText);
-    }
-
-    public SOAPFaultText getSOAPText() {
-        return (SOAPFaultText) UtilProvider.getChildWithName(this,
-                SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME);
-    }
-
-    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
-        }
-
-
-        if (!cache) {
-            //No caching
-            if (this.firstChild != null) {
-                OMSerializerUtil.serializeStartpart(this, omOutput);
-                firstChild.serialize(omOutput);
-                OMSerializerUtil.serializeEndpart(omOutput);
-            } else if (!this.done) {
-                if (builderType == PULL_TYPE_BUILDER) {
-                    OMSerializerUtil.serializeByPullStream(this, omOutput);
-                } else {
-                    OMSerializerUtil.serializeStartpart(this, omOutput);
-                    builder.setCache(cache);
-                    builder.next();
-                    OMSerializerUtil.serializeEndpart(omOutput);
-                }
-            } else {
-                OMSerializerUtil.serializeNormal(this, omOutput, cache);
-            }
-            // do not serialise the siblings
-
-
-        } else {
-            //Cached
-            OMSerializerUtil.serializeNormal(this, omOutput, cache);
-
-            // do not serialise the siblings
-        }
-
-
-    }
-
-}
+package org.apache.axis2.soap.impl.llom;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultReason;
+import org.apache.axis2.soap.SOAPFaultText;
+import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
+import org.apache.axis2.soap.impl.llom.util.UtilProvider;
+
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ * <p/>
+ */
+public abstract class SOAPFaultReasonImpl extends SOAPElement implements SOAPFaultReason {
+    protected SOAPFaultText text;
+
+    /**
+     * Constructor OMElementImpl
+     *
+     * @param parent
+     * @param builder
+     */
+    public SOAPFaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+        super(parent, SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, builder);
+    }
+
+    /**
+     * @param parent
+     */
+    public SOAPFaultReasonImpl(OMElement parent,
+                               boolean extractNamespaceFromParent) throws SOAPProcessingException {
+        super(parent,
+                SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME,
+                extractNamespaceFromParent);
+    }
+
+    /**
+     * Eran Chinthaka (chinthaka@apache.org)
+     */
+    public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException {
+        UtilProvider.setNewElement(this, text, soapFaultText);
+    }
+
+    public SOAPFaultText getSOAPText() {
+        return (SOAPFaultText) UtilProvider.getChildWithName(this,
+                SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME);
+    }
+
+    protected void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+        // select the builder
+        short builderType = PULL_TYPE_BUILDER;    // default is pull type
+        if (builder != null) {
+            builderType = this.builder.getBuilderType();
+        }
+        if ((builderType == PUSH_TYPE_BUILDER)
+                && (builder.getRegisteredContentHandler() == null)) {
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
+        }
+
+
+        if (!cache) {
+            //No caching
+            if (this.firstChild != null) {
+                OMSerializerUtil.serializeStartpart(this, omOutput);
+                firstChild.serialize(omOutput);
+                OMSerializerUtil.serializeEndpart(omOutput);
+            } else if (!this.done) {
+                if (builderType == PULL_TYPE_BUILDER) {
+                    OMSerializerUtil.serializeByPullStream(this, omOutput);
+                } else {
+                    OMSerializerUtil.serializeStartpart(this, omOutput);
+                    builder.setCache(cache);
+                    builder.next();
+                    OMSerializerUtil.serializeEndpart(omOutput);
+                }
+            } else {
+                OMSerializerUtil.serializeNormal(this, omOutput, cache);
+            }
+            // do not serialise the siblings
+
+
+        } else {
+            //Cached
+            OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+            // do not serialise the siblings
+        }
+
+
+    }
+
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultRoleImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultRoleImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPFaultRoleImpl.java Wed Jul 13 17:30:55 2005
@@ -1,94 +1,94 @@
-package org.apache.axis2.soap.impl.llom;
-
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
-
-import javax.xml.stream.XMLStreamException;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * author : Eran Chinthaka (chinthaka@apache.org)
- */
-
-public abstract class SOAPFaultRoleImpl extends SOAPElement implements org.apache.axis2.soap.SOAPFaultRole {
-
-    public SOAPFaultRoleImpl(SOAPFault parent,
-                             boolean extractNamespaceFromParent) throws SOAPProcessingException {
-        super(parent,
-                SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME,
-                extractNamespaceFromParent);
-    }
-
-    public SOAPFaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, builder);
-    }
-
-    public void setRoleValue(String uri) {
-        this.setText(uri);
-    }
-
-    public String getRoleValue() {
-        return this.getText();
-    }
-
-    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
-        }
-
-
-        if (!cache) {
-            //No caching
-            if (this.firstChild != null) {
-                OMSerializerUtil.serializeStartpart(this, omOutput);
-                firstChild.serialize(omOutput);
-                OMSerializerUtil.serializeEndpart(omOutput);
-            } else if (!this.done) {
-                if (builderType == PULL_TYPE_BUILDER) {
-                    OMSerializerUtil.serializeByPullStream(this, omOutput);
-                } else {
-                    OMSerializerUtil.serializeStartpart(this, omOutput);
-                    builder.setCache(cache);
-                    builder.next();
-                    OMSerializerUtil.serializeEndpart(omOutput);
-                }
-            } else {
-                OMSerializerUtil.serializeNormal(this, omOutput, cache);
-            }
-            // do not serialise the siblings
-
-
-        } else {
-            //Cached
-            OMSerializerUtil.serializeNormal(this, omOutput, cache);
-
-            // do not serialise the siblings
-        }
-
-
-    }
-
-}
+package org.apache.axis2.soap.impl.llom;
+
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.OMOutputImpl;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
+
+import javax.xml.stream.XMLStreamException;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+public abstract class SOAPFaultRoleImpl extends SOAPElement implements org.apache.axis2.soap.SOAPFaultRole {
+
+    public SOAPFaultRoleImpl(SOAPFault parent,
+                             boolean extractNamespaceFromParent) throws SOAPProcessingException {
+        super(parent,
+                SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME,
+                extractNamespaceFromParent);
+    }
+
+    public SOAPFaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+        super(parent, SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, builder);
+    }
+
+    public void setRoleValue(String uri) {
+        this.setText(uri);
+    }
+
+    public String getRoleValue() {
+        return this.getText();
+    }
+
+    protected void serialize(OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+        // select the builder
+        short builderType = PULL_TYPE_BUILDER;    // default is pull type
+        if (builder != null) {
+            builderType = this.builder.getBuilderType();
+        }
+        if ((builderType == PUSH_TYPE_BUILDER)
+                && (builder.getRegisteredContentHandler() == null)) {
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
+        }
+
+
+        if (!cache) {
+            //No caching
+            if (this.firstChild != null) {
+                OMSerializerUtil.serializeStartpart(this, omOutput);
+                firstChild.serialize(omOutput);
+                OMSerializerUtil.serializeEndpart(omOutput);
+            } else if (!this.done) {
+                if (builderType == PULL_TYPE_BUILDER) {
+                    OMSerializerUtil.serializeByPullStream(this, omOutput);
+                } else {
+                    OMSerializerUtil.serializeStartpart(this, omOutput);
+                    builder.setCache(cache);
+                    builder.next();
+                    OMSerializerUtil.serializeEndpart(omOutput);
+                }
+            } else {
+                OMSerializerUtil.serializeNormal(this, omOutput, cache);
+            }
+            // do not serialise the siblings
+
+
+        } else {
+            //Cached
+            OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+            // do not serialise the siblings
+        }
+
+
+    }
+
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java Wed Jul 13 17:30:55 2005
@@ -1,125 +1,124 @@
-package org.apache.axis2.soap.impl.llom.soap11;
-
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.SOAPFaultSubCode;
-import org.apache.axis2.soap.SOAPFaultValue;
-import org.apache.axis2.soap.impl.llom.SOAPFaultCodeImpl;
-import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * author : Eran Chinthaka (chinthaka@apache.org)
- */
-
-public class SOAP11FaultCodeImpl extends SOAPFaultCodeImpl {
-    /**
-     * Constructor OMElementImpl
-     *
-     * @param localName
-     * @param ns
-     * @param parent
-     * @param builder
-     */
-    public SOAP11FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, builder);
-    }
-
-    /**
-     * @param parent
-     * @param parent
-     */
-    public SOAP11FaultCodeImpl(SOAPFault parent) throws SOAPProcessingException {
-        super(parent, false);
-    }
-
-
-    public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
-        if (!(subCode instanceof SOAP11FaultSubCodeImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Sub Code. But received some other implementation");
-        }
-        super.setSubCode(subCode);
-    }
-
-    public void setValue(SOAPFaultValue value) throws SOAPProcessingException {
-        if (!(value instanceof SOAP11FaultValueImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Value. But received some other implementation");
-        }
-        super.setValue(value);
-    }
-
-    protected void checkParent(OMElement parent) throws SOAPProcessingException {
-        if (!(parent instanceof SOAP11FaultImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
-        }
-    }
-
-    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(omOutput));
-        }
-
-        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
-        if (this.getNamespace() != null) {
-            String prefix = this.getNamespace().getPrefix();
-            String nameSpaceName = this.getNamespace().getName();
-            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
-                    nameSpaceName);
-        } else {
-            writer.writeStartElement(
-                    SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
-        }
-
-        OMSerializerUtil.serializeAttributes(this, omOutput);
-        OMSerializerUtil.serializeNamespaces(this, omOutput);
-
-
-        String text = this.getValue().getText();
-        writer.writeCharacters(text);
-        writer.writeEndElement();
-
-        //serilize siblings
-        if (this.nextSibling != null) {
-            nextSibling.serialize(omOutput);
-        } else if (this.parent != null) {
-            if (!this.parent.isComplete()) {
-                builder.setCache(cache);
-                builder.next();
-            }
-        }
-
-    }
-
-
-}
+package org.apache.axis2.soap.impl.llom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultSubCode;
+import org.apache.axis2.soap.SOAPFaultValue;
+import org.apache.axis2.soap.impl.llom.SOAPFaultCodeImpl;
+import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+public class SOAP11FaultCodeImpl extends SOAPFaultCodeImpl {
+    /**
+     * Constructor OMElementImpl
+     *
+     * @param localName
+     * @param ns
+     * @param parent
+     * @param builder
+     */
+    public SOAP11FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+        super(parent, builder);
+    }
+
+    /**
+     * @param parent
+     * @param parent
+     */
+    public SOAP11FaultCodeImpl(SOAPFault parent) throws SOAPProcessingException {
+        super(parent, false);
+    }
+
+
+    public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
+        if (!(subCode instanceof SOAP11FaultSubCodeImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Sub Code. But received some other implementation");
+        }
+        super.setSubCode(subCode);
+    }
+
+    public void setValue(SOAPFaultValue value) throws SOAPProcessingException {
+        if (!(value instanceof SOAP11FaultValueImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Value. But received some other implementation");
+        }
+        super.setValue(value);
+    }
+
+    protected void checkParent(OMElement parent) throws SOAPProcessingException {
+        if (!(parent instanceof SOAP11FaultImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+        }
+    }
+
+    protected void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+        // select the builder
+        short builderType = PULL_TYPE_BUILDER;    // default is pull type
+        if (builder != null) {
+            builderType = this.builder.getBuilderType();
+        }
+        if ((builderType == PUSH_TYPE_BUILDER)
+                && (builder.getRegisteredContentHandler() == null)) {
+            builder.registerExternalContentHandler(
+                    new StreamWriterToContentHandlerConverter(omOutput));
+        }
+
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+        if (this.getNamespace() != null) {
+            String prefix = this.getNamespace().getPrefix();
+            String nameSpaceName = this.getNamespace().getName();
+            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
+                    nameSpaceName);
+        } else {
+            writer.writeStartElement(
+                    SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+        }
+
+        OMSerializerUtil.serializeAttributes(this, omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+
+        String text = this.getValue().getText();
+        writer.writeCharacters(text);
+        writer.writeEndElement();
+
+        //serilize siblings
+        if (this.nextSibling != null) {
+            nextSibling.serialize(omOutput);
+        } else if (this.parent != null) {
+            if (!this.parent.isComplete()) {
+                builder.setCache(cache);
+                builder.next();
+            }
+        }
+
+    }
+
+
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java Wed Jul 13 17:30:55 2005
@@ -1,100 +1,99 @@
-package org.apache.axis2.soap.impl.llom.soap11;
-
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.impl.llom.SOAPFaultDetailImpl;
-import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * author : Eran Chinthaka (chinthaka@apache.org)
- */
-
-public class SOAP11FaultDetailImpl extends SOAPFaultDetailImpl {
-    public SOAP11FaultDetailImpl(SOAPFault parent) throws SOAPProcessingException {
-        super(parent, false);
-    }
-
-    public SOAP11FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, builder);
-    }
-
-    protected void checkParent(OMElement parent) throws SOAPProcessingException {
-        if (!(parent instanceof SOAP11FaultImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
-        }
-    }
-
-//    public void addDetailEntry(OMElement detailElement) {
-//        throw new UnsupportedOperationException();
-//    }
-//
-//    public Iterator getAllDetailEntries() {
-//        throw new UnsupportedOperationException();
-//    }
-
-    public void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(omOutput));
-        }
-        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
-        if (this.getNamespace() != null) {
-            String prefix = this.getNamespace().getPrefix();
-            String nameSpaceName = this.getNamespace().getName();
-            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME,
-                    nameSpaceName);
-        } else {
-            writer.writeStartElement(
-                    SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
-        }
-        OMSerializerUtil.serializeAttributes(this, omOutput);
-        OMSerializerUtil.serializeNamespaces(this, omOutput);
-
-
-        String text = this.getText();
-        writer.writeCharacters(text);
-
-
-        if (firstChild != null) {
-            firstChild.serialize(omOutput);
-        }
-        writer.writeEndElement();
-
-        //serilize siblings
-        if (this.nextSibling != null) {
-            nextSibling.serialize(omOutput);
-        }
-
-    }
-
-
-}
+package org.apache.axis2.soap.impl.llom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.impl.llom.SOAPFaultDetailImpl;
+import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+public class SOAP11FaultDetailImpl extends SOAPFaultDetailImpl {
+    public SOAP11FaultDetailImpl(SOAPFault parent) throws SOAPProcessingException {
+        super(parent, false);
+    }
+
+    public SOAP11FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+        super(parent, builder);
+    }
+
+    protected void checkParent(OMElement parent) throws SOAPProcessingException {
+        if (!(parent instanceof SOAP11FaultImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+        }
+    }
+
+//    public void addDetailEntry(OMElement detailElement) {
+//        throw new UnsupportedOperationException();
+//    }
+//
+//    public Iterator getAllDetailEntries() {
+//        throw new UnsupportedOperationException();
+//    }
+
+    public void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+        // select the builder
+        short builderType = PULL_TYPE_BUILDER;    // default is pull type
+        if (builder != null) {
+            builderType = this.builder.getBuilderType();
+        }
+        if ((builderType == PUSH_TYPE_BUILDER)
+                && (builder.getRegisteredContentHandler() == null)) {
+            builder.registerExternalContentHandler(
+                    new StreamWriterToContentHandlerConverter(omOutput));
+        }
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+        if (this.getNamespace() != null) {
+            String prefix = this.getNamespace().getPrefix();
+            String nameSpaceName = this.getNamespace().getName();
+            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME,
+                    nameSpaceName);
+        } else {
+            writer.writeStartElement(
+                    SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+        }
+        OMSerializerUtil.serializeAttributes(this, omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+
+        String text = this.getText();
+        writer.writeCharacters(text);
+
+
+        if (firstChild != null) {
+            firstChild.serialize(omOutput);
+        }
+        writer.writeEndElement();
+
+        //serilize siblings
+        if (this.nextSibling != null) {
+            nextSibling.serialize(omOutput);
+        }
+
+    }
+
+
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultImpl.java Wed Jul 13 17:30:55 2005
@@ -1,118 +1,117 @@
-package org.apache.axis2.soap.impl.llom.soap11;
-
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.soap.SOAPBody;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.SOAPFaultCode;
-import org.apache.axis2.soap.SOAPFaultDetail;
-import org.apache.axis2.soap.SOAPFaultNode;
-import org.apache.axis2.soap.SOAPFaultReason;
-import org.apache.axis2.soap.SOAPFaultRole;
-import org.apache.axis2.soap.impl.llom.SOAPFaultImpl;
-import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
-
-import javax.xml.stream.XMLStreamException;
-
-
-/**
- * Copyright 2001-2004 The Apache Software Foundation.
- * <p/>
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * <p/>
- */
-public class SOAP11FaultImpl extends SOAPFaultImpl {
-    /**
-     * Eran Chinthaka (chinthaka@apache.org)
-     */
-
-    public SOAP11FaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
-        super(parent, e);
-    }
-
-    public SOAP11FaultImpl(SOAPBody parent, OMXMLParserWrapper builder) {
-        super(parent, builder);
-    }
-
-    /**
-     * This is a convenience method for the SOAP Fault Impl.
-     *
-     * @param parent
-     * @param e
-     */
-    public SOAP11FaultImpl(SOAPBody parent) throws SOAPProcessingException {
-        super(parent);
-
-    }
-
-    protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException {
-        return new SOAP11FaultDetailImpl(fault);
-    }
-
-    public void serializeWithCache(OMOutput omOutput) throws XMLStreamException {
-        super.serializeWithCache(omOutput);
-    }
-
-    public void serialize(OMOutput omOutput) throws XMLStreamException {
-        super.serialize(omOutput);
-    }
-
-    public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException {
-        if (!(soapFaultCode instanceof SOAP11FaultCodeImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Code. But received some other implementation");
-        }
-        super.setCode(soapFaultCode);
-    }
-
-    public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
-        if (!(reason instanceof SOAP11FaultReasonImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Reason. But received some other implementation");
-        }
-        super.setReason(reason);
-    }
-//
-    public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
-        if (!(node instanceof SOAP11FaultNodeImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Node. But received some other implementation");
-        }
-        super.setNode(node);
-    }
-
-    public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
-        if (!(role instanceof SOAP11FaultRoleImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Role. But received some other implementation");
-        }
-        super.setRole(role);
-    }
-
-    protected void checkParent(OMElement parent) throws SOAPProcessingException {
-        if (!(parent instanceof SOAP11BodyImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Body as the parent. But received some other implementation");
-        }
-    }
-
-    public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
-        if (!(detail instanceof SOAP11FaultDetailImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Detail. But received some other implementation");
-        }
-        super.setDetail(detail);
-    }
-
-}
+package org.apache.axis2.soap.impl.llom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultDetail;
+import org.apache.axis2.soap.SOAPFaultNode;
+import org.apache.axis2.soap.SOAPFaultReason;
+import org.apache.axis2.soap.SOAPFaultRole;
+import org.apache.axis2.soap.impl.llom.SOAPFaultImpl;
+import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ * <p/>
+ */
+public class SOAP11FaultImpl extends SOAPFaultImpl {
+    /**
+     * Eran Chinthaka (chinthaka@apache.org)
+     */
+
+    public SOAP11FaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
+        super(parent, e);
+    }
+
+    public SOAP11FaultImpl(SOAPBody parent, OMXMLParserWrapper builder) {
+        super(parent, builder);
+    }
+
+    /**
+     * This is a convenience method for the SOAP Fault Impl.
+     *
+     * @param parent
+     * @param e
+     */
+    public SOAP11FaultImpl(SOAPBody parent) throws SOAPProcessingException {
+        super(parent);
+
+    }
+
+    protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException {
+        return new SOAP11FaultDetailImpl(fault);
+    }
+
+    public void serializeWithCache(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
+        super.serializeWithCache(omOutput);
+    }
+
+    public void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
+        super.serialize(omOutput);
+    }
+
+    public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException {
+        if (!(soapFaultCode instanceof SOAP11FaultCodeImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Code. But received some other implementation");
+        }
+        super.setCode(soapFaultCode);
+    }
+
+    public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
+        if (!(reason instanceof SOAP11FaultReasonImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Reason. But received some other implementation");
+        }
+        super.setReason(reason);
+    }
+//
+    public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
+        if (!(node instanceof SOAP11FaultNodeImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Node. But received some other implementation");
+        }
+        super.setNode(node);
+    }
+
+    public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
+        if (!(role instanceof SOAP11FaultRoleImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Role. But received some other implementation");
+        }
+        super.setRole(role);
+    }
+
+    protected void checkParent(OMElement parent) throws SOAPProcessingException {
+        if (!(parent instanceof SOAP11BodyImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Body as the parent. But received some other implementation");
+        }
+    }
+
+    public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
+        if (!(detail instanceof SOAP11FaultDetailImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Detail. But received some other implementation");
+        }
+        super.setDetail(detail);
+    }
+
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java Wed Jul 13 17:30:55 2005
@@ -1,106 +1,106 @@
-package org.apache.axis2.soap.impl.llom.soap11;
-
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.SOAPFaultText;
-import org.apache.axis2.soap.impl.llom.SOAPFaultReasonImpl;
-import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * Copyright 2001-2004 The Apache Software Foundation.
- * <p/>
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- * <p/>
- */
-public class SOAP11FaultReasonImpl extends SOAPFaultReasonImpl {
-    /**
-     * Eran Chinthaka (chinthaka@apache.org)
-     */
-
-    public SOAP11FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, builder);
-    }
-
-    /**
-     * @param parent
-     */
-    public SOAP11FaultReasonImpl(SOAPFault parent) throws SOAPProcessingException {
-        super(parent, false);
-    }
-
-    public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException {
-        if (!(soapFaultText instanceof SOAP11FaultTextImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault Text. But received some other implementation");
-        }
-        super.setSOAPText(soapFaultText);
-    }
-
-    protected void checkParent(OMElement parent) throws SOAPProcessingException {
-        if (!(parent instanceof SOAP11FaultImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
-        }
-    }
-
-    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(omOutput));
-        }
-
-        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
-        if (this.getNamespace() != null) {
-            String prefix = this.getNamespace().getPrefix();
-            String nameSpaceName = this.getNamespace().getName();
-            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME,
-                    nameSpaceName);
-        } else {
-            writer.writeStartElement(
-                    SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME);
-        }
-        OMSerializerUtil.serializeAttributes(this, omOutput);
-        OMSerializerUtil.serializeNamespaces(this, omOutput);
-
-        String text = this.getSOAPText().getText();
-        writer.writeCharacters(text);
-        writer.writeEndElement();
-
-        //serilize siblings
-        if (this.nextSibling != null) {
-            nextSibling.serialize(omOutput);
-        } else if (this.parent != null) {
-            if (!this.parent.isComplete()) {
-                builder.setCache(cache);
-                builder.next();
-            }
-        }
-
-    }
-
-
-}
+package org.apache.axis2.soap.impl.llom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.impl.OMOutputImpl;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultText;
+import org.apache.axis2.soap.impl.llom.SOAPFaultReasonImpl;
+import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ * <p/>
+ */
+public class SOAP11FaultReasonImpl extends SOAPFaultReasonImpl {
+    /**
+     * Eran Chinthaka (chinthaka@apache.org)
+     */
+
+    public SOAP11FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+        super(parent, builder);
+    }
+
+    /**
+     * @param parent
+     */
+    public SOAP11FaultReasonImpl(SOAPFault parent) throws SOAPProcessingException {
+        super(parent, false);
+    }
+
+    public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException {
+        if (!(soapFaultText instanceof SOAP11FaultTextImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault Text. But received some other implementation");
+        }
+        super.setSOAPText(soapFaultText);
+    }
+
+    protected void checkParent(OMElement parent) throws SOAPProcessingException {
+        if (!(parent instanceof SOAP11FaultImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+        }
+    }
+
+    protected void serialize(OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+        // select the builder
+        short builderType = PULL_TYPE_BUILDER;    // default is pull type
+        if (builder != null) {
+            builderType = this.builder.getBuilderType();
+        }
+        if ((builderType == PUSH_TYPE_BUILDER)
+                && (builder.getRegisteredContentHandler() == null)) {
+            builder.registerExternalContentHandler(
+                    new StreamWriterToContentHandlerConverter(omOutput));
+        }
+
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+        if (this.getNamespace() != null) {
+            String prefix = this.getNamespace().getPrefix();
+            String nameSpaceName = this.getNamespace().getName();
+            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME,
+                    nameSpaceName);
+        } else {
+            writer.writeStartElement(
+                    SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME);
+        }
+        OMSerializerUtil.serializeAttributes(this, omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+        String text = this.getSOAPText().getText();
+        writer.writeCharacters(text);
+        writer.writeEndElement();
+
+        //serilize siblings
+        if (this.nextSibling != null) {
+            nextSibling.serialize(omOutput);
+        } else if (this.parent != null) {
+            if (!this.parent.isComplete()) {
+                builder.setCache(cache);
+                builder.next();
+            }
+        }
+
+    }
+
+
+}

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java Wed Jul 13 17:30:55 2005
@@ -1,92 +1,91 @@
-package org.apache.axis2.soap.impl.llom.soap11;
-
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMOutput;
-import org.apache.axis2.om.OMXMLParserWrapper;
-import org.apache.axis2.om.impl.llom.OMSerializerUtil;
-import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis2.soap.SOAPFault;
-import org.apache.axis2.soap.impl.llom.SOAPFaultRoleImpl;
-import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * author : Eran Chinthaka (chinthaka@apache.org)
- */
-
-public class SOAP11FaultRoleImpl extends SOAPFaultRoleImpl {
-    public SOAP11FaultRoleImpl(SOAPFault parent) throws SOAPProcessingException {
-        super(parent, false);
-    }
-
-    public SOAP11FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder) {
-        super(parent, builder);
-    }
-
-    protected void checkParent(OMElement parent) throws SOAPProcessingException {
-        if (!(parent instanceof SOAP11FaultImpl)) {
-            throw new SOAPProcessingException(
-                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
-        }
-    }
-
-    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
-
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(omOutput));
-        }
-
-        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
-        if (this.getNamespace() != null) {
-            String prefix = this.getNamespace().getPrefix();
-            String nameSpaceName = this.getNamespace().getName();
-            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME,
-                    nameSpaceName);
-        } else {
-            writer.writeStartElement(
-                    SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME);
-        }
-        OMSerializerUtil.serializeAttributes(this, omOutput);
-        OMSerializerUtil.serializeNamespaces(this, omOutput);
-
-        String text = this.getText();
-        writer.writeCharacters(text);
-        writer.writeEndElement();
-
-        //serilize siblings
-        if (this.nextSibling != null) {
-            nextSibling.serialize(omOutput);
-        } else if (this.parent != null) {
-            if (!this.parent.isComplete()) {
-                builder.setCache(cache);
-                builder.next();
-            }
-        }
-
-    }
-
-
-}
+package org.apache.axis2.soap.impl.llom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.impl.llom.SOAPFaultRoleImpl;
+import org.apache.axis2.soap.impl.llom.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+public class SOAP11FaultRoleImpl extends SOAPFaultRoleImpl {
+    public SOAP11FaultRoleImpl(SOAPFault parent) throws SOAPProcessingException {
+        super(parent, false);
+    }
+
+    public SOAP11FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+        super(parent, builder);
+    }
+
+    protected void checkParent(OMElement parent) throws SOAPProcessingException {
+        if (!(parent instanceof SOAP11FaultImpl)) {
+            throw new SOAPProcessingException(
+                    "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+        }
+    }
+
+    protected void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+        // select the builder
+        short builderType = PULL_TYPE_BUILDER;    // default is pull type
+        if (builder != null) {
+            builderType = this.builder.getBuilderType();
+        }
+        if ((builderType == PUSH_TYPE_BUILDER)
+                && (builder.getRegisteredContentHandler() == null)) {
+            builder.registerExternalContentHandler(
+                    new StreamWriterToContentHandlerConverter(omOutput));
+        }
+
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+        if (this.getNamespace() != null) {
+            String prefix = this.getNamespace().getPrefix();
+            String nameSpaceName = this.getNamespace().getName();
+            writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME,
+                    nameSpaceName);
+        } else {
+            writer.writeStartElement(
+                    SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME);
+        }
+        OMSerializerUtil.serializeAttributes(this, omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+        String text = this.getText();
+        writer.writeCharacters(text);
+        writer.writeEndElement();
+
+        //serilize siblings
+        if (this.nextSibling != null) {
+            nextSibling.serialize(omOutput);
+        } else if (this.parent != null) {
+            if (!this.parent.isComplete()) {
+                builder.setCache(cache);
+                builder.next();
+            }
+        }
+
+    }
+
+
+}



Mime
View raw message