ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1339012 [2/2] - in /webservices/commons/trunk/modules/axiom: ./ modules/axiom-api/src/main/java/org/apache/axiom/om/ modules/axiom-api/src/main/java/org/apache/axiom/om/util/ modules/axiom-api/src/main/java/org/apache/axiom/soap/ modules/a...
Date Wed, 16 May 2012 05:36:07 GMT
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueImpl.java?rev=1339012&r1=1339011&r2=1339012&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueImpl.java
Wed May 16 05:36:06 2012
@@ -19,11 +19,14 @@
 
 package org.apache.axiom.soap.impl.llom;
 
+import org.apache.axiom.om.OMCloneOptions;
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFaultCode;
 import org.apache.axiom.soap.SOAPFaultValue;
 import org.apache.axiom.soap.SOAPProcessingException;
 
@@ -60,4 +63,8 @@ public abstract class SOAPFaultValueImpl
         super(parent, localName, builder,
               factory);
     }
+
+    protected OMElement createClone(OMCloneOptions options, OMContainer targetParent) {
+        return ((SOAPFactory)factory).createSOAPFaultValue((SOAPFaultCode)targetParent);
+    }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java?rev=1339012&r1=1339011&r2=1339012&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java
Wed May 16 05:36:06 2012
@@ -20,15 +20,18 @@
 package org.apache.axiom.soap.impl.llom;
 
 import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMDataSource;
 import org.apache.axiom.om.OMDataSourceExt;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMSourcedElement;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
 import org.apache.axiom.om.impl.llom.OMAttributeImpl;
 import org.apache.axiom.om.impl.llom.OMSourcedElementImpl;
+import org.apache.axiom.soap.SOAPCloneOptions;
 import org.apache.axiom.soap.SOAPConstants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPHeader;
@@ -161,4 +164,25 @@ public abstract class SOAPHeaderBlockImp
         }
         return false;
     }
+
+    protected OMElement createClone(OMCloneOptions options, OMContainer targetParent) {
+        SOAPHeaderBlock clone = ((SOAPFactory)factory).createSOAPHeaderBlock(getLocalName(),
getNamespace(), (SOAPHeader)targetParent);
+        copyData(options, clone);
+        return clone;
+    }
+
+    protected OMSourcedElement createClone(OMCloneOptions options, OMDataSource ds, String
localName, OMNamespace ns) {
+        SOAPHeaderBlock clone = ((SOAPFactory)factory).createSOAPHeaderBlock(localName, ns,
ds);
+        copyData(options, clone);
+        return clone;
+    }
+
+    private void copyData(OMCloneOptions options, SOAPHeaderBlock targetSHB) {
+        // Copy the processed flag.  The other SOAPHeaderBlock information 
+        // (e.g. role, mustUnderstand) are attributes on the tag and are copied elsewhere.
+        Boolean processedFlag = options instanceof SOAPCloneOptions ? ((SOAPCloneOptions)options).getProcessedFlag()
: null;
+        if ((processedFlag == null && isProcessed()) || (processedFlag != null &&
processedFlag.booleanValue())) {
+            targetSHB.setProcessed();
+        }
+    }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java?rev=1339012&r1=1339011&r2=1339012&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java
Wed May 16 05:36:06 2012
@@ -19,6 +19,8 @@
 
 package org.apache.axiom.soap.impl.llom;
 
+import org.apache.axiom.om.OMCloneOptions;
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMNamespace;
@@ -201,4 +203,8 @@ public abstract class SOAPHeaderImpl ext
         String text = sw.getBuffer().toString();
         return text;
     }
+
+    protected OMElement createClone(OMCloneOptions options, OMContainer targetParent) {
+        return ((SOAPFactory)factory).createSOAPHeader((SOAPEnvelope)targetParent);
+    }
 }



Mime
View raw message