You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ad...@apache.org on 2006/02/28 17:05:47 UTC

svn commit: r381686 [32/40] - in /incubator/ode/scratch/bpe: ./ bpelTests/ bpelTests/probeService/ bpelTests/test1/ bpelTests/test10/ bpelTests/test12/ bpelTests/test13/ bpelTests/test14/ bpelTests/test15/ bpelTests/test16/ bpelTests/test17/ bpelTests/...

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/instance/service/persistent/RegistrationUtil.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/instance/service/persistent/RegistrationUtil.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/instance/service/persistent/RegistrationUtil.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/instance/service/persistent/RegistrationUtil.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,79 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+
+package com.sybase.bpe.instance.service.persistent;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.ejb.FinderException;
+import javax.naming.InitialContext;
+
+import com.sybase.bpe.correlation.managed.RegistrationEntityLocal;
+import com.sybase.bpe.correlation.managed.RegistrationEntityLocalHome;
+import com.sybase.bpe.correlation.managed.CorrelationServiceEjbImpl;
+
+
+public class RegistrationUtil
+{
+    private RegistrationEntityLocalHome relh;
+    
+    public RegistrationUtil()
+    {
+        try
+        {
+	        InitialContext ic = new InitialContext();
+	        relh = (RegistrationEntityLocalHome) ic.lookup(
+		    CorrelationServiceEjbImpl.JNDI_RELH_NAME);
+        }
+        catch ( Exception e )
+        {
+            throw new RuntimeException(e);
+        }
+    }
+    
+    public Collection getRegisteredRootInstanceIDs(String definitionID)
+    {
+        Set returnCollection = new HashSet();
+        try
+        {
+            
+            RegistrationEntityLocal bean;
+            
+            Collection beans = relh.findByRootDefId(definitionID);
+            Iterator iter = beans.iterator();
+            while( iter.hasNext() )
+            {
+                bean = ( RegistrationEntityLocal )( iter.next());
+                returnCollection.add( bean.getRootProcId());   
+            }
+                  
+        } catch (FinderException e)
+        {
+            
+        }
+        
+        return returnCollection;
+    }
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/AmbiguousNodeException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/AmbiguousNodeException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/AmbiguousNodeException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/AmbiguousNodeException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,32 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public class AmbiguousNodeException 
+  extends InteractionException
+{
+	
+	static final long serialVersionUID = -1409491860380784018L;
+	
+	public AmbiguousNodeException(Object[] obj) {
+		super("AMBIGUOUS_NODE",obj);
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInteraction.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInteraction.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInteraction.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInteraction.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,88 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import com.sybase.bpe.context.IAccessControl;
+import com.sybase.bpe.context.ICloneable;
+
+public abstract class BaseInteraction implements IInteraction, IAccessControl, ICloneable
+{
+
+	public BaseInteraction()
+	{
+		super();
+	}
+	public Object invoke(IInvocation iInvocation, Object iInput) 
+	  throws InteractionException
+	{	  
+			if( iInvocation == null)
+			{
+				throw new NullInvocationException();
+			}
+			try
+			{
+				if ( iInvocation.isMutator() )	
+				{
+					setDirty(true);		
+				}
+				Object resultObject = iInvocation.execute(this, iInput);				
+				return resultObject;
+			}
+			catch( InteractionException ie )
+			{
+				 throw ie;
+			}
+			catch (Exception e)
+			{
+				InteractionException bpx = new InteractionException("NATIVE_EXCEPTION",new Object[] {"Exception"},e);
+				throw bpx;
+			}
+	}
+	public boolean getReadOnly()
+	{
+		return m_isReadOnly;
+	}
+	
+	public void setReadOnly( boolean isReadOnly )
+	{
+		m_isReadOnly = isReadOnly;		
+	}
+	
+	protected boolean getDirty()
+	{
+		return m_isDirty;
+	}
+	
+	protected void setDirty( boolean iIsDirty )
+	{
+		m_isDirty = iIsDirty;
+	}
+	
+	public Object invoke( IInvocation iInvocation)
+	 throws InteractionException
+	{
+		return invoke( iInvocation, null );
+	}
+	
+	private transient boolean m_isReadOnly = false;
+	private transient boolean m_isDirty = false;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInvocation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInvocation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInvocation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BaseInvocation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,42 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+public abstract class BaseInvocation implements IInvocation
+{
+	protected BaseInvocation()
+	{
+		super();
+	}
+
+	public Object getResult()
+	{
+		return m_object;
+	}
+	
+	protected void setResult( Object iResult )
+	{
+		m_object = iResult;
+	}
+	
+	protected transient Object m_object;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BufferInteraction.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BufferInteraction.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BufferInteraction.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/BufferInteraction.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,69 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.io.IOException;
+
+public abstract class BufferInteraction extends BaseInteraction
+{
+
+	public BufferInteraction()
+	{
+		super();
+	}
+	
+	public void setBuffer( byte[] iBuffer )
+	{
+		m_buffer = iBuffer;
+	}
+	
+	public byte[] getBuffer() throws IOException
+	{
+		return m_buffer;
+	}
+	
+	protected final void clearBuffer()
+	{
+		m_buffer = null;
+	}	
+	
+	/////////////////////
+	// JJ 10-29-03
+	//
+	protected final byte[] cloneBuffer() 
+	{
+		if ( m_buffer == null )
+		{
+			return null;
+		}
+		
+		byte[] retValue = new byte[m_buffer.length];
+		for (int i = 0; i < m_buffer.length; i ++) {
+			retValue[i] = m_buffer[i];
+		}
+		return retValue;
+	}
+	//
+	/////////////////////
+	
+	private transient byte[] m_buffer = null;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentAccessible.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentAccessible.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentAccessible.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentAccessible.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,29 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import org.w3c.dom.Document;
+
+public interface IDocumentAccessible
+{
+	Document getDocument() throws Exception;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentMutable.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentMutable.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentMutable.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IDocumentMutable.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,29 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import org.w3c.dom.Document;
+
+public interface IDocumentMutable
+{
+	public void setDocument( Document iDocument ) throws Exception;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IFieldAccessible.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IFieldAccessible.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IFieldAccessible.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IFieldAccessible.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,41 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Nov 7, 2003
+ *
+ * To change the template for this generated file go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+package com.sybase.bpe.interaction;
+
+/**
+ * @author jjin
+ *
+ * To change the template for this generated type comment go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+public interface IFieldAccessible {
+	// this call expects the field is not repeatable
+	public String getField(String fieldName) throws Exception;
+	// this call expects the filed is repeatable
+	public String getField(String fieldName, int instanceNumber) throws Exception;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInteraction.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInteraction.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInteraction.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInteraction.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,39 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+
+public interface IInteraction
+{
+	public static final String OBJECT_TYPE = "obj";
+	public static final String BUFFER_TYPE = "buf";
+	public static final String INTERACTION_TYPE = "interaction";
+	public static final String FORMATTABLE_VALUE_TYPE = "formattableValue";
+		
+	public Object invoke(IInvocation iInvocation) 
+	  throws InteractionException;
+	  
+	public Object invoke(IInvocation iInvocation, 
+	  Object iInput) throws InteractionException;
+	  
+	public void releaseResources() throws InteractionException;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,32 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import com.sybase.bpe.interaction.query.IQuery;
+
+public interface IInvocation
+{
+	public boolean isMutator();
+	public Object execute( IInteraction iTarget, Object iParameters) throws Exception;
+	public int getType();
+	public IQuery getQuery();
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationDefinition.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationDefinition.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationDefinition.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,27 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+public interface IInvocationDefinition
+{
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationFactory.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationFactory.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationFactory.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationFactory.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,159 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.util.HashMap;
+
+public interface IInvocationFactory
+{
+	/**
+	 * Query a document for an element and return the text
+	 * value associated with that element.
+	 * 
+	 * @param iXPathExpression
+	 * XPath locator for the queried node.
+	 * 
+	 * @param iNamespaceMap
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createXPathQueryNodeValueInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException;
+
+	/**
+	 * Query a document for an element and set the text value
+	 * associated with that element.
+	 * 
+	 * @param iXPathExpression
+	 * XPath locator for the queried node. 
+	 * 
+	 * @param iNamespaceMap
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createXPathSetNodeValueInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException;
+
+	/**
+	 * Query a document for a subtree ( the subtree may be 
+	 * a leaf ).
+	 * 
+	 * @param iXPathExpression
+	 * XPath locator for the root node of the selected
+	 * subtree.
+	 * 
+	 * @param iNamespaceMap
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createXPathSelectTreeInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException;
+
+	/**
+	 * Copy a subtree to a specified location in a document.
+	 * 
+	 * @param iXPathExpression
+	 * XPath locator for the parent node under which the
+	 * subtree should be copied.
+	 * 
+	 * @param iNamespaceMap
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createXPathCopyTreeInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException;
+		
+	/**
+	 * Remove the children from the target parent and 
+	 * then copy the children from source parent node under
+	 * the target parent node.
+	 * 
+	 * @param iXPathExpression
+	 * XPath locator for the parent node under which the
+	 * subtree should be copied.
+	 * 
+	 * @param iNamespaceMap
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createXPathCopyChildrenWithOverwriteInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException;
+	
+	/**
+	 * Copy the children from source parent node under
+	 * the target parent node.
+	 * 
+	 * @param iXPathExpression
+	 * XPath locator for the parent node under which the
+	 * subtree should be copied.
+	 * 
+	 * @param iNamespaceMap
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createXPathCopyChildrenInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException;
+
+	/**
+	 * Prune the specified subtree from the document.
+	 * 
+	 * @param iXPathExpression
+	 * XPath locator for the node to prune.
+	 * 
+	 * @param iNamespaceMap
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createXPathPruneTreeInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException;
+
+	/**
+	 * Set the object encapsulated by the interaction.
+	 * 
+	 * @return
+	 * @throws InteractionException
+	 */
+	public IInvocation createSetObjectInvocation() throws InteractionException;
+
+	/**
+	* Get the object encapsulated by the interaction.
+	* 
+	* @return
+	* @throws InteractionException
+	*/
+	public IInvocation createGetObjectInvocation() throws InteractionException;
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationTypes.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationTypes.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationTypes.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IInvocationTypes.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,37 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+
+package com.sybase.bpe.interaction;
+
+
+public class IInvocationTypes
+{
+	public static final int GET_SIMPLE_VALUE = 1;
+	public static final int SET_SIMPLE_VALUE = 2;
+	public static final int GET_COMPLEX_VALUE = 3;
+	public static final int SET_COMPLEX_VALUE = 4;
+	public static final int REMOVE_VALUE = 5;
+	public static final int COPY_SUB_ELEMENTS = 6;
+	public static final int SET_OBJECT = 7;
+	public static final int GET_OBJECT = 8;
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectAccessible.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectAccessible.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectAccessible.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectAccessible.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,31 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public interface IObjectAccessible
+{
+	public Object getObject()
+	  throws InteractionException;
+	
+	public Object getObject( 
+	  String iPreference ) 
+	  throws InteractionException;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectMutable.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectMutable.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectMutable.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/IObjectMutable.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,27 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public interface IObjectMutable
+{
+	public void setObject( Object iObject ) 
+	  throws InteractionException;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,58 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Apr 16, 2003
+ *
+ */
+package com.sybase.bpe.interaction;
+
+import com.sybase.bpe.util.BPException;
+
+/**
+ * @author waterman
+ *
+ */
+public class InteractionException extends BPException {
+	
+	static final long serialVersionUID = 1534737082941167523L;
+
+	/**
+	 * @param message_id
+	 * @param msgParams
+	 */
+	public InteractionException(String message_id, Object[] msgParams) {
+		super(message_id, msgParams);
+	}
+
+	/**
+	 * @param message_id
+	 * @param msgParams
+	 * @param cause
+	 */
+	public InteractionException(
+		String message_id,
+		Object[] msgParams,
+		Throwable cause) {
+		super(message_id, msgParams, cause);
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionFactory.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionFactory.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionFactory.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InteractionFactory.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,110 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.util.Properties;
+
+import org.w3c.dom.Document;
+
+import com.sybase.bpe.interaction.spiadapter.SPIAdapterInteractionFactory;
+
+public class InteractionFactory
+{
+
+	protected InteractionFactory()
+	{
+		super();
+	}
+
+	public static InteractionFactory newInstance()
+	{
+		//return new InteractionFactory();
+		return new SPIAdapterInteractionFactory();
+	}
+
+	public IInteraction createXMLInteraction(byte[] iBuffer) throws InteractionException
+	{
+		XMLInteractionObject xmio = new XMLInteractionObject();
+		xmio.setBuffer(iBuffer);
+		return xmio;
+	}
+	
+	////////////////////////
+	// JJ 10-30-03
+	// Cory 02-28-05, we don't use this anymore
+/*	public IInteraction createWireFormatInteraction(byte[] buffer,
+													String codeSet,
+													String locale,
+													String formatName) throws InteractionException {
+		WireFormatInteractionObject retValue = new WireFormatInteractionObject();
+		
+		retValue.setBuffer(buffer);
+		retValue.setCodeSet(codeSet);
+		retValue.setLocale(locale);
+		retValue.setFormatName(formatName);
+		
+		return retValue;
+	}
+	public IInteraction createWireFormatInteraction(byte[] buffer,
+													String formatName) throws InteractionException {
+		WireFormatInteractionObject retValue = new WireFormatInteractionObject();
+		
+		retValue.setBuffer(buffer);
+		retValue.setFormatName(formatName);
+		
+		return retValue;
+	}*/
+															
+
+
+	public IInteraction createPropertiesInteraction(Properties iProperties) throws InteractionException
+	{
+		return new PropertiesInteractionObject(iProperties);
+	}
+
+	public IInteraction createDocumentInteraction(Document iDocument) throws InteractionException
+	{
+		XMLInteractionObject xmio = new XMLInteractionObject();
+		xmio.setDocument( iDocument );
+		return xmio;
+	}
+	
+	public IInteraction createDocumentInteraction() throws InteractionException
+	{
+		XMLInteractionObject xmio = new XMLInteractionObject();
+		//This appears to be an expensive call. In particular where we
+		//want an empty XMLInteractionObject on which the buffer is
+		//set sometime after object creation. Note: this method is being
+		//called from XMLInteractionBuilder.createInteraction() which does
+		//not take any type of initialization data.
+		//xmio.setEmptyDocument();
+		return xmio;
+	}
+	
+	public IInteraction createObjectInteraction( Object iObject )
+	{
+		ObjectInteraction objectInteraction = new ObjectInteraction();
+		objectInteraction.setObject( iObject );
+		
+		return objectInteraction;
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidInputParameterException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidInputParameterException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidInputParameterException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidInputParameterException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,32 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public class InvalidInputParameterException extends InteractionException
+{
+	
+	static final long serialVersionUID = -7735211549759558497L;
+
+	
+	public InvalidInputParameterException() {
+		super("INVALID_INPUT_PARAM",null);
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidTypeException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidTypeException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidTypeException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvalidTypeException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,34 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public class InvalidTypeException extends InteractionException
+{
+	
+	static final long serialVersionUID = 6557666627691798540L;
+
+	public InvalidTypeException()
+	{
+		super(null, null);
+		
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/Invocation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/Invocation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/Invocation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/Invocation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,95 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.io.Serializable;
+
+import com.sybase.bpe.interaction.operations.IOperation;
+import com.sybase.bpe.interaction.query.IQuery;
+
+public class Invocation implements IInvocation, Serializable
+{
+    static final long serialVersionUID = 7295384248109086989L;
+    
+	public Invocation()
+	{
+		super();
+	}
+	
+	public Invocation( IQuery iQuery, IOperation iOperation, int type )
+	{
+		setQuery( iQuery );
+		setOperation( iOperation );
+		setType( type );
+	}
+
+	public boolean isMutator()
+	{
+		return m_operation.isMutator();
+	}
+	
+	public void setOperation( IOperation iOperation )
+	{
+		m_operation = iOperation;
+	}
+	
+	public IOperation getOperation()
+	{
+		return m_operation;
+	}
+	
+	public void setQuery( IQuery iQuery )
+	{
+		m_query = iQuery;
+	}
+	
+	public IQuery getQuery()
+	{
+		return m_query;
+	}
+	
+	public int getType()
+	{
+		return m_type;
+	}
+	
+	public void setType( int type )
+	{
+		m_type = type;
+	}
+	
+	
+	public Object execute(
+			IInteraction iTarget, 
+			Object iParameters) throws Exception
+	{
+		Object result = m_operation.execute( iTarget, m_query, iParameters, null );
+		return result;
+	}
+	
+	
+	private IOperation m_operation = null;
+	private IQuery m_query = null;
+	private int m_type;
+	
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationFactory.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationFactory.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationFactory.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationFactory.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,178 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.util.HashMap;
+
+import com.sybase.bpe.interaction.operations.CopyChildrenOperation;
+import com.sybase.bpe.interaction.operations.CopyChildrenWithOverwriteOperation;
+import com.sybase.bpe.interaction.operations.CopyTreeOperation;
+import com.sybase.bpe.interaction.operations.GetObjectOperation;
+import com.sybase.bpe.interaction.operations.GetTextValueOperation;
+import com.sybase.bpe.interaction.operations.IOperation;
+import com.sybase.bpe.interaction.operations.PruneOperation;
+import com.sybase.bpe.interaction.operations.SelectTreeOperation;
+import com.sybase.bpe.interaction.operations.SetObjectOperation;
+import com.sybase.bpe.interaction.operations.SetTextValueOperation;
+import com.sybase.bpe.interaction.query.IQuery;
+import com.sybase.bpe.interaction.query.JaxenXPathSingleNodeQuery;
+
+public class InvocationFactory implements IInvocationFactory
+{
+
+	
+	public InvocationFactory()
+	{
+	}
+
+	public static IInvocationFactory newInstance()
+	{
+		return new InvocationFactory();
+	}
+
+	public IInvocation createXPathQueryNodeValueInvocation(
+		String iExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException
+	{
+		IOperation operation = new GetTextValueOperation();
+		IInvocation invocation =
+			createCommonInvocation(
+					iExpression, iNamespaceMap, operation,
+					IInvocationTypes.GET_SIMPLE_VALUE);
+
+		return invocation;
+	}
+
+	public IInvocation createXPathSetNodeValueInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException
+	{
+
+		IOperation operation = new SetTextValueOperation();
+		IInvocation invocation =
+			createCommonInvocation(iXPathExpression, iNamespaceMap, operation,
+					IInvocationTypes.SET_SIMPLE_VALUE);
+
+		return invocation;
+	}
+
+	public IInvocation createXPathSelectTreeInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException
+	{
+		IOperation operation = new SelectTreeOperation();
+		IInvocation invocation =
+			createCommonInvocation(iXPathExpression, iNamespaceMap, 
+					operation, IInvocationTypes.GET_COMPLEX_VALUE);
+		
+
+		return invocation;
+	}
+
+	public IInvocation createXPathCopyTreeInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException
+	{
+		IOperation operation = new CopyTreeOperation();
+		IInvocation invocation =
+			createCommonInvocation(iXPathExpression, 
+					iNamespaceMap, operation, 
+					IInvocationTypes.SET_COMPLEX_VALUE);
+
+		return invocation;
+	}
+
+	public IInvocation createXPathPruneTreeInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap)
+		throws InteractionException
+	{
+		IOperation operation = new PruneOperation();
+		IInvocation invocation =
+			createCommonInvocation(iXPathExpression, iNamespaceMap, operation,
+					IInvocationTypes.REMOVE_VALUE);
+
+		return invocation;
+	}
+
+	public IInvocation createSetObjectInvocation()
+	{
+		IOperation operation = new SetObjectOperation();
+		Invocation invocation = new Invocation(null, operation, 
+				IInvocationTypes.SET_OBJECT);
+		return invocation;
+	}
+	public IInvocation createGetObjectInvocation()
+	{
+		IOperation operation = new GetObjectOperation();
+		Invocation invocation = new Invocation(null, operation, 
+				IInvocationTypes.GET_OBJECT);
+		return invocation;
+	}
+
+	private IInvocation createCommonInvocation(
+		String iXPathExpression,
+		HashMap iNamespaceMap,
+		IOperation iOperation, 
+		int type)
+		throws InteractionException
+	{
+		try
+		{
+			IQuery query =
+				new JaxenXPathSingleNodeQuery(iXPathExpression, iNamespaceMap);
+			Invocation invocation = new Invocation(query, iOperation, type);
+
+			return invocation;
+
+		} catch (Exception e)
+		{
+			InteractionException bpx = new InteractionException("NATIVE_EXCEPTION",new Object[] {"Exception"},e);
+			throw bpx;
+		}
+	}
+
+	public IInvocation createXPathCopyChildrenWithOverwriteInvocation(String iXPathExpression, HashMap iNamespaceMap) throws InteractionException
+	{
+		IOperation operation = new CopyChildrenWithOverwriteOperation();
+		IInvocation invocation =
+			createCommonInvocation(iXPathExpression, iNamespaceMap, operation,
+					IInvocationTypes.COPY_SUB_ELEMENTS);
+
+		return invocation;
+	}
+	
+	public IInvocation createXPathCopyChildrenInvocation(String iXPathExpression, HashMap iNamespaceMap) throws InteractionException
+	{
+		IOperation operation = new CopyChildrenOperation();
+		IInvocation invocation =
+			createCommonInvocation(iXPathExpression, iNamespaceMap, operation,
+					IInvocationTypes.COPY_SUB_ELEMENTS);
+
+		return invocation;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationMismatchException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationMismatchException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationMismatchException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/InvocationMismatchException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,30 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public class InvocationMismatchException extends InteractionException
+{
+	static final long serialVersionUID = 194986460468526233L;
+	
+	public InvocationMismatchException() {
+		super("INVOCATION_MISMATCH",null);
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NonExistentNodeException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NonExistentNodeException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NonExistentNodeException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NonExistentNodeException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,38 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public class NonExistentNodeException extends InteractionException
+{
+	static final long serialVersionUID = 1312143860329090430L;
+	
+	public NonExistentNodeException( String iXpath )
+	{
+		super( "NON_EXISTENT_NODE", new Object[] {iXpath} );
+		
+	}
+	
+	public NonExistentNodeException() {
+		super("NON_EXISTENT_NODE", null);
+	}
+
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NullInvocationException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NullInvocationException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NullInvocationException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/NullInvocationException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,31 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+public class NullInvocationException extends InteractionException
+{
+	
+	static final long serialVersionUID = -407197685918161252L;
+	
+	public NullInvocationException() {
+		super("NULL_INVOCATION",null);
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/ObjectInteraction.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/ObjectInteraction.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/ObjectInteraction.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/ObjectInteraction.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,90 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+
+import com.sybase.bpe.context.base.ContextServiceException;
+import com.sybase.bpe.context.base.ContextUtil;
+
+public class ObjectInteraction extends BaseInteraction 
+  implements IObjectAccessible, IObjectMutable, Serializable
+{
+
+	public Object cloneObject() throws ContextServiceException
+	{
+		ObjectInteraction newInteraction = new ObjectInteraction();
+		Object clonedObject = ContextUtil.cloneObject( getObject() );
+		newInteraction.setObject( clonedObject );
+		return newInteraction;
+	}
+	
+	public Object getObject()
+	{
+		return m_object;
+	}
+	
+	public void setObject( Object iObject )
+	{
+		m_object = iObject;
+		setDirty( true );
+	}
+	
+	public String toString() {
+		String retValue = "null";
+		if (m_object != null) {
+			retValue = m_object.toString();
+		}
+		return retValue;
+	}
+	
+	public void releaseResources() throws InteractionException {
+	}
+	
+	private void writeObject(ObjectOutputStream s) throws IOException
+	{
+		s.defaultWriteObject();
+		
+	}
+
+	private void readObject(ObjectInputStream s)
+		throws IOException, ClassNotFoundException
+	{
+		s.defaultReadObject();
+	}
+
+	// Do not change this value unless you want to enforce
+	// incompatibility with other serialized versions of 
+	// this class.
+	private static final long serialVersionUID = 1L;
+	
+	private Object m_object;
+
+	public Object getObject(String iPreference) throws InteractionException
+	{
+		return getObject();
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/PropertiesInteractionObject.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/PropertiesInteractionObject.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/PropertiesInteractionObject.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/PropertiesInteractionObject.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,115 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import com.sybase.bpe.util.XMLDocBuilderByThread;
+
+public class PropertiesInteractionObject extends XMLInteractionObject
+{
+	
+	static final long serialVersionUID = 1522517564037436979L;
+	
+	// Logging
+	private static final Logger logger =
+		Logger.getLogger(PropertiesInteractionObject.class.getName());
+		
+	protected PropertiesInteractionObject()
+	{
+	}
+
+	public PropertiesInteractionObject(Properties iProperties) throws InteractionException
+	{
+		try
+		{
+			m_properties = iProperties;
+
+			// The cost of creating this document up front should be relatively
+			// small since properties are relatively small objects.  It may be
+			// possible to handle this conversion in a lazy fashion such that
+			// the translation does not happen until the properties object
+			// is accessed, but the payoff does not justify the increased code
+			// complexity.
+			Document document = createDocumentFromProperties(iProperties);
+			setDocument(document);
+		}
+
+		catch (Exception e)
+		{
+			InteractionException bpx = new InteractionException("NATIVE_EXCEPTION",new Object[] {"Exception"},e);
+			bpx.log(logger,Level.SEVERE);
+			throw bpx;
+		}
+	}
+
+	private Document createDocumentFromProperties(Properties iProperties)
+		throws Exception
+	{
+
+		Document document = XMLDocBuilderByThread.getDocBuilder().newDocument();
+
+		Node propertiesRoot = document.createElement(PROPERTIES_ROOT);
+		document.appendChild(propertiesRoot);
+
+		Enumeration names = iProperties.propertyNames();
+		while (names.hasMoreElements())
+		{
+
+			String nextName = (String) names.nextElement();
+			String nextValue = iProperties.getProperty(nextName);
+			Element newProperty = document.createElement(PROPERTY_ELEMENT);
+			Element newName = document.createElement(NAME_ELEMENT);
+			Element newValue = document.createElement(VALUE_ELEMENT);
+			Node newNameTextNode = document.createTextNode(nextName);
+			Node newValueTextNode = document.createTextNode(nextValue);
+			newName.appendChild(newNameTextNode);
+			newValue.appendChild(newValueTextNode);
+			newProperty.appendChild(newName);
+			newProperty.appendChild(newValue);
+			propertiesRoot.appendChild(newProperty);
+		}
+
+		return document;
+
+	}
+	
+	public Properties getProperties() {
+		return m_properties;
+	}
+
+	transient private Properties m_properties = null;
+//	transient private Document m_document = null;
+
+	private static final String PROPERTIES_ROOT = "Properties";
+	private static final String PROPERTY_ELEMENT = "Property";
+	private static final String NAME_ELEMENT = "name";
+	private static final String VALUE_ELEMENT = "value";
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/XMLInteractionObject.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/XMLInteractionObject.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/XMLInteractionObject.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/XMLInteractionObject.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,300 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.xml.serializer.Method;
+import org.apache.xml.serializer.OutputPropertiesFactory;
+import org.apache.xml.serializer.Serializer;
+import org.apache.xml.serializer.SerializerFactory;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+import com.sybase.bpe.context.IAccessControl;
+import com.sybase.bpe.context.ICloneable;
+import com.sybase.bpe.util.XMLDocBuilderByThread;
+
+public class XMLInteractionObject
+	extends BufferInteraction
+	implements IAccessControl, ICloneable, IDocumentAccessible, IDocumentMutable, Serializable, IObjectAccessible, IObjectMutable
+{
+	public XMLInteractionObject()
+	{
+	}
+	
+	// Logging
+	private static final Logger logger =
+		Logger.getLogger(XMLInteractionObject.class.getName());
+		
+
+	public void setDocument(Document iDocument)
+	{
+		clearBuffer();
+		setDirty(true);
+		m_document = iDocument;
+	}
+	
+	public void setEmptyDocument() throws InteractionException
+	{
+
+		Document document;
+
+		try {
+
+			document = XMLDocBuilderByThread.getDocBuilder().newDocument();
+		} catch (Exception e) {
+			InteractionException bpx = new InteractionException("NATIVE_EXCEPTION",new Object[] {"Exception"},e);
+			bpx.log(logger,Level.SEVERE);
+			throw bpx;
+		}
+		setDocument( document );
+
+	}
+
+	protected void clearDocument()
+	{
+		m_document = null;
+	}
+
+	public void setBuffer(byte[] iBuffer)
+	{
+		clearDocument();
+		super.setBuffer(iBuffer);
+	}
+
+	public byte[] getXMLBuffer() throws IOException
+	{
+		if (getDirty())
+		{
+			serializeDocument();
+			setDirty(false);
+		}
+		return getBuffer();
+	}
+	
+	public String toString()
+	{
+		try
+		{
+			serializeDocument();
+			if ( getBuffer() == null )
+			{
+				return null;
+			}
+			return new String( getBuffer());
+		}
+		catch( Exception e )
+		{
+			return e.toString();
+		}
+	}
+
+	public Document getDocument() throws Exception
+	{
+		if ( m_document == null && getBuffer() == null )
+		{
+			this.setEmptyDocument();
+		}
+			
+		if (m_document == null)
+		{
+			ByteArrayInputStream bai = new ByteArrayInputStream(getBuffer());
+			InputSource in = new InputSource(bai);
+
+			m_document = XMLDocBuilderByThread.getDocBuilder().parse(in);
+
+		}
+
+		return m_document;
+
+	}
+
+
+	public Object cloneObject()
+	{
+		XMLInteractionObject newObject = new XMLInteractionObject();
+		try
+		{
+			serializeDocument();
+		}
+		catch (IOException e)
+		{
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		newObject.setBuffer(super.cloneBuffer());
+		return newObject;
+	}
+	
+	public void releaseResources() throws InteractionException {
+	}
+
+/*	private XPathEvaluator getXPathEvaluator() throws Exception
+	{
+		if (m_evaluator == null)
+		{
+			// Create an XPath evaluator and pass in the document.
+			m_evaluator = new XPathEvaluatorImpl(getDocument());
+		}
+		return m_evaluator;
+	}*/
+
+
+	private void serializeDocument() throws IOException
+	{
+		if (getBuffer() == null || getDirty())
+		{	
+			// If the document has no child nodes, 
+			// we don't want to serialize it because
+			// a sax parse error occurs when 
+			// reconstructing an empty document
+			// from the buffer.
+			if (m_document != null && m_document.hasChildNodes())
+			{
+				if (m_serializer == null)
+				{
+					Properties props = OutputPropertiesFactory.getDefaultMethodProperties(Method.XML);
+					m_serializer = SerializerFactory.getSerializer(props);
+
+				}
+				
+				ByteArrayOutputStream bao = new ByteArrayOutputStream();
+				m_serializer.setOutputStream(bao);
+				m_serializer.asDOMSerializer().serialize(m_document);
+				super.setBuffer(bao.toByteArray());
+				m_serializer.reset();
+				setDirty(false);
+			}
+			else
+			{
+				// The document either does not exist or is
+				// empty, so clear the buffer.
+				setBuffer( null );
+			}
+		}
+	}
+
+	private void writeObject(ObjectOutputStream s) throws IOException
+	{
+		s.defaultWriteObject();
+		serializeDocument();
+		byte[] buffer = getBuffer();
+		
+		if ( buffer != null )
+		{
+			int length = buffer.length;
+			s.writeInt(length);
+			s.write(buffer);
+		}
+		else
+		{
+			// -1 indicates no buffer is present
+			s.writeInt( -1 );
+		}
+		
+	}
+
+	private void readObject(ObjectInputStream s)
+		throws IOException, ClassNotFoundException
+	{
+		s.defaultReadObject();
+		int length = s.readInt();
+		if ( length != -1 )
+		{
+			byte[] buffer = new byte[length];
+			s.readFully(buffer);
+			setBuffer( buffer );
+		}
+	}
+	
+
+	// Do not change this value unless you want to enforce
+	// incompatibility with other serialized versions of 
+	// this class.
+	private static final long serialVersionUID = 1L;
+	
+/*	private transient XPathEvaluator m_evaluator = null;
+	private transient XPathNSResolver m_resolver = null;
+	private transient XPathResult m_result = null;*/
+	private transient Document m_document;
+	private transient Serializer m_serializer;
+
+	
+
+	public Object getObject(String iPreference) throws InteractionException
+	{
+		
+		try
+		{
+			if ( iPreference == null || 
+					iPreference.equals(IInteraction.INTERACTION_TYPE))
+			{
+				return this;
+			}
+					
+			if (iPreference.equals(IInteraction.BUFFER_TYPE) ||
+					 iPreference.equals("[B") || 
+					 iPreference.equals("byte[]"))
+			{
+				return getXMLBuffer();
+			}
+			else
+			{
+				return getDocument();
+			}
+		}
+		catch (Exception e)
+		{
+			throw new InteractionException(null, null, e);
+		}
+	}
+
+	public Object getObject() throws InteractionException
+	{
+		return getObject("");
+	}
+
+	public void setObject(Object iObject) throws InteractionException
+	{
+		if ( iObject instanceof byte[] )
+		{
+			setBuffer( (byte[])(iObject));
+		}
+		else if ( iObject instanceof Document )
+		{
+			setDocument( (Document)(iObject) );
+		}
+		else
+		{
+			throw new InvalidTypeException();
+		}
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/DefaultInteractionBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/DefaultInteractionBuilder.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/DefaultInteractionBuilder.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/DefaultInteractionBuilder.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,41 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+
+package com.sybase.bpe.interaction.builders;
+
+import java.io.Serializable;
+
+import com.sybase.bpe.interaction.IInteraction;
+import com.sybase.bpe.interaction.InteractionException;
+import com.sybase.bpe.interaction.spiadapter.SPIAdapterInteraction;
+
+
+public class DefaultInteractionBuilder implements IInteractionBuilder, Serializable
+{
+	
+    static final long serialVersionUID = 5257941485110487683L;
+    
+	public IInteraction createInteraction() throws InteractionException
+	{
+		return new SPIAdapterInteraction();
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/IInteractionBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/IInteractionBuilder.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/IInteractionBuilder.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/IInteractionBuilder.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,31 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction.builders;
+
+import com.sybase.bpe.interaction.IInteraction;
+import com.sybase.bpe.interaction.InteractionException;
+
+public interface IInteractionBuilder
+{
+	public IInteraction createInteraction() 
+	  throws InteractionException;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/ObjectInteractionBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/ObjectInteractionBuilder.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/ObjectInteractionBuilder.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/ObjectInteractionBuilder.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,45 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction.builders;
+
+import java.io.Serializable;
+
+import com.sybase.bpe.interaction.IInteraction;
+import com.sybase.bpe.interaction.InteractionException;
+import com.sybase.bpe.interaction.InteractionFactory;
+
+public class ObjectInteractionBuilder implements IInteractionBuilder,
+ Serializable
+{
+	
+    static final long serialVersionUID = -519460377963309677L;
+
+	public IInteraction createInteraction() throws InteractionException
+	{
+		IInteraction newInteraction = 
+		  InteractionFactory.newInstance().
+		    createObjectInteraction( null );
+		    
+		return newInteraction;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/XMLInteractionBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/XMLInteractionBuilder.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/XMLInteractionBuilder.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/builders/XMLInteractionBuilder.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,46 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction.builders;
+
+import java.io.Serializable;
+
+import com.sybase.bpe.interaction.IInteraction;
+import com.sybase.bpe.interaction.InteractionException;
+import com.sybase.bpe.interaction.InteractionFactory;
+
+public class XMLInteractionBuilder implements IInteractionBuilder,
+  Serializable
+{
+	
+    static final long serialVersionUID = 9182376478806195020L;
+
+	public IInteraction createInteraction() 
+	  throws InteractionException
+	{
+		
+		IInteraction newInteraction = InteractionFactory.
+		  newInstance().createDocumentInteraction();
+		    
+		return newInteraction;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenOperation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenOperation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenOperation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenOperation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,55 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction.operations;
+
+import java.io.Serializable;
+
+import org.w3c.dom.Node;
+
+
+
+public class CopyChildrenOperation extends 
+DocumentOperation implements Serializable
+{
+
+	static final long serialVersionUID = -6887300116560562783L;
+	
+	public CopyChildrenOperation()
+	{
+		super(true);
+	}
+
+	protected Object execute(Object iQueryResult, Object iParameters, String xpath) throws Exception
+	{
+		Node targetParent = (Node) (iQueryResult);
+		Node sourceParent = (Node) (iParameters);
+		DOMUtil.copyChildren(sourceParent, targetParent );
+
+		return null;
+	}
+
+	public boolean isMutator()
+	{
+		return true;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenWithOverwriteOperation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenWithOverwriteOperation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenWithOverwriteOperation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyChildrenWithOverwriteOperation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,55 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction.operations;
+
+import java.io.Serializable;
+
+import org.w3c.dom.Node;
+
+
+
+public class CopyChildrenWithOverwriteOperation extends 
+DocumentOperation implements Serializable
+{
+    static final long serialVersionUID = 6269637596255950735L;
+
+	public CopyChildrenWithOverwriteOperation()
+	{
+		super(true);
+	}
+
+	protected Object execute(Object iQueryResult, Object iParameters, String xpath) throws Exception
+	{
+		Node targetParent = (Node) (iQueryResult);
+		Node sourceParent = (Node) (iParameters);
+		DOMUtil.removeChildren(targetParent);
+		DOMUtil.copyChildren(sourceParent, targetParent );
+
+		return null;
+	}
+
+	public boolean isMutator()
+	{
+		return true;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyTreeOperation.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyTreeOperation.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyTreeOperation.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/CopyTreeOperation.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,49 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction.operations;
+
+import java.io.Serializable;
+
+import org.w3c.dom.Node;
+
+public class CopyTreeOperation extends DocumentOperation
+implements Serializable
+{
+
+	static final long serialVersionUID = 7415974448990631072L;
+	public CopyTreeOperation( )
+	{
+		super( true );
+	}
+	protected Object execute(Object iQueryResult, Object iParameters, String xpath) throws Exception
+	{
+		Node targetNode = ( Node )( iQueryResult );
+		Node treeToCopy = ( Node )( iParameters );
+		DOMUtil.copyTree( targetNode, treeToCopy );
+
+		return null;
+	}
+	public boolean isMutator()
+	{
+		return true;
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/DOMUtil.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/DOMUtil.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/DOMUtil.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/interaction/operations/DOMUtil.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,221 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.interaction.operations;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.sybase.bpe.interaction.query.NodeDescriptor;
+
+public class DOMUtil
+{
+	public static Node findFirstChildTextNode( Node iNode )
+	{
+		// get first child node
+		Node nodeChild = iNode.getFirstChild();
+		// go through each child node 
+		while (nodeChild != null) {
+			if (nodeChild.getNodeType() == Node.TEXT_NODE
+					|| nodeChild.getNodeType() == Node.CDATA_SECTION_NODE) 
+			{
+				return nodeChild; 
+			}
+		}
+		return null;
+	}
+	
+	public static String processNodeValue(Node node) {
+		StringBuffer value = new StringBuffer();
+		
+		if (node.getNodeType() == Node.TEXT_NODE
+				|| node.getNodeType() == Node.CDATA_SECTION_NODE) {
+		// it is text node
+			// append the text value
+			value.append(node.getNodeValue());
+			return value.toString();
+		}
+		
+		// get first child node
+		Node nodeChild = node.getFirstChild();
+		// go through each child node 
+		while (nodeChild != null) {
+			if (nodeChild.getNodeType() == Node.TEXT_NODE
+					|| nodeChild.getNodeType() == Node.CDATA_SECTION_NODE) {
+			// it is text node
+				// append the text value
+				value.append(nodeChild.getNodeValue());
+			}
+			nodeChild = nodeChild.getNextSibling();
+		}
+		return value.toString();
+	}
+	
+	// Set the value of a child text node
+	public static void setTextValue( Node node, String iValue )
+	{
+		Node textNode = findFirstChildTextNode( node );
+		if ( textNode == null )
+		{
+			textNode = node.getOwnerDocument().createTextNode(iValue);
+			node.appendChild( textNode );
+		}
+		else
+		{
+			textNode.setNodeValue( iValue );
+		}
+		
+	}
+	
+	public static void removeChildren( Node iNode )
+	{
+		Node node = iNode.getFirstChild();
+		while( node != null )
+		{
+			iNode.removeChild(node);
+			node = iNode.getFirstChild();
+		}
+		/*
+		NodeList nodeList = iNode.getChildNodes();
+		int length = nodeList.getLength();
+		int count = 0;
+		while( count < length )
+		{
+			Node node = nodeList.item( count );
+			if ( node != null )
+			{
+				iNode.removeChild( node );
+			}	
+			count++;
+		}
+		*/
+	}
+	
+	public static void copyChildren(Node iSourceParent, Node iTargetParent)
+	{
+		NodeList nodeList = iSourceParent.getChildNodes();
+		int length = nodeList.getLength();
+		int count = 0;
+		while (count < length)
+		{
+			Node node = nodeList.item(count);
+			if ( node != null )
+			{
+				copyTree( iTargetParent, node );
+			}
+
+			count++;
+		}
+
+	}
+	
+	public static Node detachNode( Node iNode )
+	{
+		Node parent = iNode.getParentNode();
+		parent.removeChild( iNode );
+		return iNode;
+	}
+	
+	public static void copyTree( Node iTargetParent, Node iTreeToCopy )
+	{
+		
+		Document document = null;
+		
+		if ( iTargetParent instanceof Document )
+		{
+			document = ( Document )( iTargetParent );
+		}
+		else
+		{ 
+			document = iTargetParent.getOwnerDocument();
+		}
+		
+		Node copy = document.importNode(iTreeToCopy, true);
+		
+		iTargetParent.appendChild( copy );
+	}
+	
+	public static void moveTree( Node iTreeToMove, Node iTargetParent )
+	{
+		Node movedNode = detachNode( iTreeToMove );
+		iTargetParent.appendChild(movedNode);
+	}
+	
+	public static Node buildNodes(Node iParentNode,
+            LinkedList iNodeDescriptorList)
+    {
+        Document document = null;
+        if (iParentNode instanceof Document)
+        {
+            document = (Document) iParentNode;
+        } else
+        {
+            document = iParentNode.getOwnerDocument();
+        }
+
+        Iterator iter = iNodeDescriptorList.iterator();
+        Node currentParent = iParentNode;
+        Element rootElem = document.getDocumentElement();
+        while (iter.hasNext())
+        {
+            NodeDescriptor nodeDescriptor = (NodeDescriptor) (iter.next());
+
+            Element newElement = null;
+            if (nodeDescriptor.getName().equals("*"))
+            {
+                newElement = document.createElement("root");
+            } 
+            else
+            {
+
+                if (nodeDescriptor.getNamespaceURI() != null)
+                {
+                    newElement = document.createElementNS(nodeDescriptor
+                            .getNamespaceURI(), nodeDescriptor.getName());
+                    
+                    if ( rootElem == null ) {
+                    	rootElem = newElement;
+                    }
+                   
+                    rootElem.setAttribute("xmlns:"+nodeDescriptor.getPrefix(),nodeDescriptor.getNamespaceURI());
+                    
+                } else
+                {
+                    //newElement = document.createElement(nodeDescriptor
+                    //        .getName());
+                	// The above code was creating an exception in apache axis as
+                	// output message was being serialized into the SOAP message.
+                	// CR385913
+                    newElement = document.createElementNS(null, nodeDescriptor.getName());
+                }
+            }
+
+            currentParent.appendChild(newElement);
+            currentParent = newElement;
+        }
+        return currentParent;
+    }
+}