You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/10/23 20:21:46 UTC

svn commit: r587587 [8/14] - in /activemq/activemq-cpp/trunk/src: main/activemq/connector/openwire/commands/ main/activemq/connector/openwire/marshal/v1/ main/activemq/connector/openwire/marshal/v2/ main/java/org/apache/activemq/openwire/tool/ test/ te...

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/srcmakefile.mk
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/srcmakefile.mk?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/srcmakefile.mk (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v1/srcmakefile.mk Tue Oct 23 11:21:35 2007
@@ -0,0 +1,128 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+cc_sources += \
+    activemq/connector/openwire/marshal/v1/ActiveMQBytesMessageMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQMapMessageMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQMessageMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQObjectMessageMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQQueueMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQStreamMessageMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQTempQueueMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQTempTopicMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQTextMessageMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ActiveMQTopicMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/BrokerIdMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/BrokerInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ConnectionControlMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ConnectionErrorMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ConnectionIdMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ConnectionInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ConsumerControlMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ConsumerIdMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/JournalQueueAckMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/JournalTopicAckMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/JournalTraceMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/JournalTransactionMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/KeepAliveInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/LastPartialCommandMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/LocalTransactionIdMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/MessageAckMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/MessageDispatchMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/MessageDispatchNotificationMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/MessageIdMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/MessagePullMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/NetworkBridgeFilterMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/PartialCommandMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ProducerIdMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ProducerInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/RemoveInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/RemoveSubscriptionInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ReplayCommandMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ResponseMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/SessionIdMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/SessionInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/ShutdownInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/SubscriptionInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/TransactionInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/WireFormatInfoMarshallerTest.cpp \
+    activemq/connector/openwire/marshal/v1/XATransactionIdMarshallerTest.cpp
+
+h_sources += \
+    activemq/connector/openwire/marshal/v1/ActiveMQBytesMessageMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQMapMessageMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQMessageMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQObjectMessageMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQQueueMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQStreamMessageMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQTempQueueMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQTempTopicMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQTextMessageMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ActiveMQTopicMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/BrokerIdMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/BrokerInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ConnectionControlMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ConnectionErrorMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ConnectionIdMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ConnectionInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ConsumerControlMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ConsumerIdMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ConsumerInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ControlCommandMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/DataArrayResponseMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/DataResponseMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/DestinationInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/DiscoveryEventMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ExceptionResponseMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/FlushCommandMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/IntegerResponseMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/JournalQueueAckMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/JournalTopicAckMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/JournalTraceMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/JournalTransactionMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/KeepAliveInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/LastPartialCommandMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/LocalTransactionIdMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/MessageAckMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/MessageDispatchMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/MessageDispatchNotificationMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/MessageIdMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/MessagePullMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/NetworkBridgeFilterMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/PartialCommandMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ProducerIdMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ProducerInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/RemoveInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/RemoveSubscriptionInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ReplayCommandMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ResponseMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/SessionIdMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/SessionInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/ShutdownInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/SubscriptionInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/TransactionInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/WireFormatInfoMarshallerTest.h \
+    activemq/connector/openwire/marshal/v1/XATransactionIdMarshallerTest.h

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQBytesMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQBytesMessageMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBytesMessageMarshallerTest::test() {
+
+    ActiveMQBytesMessageMarshaller myMarshaller;
+    ActiveMQBytesMessage myCommand;
+    ActiveMQBytesMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQBytesMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBytesMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQBytesMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQBytesMessage outCommand;
+    ActiveMQBytesMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBytesMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQBytesMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQBytesMessage outCommand;
+    ActiveMQBytesMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQBytesMessageMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQBytesMessageMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQBytesMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQBytesMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQBytesMessageMarshallerTest() {}
+        virtual ~ActiveMQBytesMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQMapMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQMapMessageMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::test() {
+
+    ActiveMQMapMessageMarshaller myMarshaller;
+    ActiveMQMapMessage myCommand;
+    ActiveMQMapMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQMapMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQMapMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQMapMessage outCommand;
+    ActiveMQMapMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQMapMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQMapMessage outCommand;
+    ActiveMQMapMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMapMessageMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQMapMessageMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQMapMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQMapMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQMapMessageMarshallerTest() {}
+        virtual ~ActiveMQMapMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQMessageMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMessageMarshallerTest::test() {
+
+    ActiveMQMessageMarshaller myMarshaller;
+    ActiveMQMessage myCommand;
+    ActiveMQMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQMessage outCommand;
+    ActiveMQMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQMessage outCommand;
+    ActiveMQMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQMessageMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQMessageMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQMessageMarshallerTest() {}
+        virtual ~ActiveMQMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQMESSAGEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQObjectMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQObjectMessageMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQObjectMessageMarshallerTest::test() {
+
+    ActiveMQObjectMessageMarshaller myMarshaller;
+    ActiveMQObjectMessage myCommand;
+    ActiveMQObjectMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQObjectMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQObjectMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQObjectMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQObjectMessage outCommand;
+    ActiveMQObjectMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQObjectMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQObjectMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQObjectMessage outCommand;
+    ActiveMQObjectMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQObjectMessageMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQOBJECTMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQOBJECTMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQObjectMessageMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQObjectMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQObjectMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQObjectMessageMarshallerTest() {}
+        virtual ~ActiveMQObjectMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQOBJECTMESSAGEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQQueue.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQQueueMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQQueueMarshallerTest::test() {
+
+    ActiveMQQueueMarshaller myMarshaller;
+    ActiveMQQueue myCommand;
+    ActiveMQQueue* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQQueue*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQQueueMarshallerTest::testLooseMarshal() {
+
+    ActiveMQQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQQueue outCommand;
+    ActiveMQQueue inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQQueueMarshallerTest::testTightMarshal() {
+
+    ActiveMQQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQQueue outCommand;
+    ActiveMQQueue inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQQueueMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQQUEUEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQQUEUEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQQueueMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQQueueMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQQueueMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQQueueMarshallerTest() {}
+        virtual ~ActiveMQQueueMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQQUEUEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQStreamMessage.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQStreamMessageMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQStreamMessageMarshallerTest::test() {
+
+    ActiveMQStreamMessageMarshaller myMarshaller;
+    ActiveMQStreamMessage myCommand;
+    ActiveMQStreamMessage* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQStreamMessage*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQStreamMessageMarshallerTest::testLooseMarshal() {
+
+    ActiveMQStreamMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQStreamMessage outCommand;
+    ActiveMQStreamMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQStreamMessageMarshallerTest::testTightMarshal() {
+
+    ActiveMQStreamMessageMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQStreamMessage outCommand;
+    ActiveMQStreamMessage inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQStreamMessageMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQSTREAMMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQSTREAMMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQStreamMessageMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQStreamMessageMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQStreamMessageMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQStreamMessageMarshallerTest() {}
+        virtual ~ActiveMQStreamMessageMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQSTREAMMESSAGEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQTempQueue.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQTempQueueMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempQueueMarshallerTest::test() {
+
+    ActiveMQTempQueueMarshaller myMarshaller;
+    ActiveMQTempQueue myCommand;
+    ActiveMQTempQueue* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQTempQueue*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempQueueMarshallerTest::testLooseMarshal() {
+
+    ActiveMQTempQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQTempQueue outCommand;
+    ActiveMQTempQueue inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempQueueMarshallerTest::testTightMarshal() {
+
+    ActiveMQTempQueueMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQTempQueue outCommand;
+    ActiveMQTempQueue inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempQueueMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQTEMPQUEUEMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQTEMPQUEUEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQTempQueueMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQTempQueueMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQTempQueueMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQTempQueueMarshallerTest() {}
+        virtual ~ActiveMQTempQueueMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQTEMPQUEUEMARSHALLERTEST_H_*/
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.cpp?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.cpp Tue Oct 23 11:21:35 2007
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.h>
+
+#include <activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshaller.h>
+#include <activemq/connector/openwire/commands/ActiveMQTempTopic.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::v2::ActiveMQTempTopicMarshallerTest );
+
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
+#include <activemq/io/IOException.h>
+#include <activemq/connector/openwire/OpenWireFormat.h>
+#include <activemq/connector/openwire/commands/DataStructure.h>
+#include <activemq/connector/openwire/utils/BooleanStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/util/Properties.h>
+//
+//     NOTE!: This file is autogenerated - do not modify!
+//            if you need to make a change, please see the Java Classes in the
+//            activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::io;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+using namespace activemq::connector::openwire::commands;
+using namespace activemq::connector::openwire::marshal;
+using namespace activemq::connector::openwire::utils;
+using namespace activemq::connector::openwire::marshal::v2;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempTopicMarshallerTest::test() {
+
+    ActiveMQTempTopicMarshaller myMarshaller;
+    ActiveMQTempTopic myCommand;
+    ActiveMQTempTopic* myCommand2;
+
+    CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+    myCommand2 = dynamic_cast<ActiveMQTempTopic*>( myMarshaller.createObject() );
+    CPPUNIT_ASSERT( myCommand2 != NULL );
+    delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempTopicMarshallerTest::testLooseMarshal() {
+
+    ActiveMQTempTopicMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( false );
+
+    ActiveMQTempTopic outCommand;
+    ActiveMQTempTopic inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQTempTopicMarshallerTest::testTightMarshal() {
+
+    ActiveMQTempTopicMarshaller marshaller;
+    Properties props;
+    OpenWireFormat openWireFormat( props );
+
+    // Configure for this test.
+    openWireFormat.setVersion( 2 );
+    openWireFormat.setTightEncodingEnabled( true );
+
+    ActiveMQTempTopic outCommand;
+    ActiveMQTempTopic inCommand;
+
+    try {
+
+        // Marshal the dataStructure to a byte array.
+        ByteArrayOutputStream baos;
+        DataOutputStream dataOut( &baos );
+        // Phase 1 - count the size
+        int size = 1;
+        BooleanStream bs;
+        size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+        size += bs.marshalledSize();
+        // Phase 2 - marshal
+        dataOut.writeByte( outCommand.getDataStructureType() );
+        bs.marshal( &dataOut );
+        marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+        // Now read it back in and make sure it's all right.
+        ByteArrayInputStream bais( baos.getByteArray(), baos.getByteArraySize() );
+        DataInputStream dataIn( &bais );
+
+        unsigned char dataType = dataIn.readByte();
+        CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+        bs.clear();
+        bs.unmarshal( &dataIn );
+        marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+        CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+    } catch( ActiveMQException& e ) {
+        e.printStackTrace();
+        CPPUNIT_ASSERT( false );
+    } catch( ... ) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+

Added: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.h?rev=587587&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/v2/ActiveMQTempTopicMarshallerTest.h Tue Oct 23 11:21:35 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQTEMPTOPICMARSHALLERTEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQTEMPTOPICMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+namespace v2{
+
+    /**
+     * Marshalling Test code for Open Wire Format for ActiveMQTempTopicMarshallerTest
+     *
+     *  NOTE!: This file is autogenerated - do not modify!
+     *         if you need to make a change, please see the Java Classes
+     *         in the activemq-openwire-generator module
+     */
+    class ActiveMQTempTopicMarshallerTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ActiveMQTempTopicMarshallerTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( testLooseMarshal );
+        CPPUNIT_TEST( testTightMarshal );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        ActiveMQTempTopicMarshallerTest() {}
+        virtual ~ActiveMQTempTopicMarshallerTest() {}
+
+        /**
+         * Test the marshaller and its marshalled type.
+         */
+        virtual void test();
+        virtual void testLooseMarshal();
+        virtual void testTightMarshal();
+
+    };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V2_ACTIVEMQTEMPTOPICMARSHALLERTEST_H_*/
+