You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/10/03 15:12:38 UTC
svn commit: r452477 [1/2] - in /incubator/tuscany/cpp/sca/test:
ws.binding.service/ws.binding.service/
ws.service.interop/ws.service.interop.client/
ws.service.interop/ws.service.interop/
Author: robbinspg
Date: Tue Oct 3 06:12:37 2006
New Revision: 452477
URL: http://svn.apache.org/viewvc?view=rev&rev=452477
Log:
Update svn-properties
Modified:
incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/Test.h (contents, props changed)
incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp (contents, props changed)
incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.h (contents, props changed)
incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp (contents, props changed)
incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/Test.h (contents, props changed)
incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp (contents, props changed)
incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.h (contents, props changed)
Modified: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/Test.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/Test.h?view=diff&rev=452477&r1=452476&r2=452477
==============================================================================
--- incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/Test.h (original)
+++ incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/Test.h Tue Oct 3 06:12:37 2006
@@ -1,50 +1,50 @@
-/*
-+----------------------------------------------------------------------+
-| |
-| Licensed under the Apache License, Version 2.0 (the "License"); you |
-| may not use this file except in compliance with the License. You may |
-| obtain a copy of the License at |
-| http://www.apache.org/licenses/LICENSE-2.0 |
-| |
-| Unless required by applicable law or agreed to in writing, software |
-| distributed under the License is distributed on an "AS IS" BASIS, |
-| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
-| implied. See the License for the specific language governing |
-| permissions and limitations under the License. |
-+----------------------------------------------------------------------+
-*/
-
-#ifndef TEST_H
-#define TEST_H
-
-#include <commonj/sdo/SDO.h>
-#include <stdio.h>
-
-class Test
-{
-public:
- virtual char* doChars(char* arg1) = 0;
- virtual long doLong(long arg1) = 0;
- virtual int doInt(int arg1) = 0;
- virtual float doFloat(float arg1) = 0;
- virtual long double doLongDouble(long double arg1) = 0;
- virtual double doDouble(double arg1) = 0;
- virtual bool doBool(bool arg1) = 0;
- virtual short doShort(short arg1) = 0;
- virtual char* doBytes(char* arg1) = 0;
- virtual char doByte(char arg1) = 0;
- virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) = 0;
- virtual DataObjectPtr doDataObject(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr doAny(DataObjectPtr arg1) = 0;
-// These don't work because they are passing pointers around
-// virtual int[] doIntArray(int[] arg1, int arg2);
-// virtual string doString(string arg1);
-// This doesn't work because there is no mapping from XSD types to SDO CharacterType
-// virtual wchar_t doWChar(wchar_t arg1);
-// This doesn't work because Operation does not support int64_t yet
-// virtual int64_t doInt64(int64_t arg1);
-};
-
-#endif
-
-
+/*
++----------------------------------------------------------------------+
+| |
+| Licensed under the Apache License, Version 2.0 (the "License"); you |
+| may not use this file except in compliance with the License. You may |
+| obtain a copy of the License at |
+| http://www.apache.org/licenses/LICENSE-2.0 |
+| |
+| Unless required by applicable law or agreed to in writing, software |
+| distributed under the License is distributed on an "AS IS" BASIS, |
+| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
+| implied. See the License for the specific language governing |
+| permissions and limitations under the License. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef TEST_H
+#define TEST_H
+
+#include <commonj/sdo/SDO.h>
+#include <stdio.h>
+
+class Test
+{
+public:
+ virtual char* doChars(char* arg1) = 0;
+ virtual long doLong(long arg1) = 0;
+ virtual int doInt(int arg1) = 0;
+ virtual float doFloat(float arg1) = 0;
+ virtual long double doLongDouble(long double arg1) = 0;
+ virtual double doDouble(double arg1) = 0;
+ virtual bool doBool(bool arg1) = 0;
+ virtual short doShort(short arg1) = 0;
+ virtual char* doBytes(char* arg1) = 0;
+ virtual char doByte(char arg1) = 0;
+ virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) = 0;
+ virtual DataObjectPtr doDataObject(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr doAny(DataObjectPtr arg1) = 0;
+// These don't work because they are passing pointers around
+// virtual int[] doIntArray(int[] arg1, int arg2);
+// virtual string doString(string arg1);
+// This doesn't work because there is no mapping from XSD types to SDO CharacterType
+// virtual wchar_t doWChar(wchar_t arg1);
+// This doesn't work because Operation does not support int64_t yet
+// virtual int64_t doInt64(int64_t arg1);
+};
+
+#endif
+
+
Propchange: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/Test.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/Test.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp?view=diff&rev=452477&r1=452476&r2=452477
==============================================================================
--- incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp (original)
+++ incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp Tue Oct 3 06:12:37 2006
@@ -1,158 +1,158 @@
-/*
-+----------------------------------------------------------------------+
-| (c) Copyright IBM Corporation 2005. |
-| All Rights Reserved. |
-+----------------------------------------------------------------------+
-| |
-| Licensed under the Apache License, Version 2.0 (the "License"); you |
-| may not use this file except in compliance with the License. You may |
-| obtain a copy of the License at |
-| http://www.apache.org/licenses/LICENSE-2.0 |
-| |
-| Unless required by applicable law or agreed to in writing, software |
-| distributed under the License is distributed on an "AS IS" BASIS, |
-| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
-| implied. See the License for the specific language governing |
-| permissions and limitations under the License. |
-+----------------------------------------------------------------------+
-*/
-
-#include "TestImpl.h"
-#include <stdio.h>
-#include <tuscany/sca/util/Utils.h>
-using namespace tuscany::sca;
-#include <commonj/sdo/SDO.h>
-#include <sdo_axiom.h>
-using namespace commonj::sdo;
-using namespace commonj::sdo_axiom;
-
-TestImpl::TestImpl()
-{
-}
-
-TestImpl::~TestImpl()
-{
-}
-
-char* TestImpl::doChars(char* arg1)
-{
- printf("TestImpl::doChars %s\n", arg1);
- return arg1;
-}
-
-
-long TestImpl::doLong(long arg1)
-{
- printf("TestImpl::doLong %d\n", arg1);
- return arg1;
-}
-
-int TestImpl::doInt(int arg1)
-{
- printf("TestImpl::doInt %d\n", arg1);
- return arg1;
-}
-
-float TestImpl::doFloat(float arg1)
-{
- printf("TestImpl::doFloat %f\n", arg1);
- return arg1;
-}
-
-long double TestImpl::doLongDouble(long double arg1)
-{
- printf("TestImpl::doLongDouble %f\n", arg1);
- return arg1;
-}
-
-double TestImpl::doDouble(double arg1)
-{
- printf("TestImpl::doDouble %f\n", arg1);
- return arg1;
-}
-
-
-bool TestImpl::doBool(bool arg1)
-{
- printf("TestImpl::doBool %d\n", arg1);
- return arg1;
-}
-
-short TestImpl::doShort(short arg1)
-{
- printf("TestImpl::doShort %d\n", arg1);
- return arg1;
-}
-
-char* TestImpl::doBytes(char* arg1)
-{
- printf("TestImpl::doBytes %s\n", arg1);
- return arg1;
-}
-
-char TestImpl::doByte(char arg1)
-{
- printf("TestImpl::doByte %c\n", arg1);
- return arg1;
-}
-
-DataObjectPtr TestImpl::doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5)
-{
- printf("TestImpl::doMixed %s %d %s %d %d\n", arg1, arg2, arg3->getType().getURI(), arg4, arg5);
- Utils::printDO(arg3);
- return arg3;
-}
-
-DataObjectPtr TestImpl::doDataObject(DataObjectPtr arg1)
-{
- printf("TestImpl::doDataObject %s\n", arg1->getType().getURI());
- Utils::printDO(arg1);
- return arg1;
-}
-
-DataObjectPtr TestImpl::doAny(DataObjectPtr arg1)
-{
- printf("TestImpl::doAny %s#%s\n", arg1->getType().getURI(), arg1->getType().getName());
- Utils::printDO(arg1);
- //return arg1;
-
- DataFactoryPtr factory = arg1->getDataFactory();
- DataObjectPtr data = factory->create(Type::SDOTypeNamespaceURI, "OpenDataObject");
- data->setCString("stringData", "Here is some string data");
- data->setBoolean("boolData", true);
- DataObjectList& list = data->getList("intDataList");
- list.append((long)123456789);
- list.append((long)111111111);
- list.append((long)222222222);
- Utils::printDO(data);
- return data;
-}
-
-//int[] TestImpl::doIntArray(int[] arg1, int arg2)
-//{
-// printf("TestImpl::doIntArray with length %d\n", arg2);
-// for(int i=0; i<arg2; i++)
-// {
-// printf("%d\n", arg1[i]);
-// }
-// return arg1;
-//}
-//
-//string TestImpl::doString(string arg1)
-//{
-// printf("TestImpl::doString %s\n", arg1.c_str());
-// return arg1;
-//}
-//
-//wchar_t TestImpl::doWChar(wchar_t arg1)
-//{
-// printf("TestImpl::doWChar %s\n", arg1);
-// return arg1;
-//}
-//
-//int64_t TestImpl::doInt64(int64_t arg1)
-//{
-// printf("TestImpl::doInt64 %d\n", arg1);
-// return arg1;
-//}
-
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| Licensed under the Apache License, Version 2.0 (the "License"); you |
+| may not use this file except in compliance with the License. You may |
+| obtain a copy of the License at |
+| http://www.apache.org/licenses/LICENSE-2.0 |
+| |
+| Unless required by applicable law or agreed to in writing, software |
+| distributed under the License is distributed on an "AS IS" BASIS, |
+| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
+| implied. See the License for the specific language governing |
+| permissions and limitations under the License. |
++----------------------------------------------------------------------+
+*/
+
+#include "TestImpl.h"
+#include <stdio.h>
+#include <tuscany/sca/util/Utils.h>
+using namespace tuscany::sca;
+#include <commonj/sdo/SDO.h>
+#include <sdo_axiom.h>
+using namespace commonj::sdo;
+using namespace commonj::sdo_axiom;
+
+TestImpl::TestImpl()
+{
+}
+
+TestImpl::~TestImpl()
+{
+}
+
+char* TestImpl::doChars(char* arg1)
+{
+ printf("TestImpl::doChars %s\n", arg1);
+ return arg1;
+}
+
+
+long TestImpl::doLong(long arg1)
+{
+ printf("TestImpl::doLong %d\n", arg1);
+ return arg1;
+}
+
+int TestImpl::doInt(int arg1)
+{
+ printf("TestImpl::doInt %d\n", arg1);
+ return arg1;
+}
+
+float TestImpl::doFloat(float arg1)
+{
+ printf("TestImpl::doFloat %f\n", arg1);
+ return arg1;
+}
+
+long double TestImpl::doLongDouble(long double arg1)
+{
+ printf("TestImpl::doLongDouble %f\n", arg1);
+ return arg1;
+}
+
+double TestImpl::doDouble(double arg1)
+{
+ printf("TestImpl::doDouble %f\n", arg1);
+ return arg1;
+}
+
+
+bool TestImpl::doBool(bool arg1)
+{
+ printf("TestImpl::doBool %d\n", arg1);
+ return arg1;
+}
+
+short TestImpl::doShort(short arg1)
+{
+ printf("TestImpl::doShort %d\n", arg1);
+ return arg1;
+}
+
+char* TestImpl::doBytes(char* arg1)
+{
+ printf("TestImpl::doBytes %s\n", arg1);
+ return arg1;
+}
+
+char TestImpl::doByte(char arg1)
+{
+ printf("TestImpl::doByte %c\n", arg1);
+ return arg1;
+}
+
+DataObjectPtr TestImpl::doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5)
+{
+ printf("TestImpl::doMixed %s %d %s %d %d\n", arg1, arg2, arg3->getType().getURI(), arg4, arg5);
+ Utils::printDO(arg3);
+ return arg3;
+}
+
+DataObjectPtr TestImpl::doDataObject(DataObjectPtr arg1)
+{
+ printf("TestImpl::doDataObject %s\n", arg1->getType().getURI());
+ Utils::printDO(arg1);
+ return arg1;
+}
+
+DataObjectPtr TestImpl::doAny(DataObjectPtr arg1)
+{
+ printf("TestImpl::doAny %s#%s\n", arg1->getType().getURI(), arg1->getType().getName());
+ Utils::printDO(arg1);
+ //return arg1;
+
+ DataFactoryPtr factory = arg1->getDataFactory();
+ DataObjectPtr data = factory->create(Type::SDOTypeNamespaceURI, "OpenDataObject");
+ data->setCString("stringData", "Here is some string data");
+ data->setBoolean("boolData", true);
+ DataObjectList& list = data->getList("intDataList");
+ list.append((long)123456789);
+ list.append((long)111111111);
+ list.append((long)222222222);
+ Utils::printDO(data);
+ return data;
+}
+
+//int[] TestImpl::doIntArray(int[] arg1, int arg2)
+//{
+// printf("TestImpl::doIntArray with length %d\n", arg2);
+// for(int i=0; i<arg2; i++)
+// {
+// printf("%d\n", arg1[i]);
+// }
+// return arg1;
+//}
+//
+//string TestImpl::doString(string arg1)
+//{
+// printf("TestImpl::doString %s\n", arg1.c_str());
+// return arg1;
+//}
+//
+//wchar_t TestImpl::doWChar(wchar_t arg1)
+//{
+// printf("TestImpl::doWChar %s\n", arg1);
+// return arg1;
+//}
+//
+//int64_t TestImpl::doInt64(int64_t arg1)
+//{
+// printf("TestImpl::doInt64 %d\n", arg1);
+// return arg1;
+//}
+
Propchange: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.h?view=diff&rev=452477&r1=452476&r2=452477
==============================================================================
--- incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.h (original)
+++ incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.h Tue Oct 3 06:12:37 2006
@@ -1,54 +1,54 @@
-/*
-+----------------------------------------------------------------------+
-| |
-| Licensed under the Apache License, Version 2.0 (the "License"); you |
-| may not use this file except in compliance with the License. You may |
-| obtain a copy of the License at |
-| http://www.apache.org/licenses/LICENSE-2.0 |
-| |
-| Unless required by applicable law or agreed to in writing, software |
-| distributed under the License is distributed on an "AS IS" BASIS, |
-| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
-| implied. See the License for the specific language governing |
-| permissions and limitations under the License. |
-+----------------------------------------------------------------------+
-*/
-
-#ifndef TESTIMPL_H
-#define TESTIMPL_H
-
-#include "Test.h"
-
-class TestImpl : public Test
-{
-public:
- TestImpl();
- virtual ~TestImpl();
-
- // WSCompositeServiceTest interface
- virtual char* doChars(char* arg1);
- virtual long doLong(long arg1);
- virtual int doInt(int arg1);
- virtual float doFloat(float arg1);
- virtual long double doLongDouble(long double arg1);
- virtual double doDouble(double arg1);
- virtual bool doBool(bool arg1);
- virtual short doShort(short arg1);
- virtual char* doBytes(char* arg1);
- virtual char doByte(char arg1);
- virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5);
- virtual DataObjectPtr doDataObject(DataObjectPtr arg1);
- virtual DataObjectPtr doAny(DataObjectPtr arg1);
-
-// These don't work because they are passing pointers around
-// virtual int[] doIntArray(int[] arg1, int arg2);
-// virtual string doString(string arg1);
-// This doesn't work because there is no mapping from XSD types to SDO CharacterType
-// virtual wchar_t doWChar(wchar_t arg1);
-// This doesn't work because Operation does not support int64_t yet
-// virtual int64_t doInt64(int64_t arg1);
-
-};
-
-#endif
-
+/*
++----------------------------------------------------------------------+
+| |
+| Licensed under the Apache License, Version 2.0 (the "License"); you |
+| may not use this file except in compliance with the License. You may |
+| obtain a copy of the License at |
+| http://www.apache.org/licenses/LICENSE-2.0 |
+| |
+| Unless required by applicable law or agreed to in writing, software |
+| distributed under the License is distributed on an "AS IS" BASIS, |
+| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
+| implied. See the License for the specific language governing |
+| permissions and limitations under the License. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef TESTIMPL_H
+#define TESTIMPL_H
+
+#include "Test.h"
+
+class TestImpl : public Test
+{
+public:
+ TestImpl();
+ virtual ~TestImpl();
+
+ // WSCompositeServiceTest interface
+ virtual char* doChars(char* arg1);
+ virtual long doLong(long arg1);
+ virtual int doInt(int arg1);
+ virtual float doFloat(float arg1);
+ virtual long double doLongDouble(long double arg1);
+ virtual double doDouble(double arg1);
+ virtual bool doBool(bool arg1);
+ virtual short doShort(short arg1);
+ virtual char* doBytes(char* arg1);
+ virtual char doByte(char arg1);
+ virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5);
+ virtual DataObjectPtr doDataObject(DataObjectPtr arg1);
+ virtual DataObjectPtr doAny(DataObjectPtr arg1);
+
+// These don't work because they are passing pointers around
+// virtual int[] doIntArray(int[] arg1, int arg2);
+// virtual string doString(string arg1);
+// This doesn't work because there is no mapping from XSD types to SDO CharacterType
+// virtual wchar_t doWChar(wchar_t arg1);
+// This doesn't work because Operation does not support int64_t yet
+// virtual int64_t doInt64(int64_t arg1);
+
+};
+
+#endif
+
Propchange: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/test/ws.binding.service/ws.binding.service/TestImpl.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp?view=diff&rev=452477&r1=452476&r2=452477
==============================================================================
--- incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp (original)
+++ incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp Tue Oct 3 06:12:37 2006
@@ -1,375 +1,375 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <axiom.h>
-#include <axis2_util.h>
-#include <axiom_soap.h>
-#include <axis2_client.h>
-
-#include <commonj/sdo/SDO.h>
-using namespace commonj::sdo;
-
-#include <sdo_axiom.h>
-using namespace commonj::sdo_axiom;
-
-#include <tuscany/sca/util/Utils.h>
-using namespace tuscany::sca;
-
-#include <string>
-#include <iostream>
-using namespace std;
-
-axiom_node_t* get_om_payload_from_xml_file(axis2_env_t *env, const char* currentTest);
-axiom_node_t* runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload);
-void loadAllXSD();
-bool compareAxiomNodes(axiom_node_t* returned_payload, axiom_node_t* payload_data);
-
-XSDHelperPtr xsdHelper = NULL;
-XMLHelperPtr xmlHelper = NULL;
-
-
-int main(int argc, char** argv)
-{
- axis2_env_t *env = NULL;
- axis2_char_t *address = NULL;
- axis2_char_t *testNumberString = "-1";
-
- axis2_endpoint_ref_t* endpoint_ref = NULL;
- axis2_options_t *options = NULL;
- axis2_char_t *client_home = NULL;
- axis2_svc_client_t* svc_client = NULL;
- axiom_node_t *payload = NULL;
- axiom_node_t *ret_node = NULL;
-
- /* Set up the envioronment */
- env = axis2_env_create_all("ws.service.interop.client.log", AXIS2_LOG_LEVEL_TRACE);
-
- /* Set end point reference of echo service */
- address = "http://localhost:9090/axis2/services/ws.service";
- if (argc > 1 )
- testNumberString = argv[1];
- if (argc > 2 )
- address = argv[2];
- if (AXIS2_STRCMP(testNumberString, "-h") == 0)
- {
- cout<<"Usage : "<< argv[0] <<"[test_number] [endpoint_url]"<<endl;
- cout<<"use -h for help"<<endl;
- return 0;
- }
-
- int testNumber = atoi(testNumberString);
- if(testNumber > 0 && testNumber <= 50)
- {
- cout<<"Running test : "<< testNumber << endl;
- }
- else
- {
- testNumber = -1;
- cout<<"Running all tests" << endl;
- }
-
- cout<<"Using endpoint : "<< address << endl;
-
- const string interop = "interop";
-
- string currentTest;
-
- int testsPassed = 0;
- int testsRun = 0;
- string failedTests = "";
- string unsupportedTests = "";
-
- loadAllXSD();
-
- // Tests 1 to 50
- for(int i=1; i<=50; i++)
- {
- if( testNumber != i &&
- testNumber > 0 )
- {
- // Only running a single, chosen test
- continue;
- }
- if( i==13 ||
- i==48 ||
- i==49 )
- {
- // Ignore non-existant schemas
- continue;
- }
-
- currentTest = interop;
- if(i<10)
- {
- currentTest.append("0");
- }
- char buf[3];
- sprintf(buf, "%d", i);
- currentTest.append(buf);
-
- cout << "Running test " << currentTest << endl;
-
- if( i==5 ||
- i==25 ||
- i==27 ||
- i==39 )
- {
- cout << "We do not currently support schema " << currentTest << endl;
- unsupportedTests += currentTest + " ";
- continue;
- }
-
- testsRun++;
-
- payload = get_om_payload_from_xml_file(env, currentTest.c_str());
- axiom_node_t* returned_payload = NULL;
- bool success = false;
- if(payload)
- {
- returned_payload = runCall(env, address, (char*) currentTest.c_str(), payload);
- }
-
- if(returned_payload)
- {
- // Get the inner node to compare
- axiom_node_t* payload_data = AXIOM_NODE_GET_FIRST_CHILD(payload, env);
- success = compareAxiomNodes(returned_payload, payload_data);
- }
-
- if(success)
- {
- cout << currentTest << " PASSED!" << endl;
- testsPassed++;
- }
- else
- {
- failedTests += currentTest + " ";
- cout << currentTest << " FAILED!" << endl;
- }
-
- }
- cout << "Passed " << testsPassed << " of " << testsRun << " tests" << endl;
- if(failedTests.size() > 0)
- {
- string expectedFailedTests = "interop04 interop28 interop30 interop32 interop33 interop40 interop50";
- cout << " Failed Tests: " << failedTests << endl;
- cout << "Expected failures: " << expectedFailedTests << endl;
- }
- if(unsupportedTests.size() > 0)
- {
- cout << "Unsupported: " << unsupportedTests << endl;
- }
- return 0;
-}
-
-axiom_node_t* runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload)
-{
- axis2_char_t *address = endpoint;
- axis2_endpoint_ref_t* endpoint_ref = NULL;
- axis2_options_t *options = NULL;
- axis2_char_t *client_home = NULL;
- axis2_svc_client_t* svc_client = NULL;
- axiom_node_t *ret_node = NULL;
- axiom_node_t *ret = NULL;
- char action [100];
- int len = 0;
-
- client_home = AXIS2_GETENV("AXIS2C_HOME");
-
- /* Create EPR with given address */
- endpoint_ref = axis2_endpoint_ref_create(env, address);
-
- svc_client = axis2_svc_client_create(env, client_home);
- if (!svc_client)
- {
- printf("Error creating service client\n");
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return NULL;
- }
-
- options = axis2_options_create(env);
-
- AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
-
- len = sprintf(action, "http://www.WSEntryPointTest.org/WSEntryPointTest/%s", opName);
- AXIS2_OPTIONS_SET_ACTION(options, env, action);
-
- /* Set service client options */
- AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options);
-
- /* Engage addressing composite */
- AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);
-
-
- /* Send request */
- ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
- if(ret_node)
- {
- ret = AXIOM_NODE_GET_FIRST_CHILD(ret_node, env);
- if(!ret)
- {
- cout << "No data in response - failure on server" << endl;
- }
- }
- else
- {
- cout << "request failed" << endl;
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- }
-
- if (svc_client)
- {
- AXIS2_SVC_CLIENT_FREE(svc_client, env);
- svc_client = NULL;
- }
- if (endpoint_ref)
- {
- // The following line is commented out due to it causing a segmentation fault on Linux with Axis2C 0.93
- // AXIS2_ENDPOINT_REF_FREE(endpoint_ref, env);
- endpoint_ref = NULL;
- }
-
- return ret;
-}
-
-
-bool compareAxiomNodes(axiom_node_t* returned_payload, axiom_node_t* expected_payload)
-{
- bool success = false;
-
- AxiomHelper* axiomHelper = AxiomHelper::getHelper();
- DataObjectPtr expectedDO = axiomHelper->toSdo(expected_payload, xsdHelper->getDataFactory());
- DataObjectPtr returnedDO = axiomHelper->toSdo(returned_payload, xsdHelper->getDataFactory());
-
- string diff;
- success = Utils::compareDataObjects(expectedDO, returnedDO, diff);
-
- if(!success)
- {
- cout << "Expected data does not match returned data:\n" << diff << "\nExpected data:"<<endl;
- Utils::printDO(expectedDO);
- cout << "Returned data:"<<endl;
- Utils::printDO(returnedDO);
- }
- return success;
-}
-
-void loadAllXSD()
-{
- const string resourcesDir = "./resources/";
- const string dotxsd = ".xsd";
-
- try
- {
- // Create an xsd helper
- xsdHelper = HelperProvider::getXSDHelper();
-
- // Tests 1 to 50
- for(int i=1; i<=50; i++)
- {
- if( i==13 ||
- i==48 ||
- i==49 ||
- i==5 ||
- i==25 ||
- i==27 ||
- i==39 )
- {
- // Ignore non-existant/unsupported schemas
- continue;
- }
-
- string currentTest = "interop";
- if(i<10)
- {
- currentTest.append("0");
- }
- char buf[3];
- sprintf(buf, "%d", i);
- currentTest.append(buf);
-
- string xsdFileName = resourcesDir + currentTest + dotxsd;
- xsdHelper->defineFile(xsdFileName.c_str());
- }
-
- }
- catch(SDORuntimeException& ex)
- {
- cout << "SDORuntimeException whilst loading xsd" << endl;
- cout << ex.getMessageText() << endl;
- }
-}
-
-/* build SOAP request message content using OM */
-axiom_node_t* get_om_payload_from_xml_file(axis2_env_t *env, const char* currentTest)
-{
- axiom_node_t* req_om_node = NULL;
- axiom_node_t* payload_om_node = NULL;
- const string resourcesDir = "./resources/";
- const string dotxml = "-in.xml";
-
- string xmlFileName = resourcesDir + currentTest + dotxml;
-
- try
- {
-
- xmlHelper = HelperProvider::getXMLHelper(xsdHelper->getDataFactory());
-
- XMLDocumentPtr payloadFile = xmlHelper->loadFile(xmlFileName.c_str());
- string rootElemURI = payloadFile->getRootElementURI();
- string rootElemName = payloadFile->getRootElementName();
-
- DataObjectPtr payloadDO = payloadFile->getRootDataObject();
-
- AxiomHelper* axiomHelper = AxiomHelper::getHelper();
- payload_om_node = axiomHelper->toAxiomNode(payloadDO, rootElemURI.c_str(), rootElemName.c_str());
-
- if(!payload_om_node)
- {
- payload_om_node = axiomHelper->toAxiomNode(payloadDO);
- }
-
- if(payload_om_node)
- {
- axiom_element_t* req_om_elem = NULL;
- axiom_namespace_t *ns1 = NULL;
- axis2_char_t *om_str = NULL;
-
- ns1 = axiom_namespace_create (env, "http://www.apache.org/tuscany/interop", "ns1");
- req_om_elem = axiom_element_create(env, NULL, currentTest, ns1, &req_om_node);
- AXIOM_NODE_DETACH(payload_om_node, env);
- AXIOM_NODE_ADD_CHILD(req_om_node, env, payload_om_node);
- }
- else
- {
- cout << "Could not convert xml document("<< xmlFileName <<") to Axiom" << endl;
- return NULL;
- }
-
- }
- catch(SDORuntimeException& ex)
- {
- cout << "SDORuntimeException whilst loading xml ("<< xmlFileName <<") & converting to Axiom" << endl;
- cout << ex.getMessageText() << endl;
- return NULL;
- }
-
- return req_om_node;
-}
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axiom.h>
+#include <axis2_util.h>
+#include <axiom_soap.h>
+#include <axis2_client.h>
+
+#include <commonj/sdo/SDO.h>
+using namespace commonj::sdo;
+
+#include <sdo_axiom.h>
+using namespace commonj::sdo_axiom;
+
+#include <tuscany/sca/util/Utils.h>
+using namespace tuscany::sca;
+
+#include <string>
+#include <iostream>
+using namespace std;
+
+axiom_node_t* get_om_payload_from_xml_file(axis2_env_t *env, const char* currentTest);
+axiom_node_t* runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload);
+void loadAllXSD();
+bool compareAxiomNodes(axiom_node_t* returned_payload, axiom_node_t* payload_data);
+
+XSDHelperPtr xsdHelper = NULL;
+XMLHelperPtr xmlHelper = NULL;
+
+
+int main(int argc, char** argv)
+{
+ axis2_env_t *env = NULL;
+ axis2_char_t *address = NULL;
+ axis2_char_t *testNumberString = "-1";
+
+ axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_options_t *options = NULL;
+ axis2_char_t *client_home = NULL;
+ axis2_svc_client_t* svc_client = NULL;
+ axiom_node_t *payload = NULL;
+ axiom_node_t *ret_node = NULL;
+
+ /* Set up the envioronment */
+ env = axis2_env_create_all("ws.service.interop.client.log", AXIS2_LOG_LEVEL_TRACE);
+
+ /* Set end point reference of echo service */
+ address = "http://localhost:9090/axis2/services/ws.service";
+ if (argc > 1 )
+ testNumberString = argv[1];
+ if (argc > 2 )
+ address = argv[2];
+ if (AXIS2_STRCMP(testNumberString, "-h") == 0)
+ {
+ cout<<"Usage : "<< argv[0] <<"[test_number] [endpoint_url]"<<endl;
+ cout<<"use -h for help"<<endl;
+ return 0;
+ }
+
+ int testNumber = atoi(testNumberString);
+ if(testNumber > 0 && testNumber <= 50)
+ {
+ cout<<"Running test : "<< testNumber << endl;
+ }
+ else
+ {
+ testNumber = -1;
+ cout<<"Running all tests" << endl;
+ }
+
+ cout<<"Using endpoint : "<< address << endl;
+
+ const string interop = "interop";
+
+ string currentTest;
+
+ int testsPassed = 0;
+ int testsRun = 0;
+ string failedTests = "";
+ string unsupportedTests = "";
+
+ loadAllXSD();
+
+ // Tests 1 to 50
+ for(int i=1; i<=50; i++)
+ {
+ if( testNumber != i &&
+ testNumber > 0 )
+ {
+ // Only running a single, chosen test
+ continue;
+ }
+ if( i==13 ||
+ i==48 ||
+ i==49 )
+ {
+ // Ignore non-existant schemas
+ continue;
+ }
+
+ currentTest = interop;
+ if(i<10)
+ {
+ currentTest.append("0");
+ }
+ char buf[3];
+ sprintf(buf, "%d", i);
+ currentTest.append(buf);
+
+ cout << "Running test " << currentTest << endl;
+
+ if( i==5 ||
+ i==25 ||
+ i==27 ||
+ i==39 )
+ {
+ cout << "We do not currently support schema " << currentTest << endl;
+ unsupportedTests += currentTest + " ";
+ continue;
+ }
+
+ testsRun++;
+
+ payload = get_om_payload_from_xml_file(env, currentTest.c_str());
+ axiom_node_t* returned_payload = NULL;
+ bool success = false;
+ if(payload)
+ {
+ returned_payload = runCall(env, address, (char*) currentTest.c_str(), payload);
+ }
+
+ if(returned_payload)
+ {
+ // Get the inner node to compare
+ axiom_node_t* payload_data = AXIOM_NODE_GET_FIRST_CHILD(payload, env);
+ success = compareAxiomNodes(returned_payload, payload_data);
+ }
+
+ if(success)
+ {
+ cout << currentTest << " PASSED!" << endl;
+ testsPassed++;
+ }
+ else
+ {
+ failedTests += currentTest + " ";
+ cout << currentTest << " FAILED!" << endl;
+ }
+
+ }
+ cout << "Passed " << testsPassed << " of " << testsRun << " tests" << endl;
+ if(failedTests.size() > 0)
+ {
+ string expectedFailedTests = "interop04 interop28 interop30 interop32 interop33 interop40 interop50";
+ cout << " Failed Tests: " << failedTests << endl;
+ cout << "Expected failures: " << expectedFailedTests << endl;
+ }
+ if(unsupportedTests.size() > 0)
+ {
+ cout << "Unsupported: " << unsupportedTests << endl;
+ }
+ return 0;
+}
+
+axiom_node_t* runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload)
+{
+ axis2_char_t *address = endpoint;
+ axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_options_t *options = NULL;
+ axis2_char_t *client_home = NULL;
+ axis2_svc_client_t* svc_client = NULL;
+ axiom_node_t *ret_node = NULL;
+ axiom_node_t *ret = NULL;
+ char action [100];
+ int len = 0;
+
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+
+ /* Create EPR with given address */
+ endpoint_ref = axis2_endpoint_ref_create(env, address);
+
+ svc_client = axis2_svc_client_create(env, client_home);
+ if (!svc_client)
+ {
+ printf("Error creating service client\n");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
+ " %d :: %s", env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ return NULL;
+ }
+
+ options = axis2_options_create(env);
+
+ AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+
+ len = sprintf(action, "http://www.WSEntryPointTest.org/WSEntryPointTest/%s", opName);
+ AXIS2_OPTIONS_SET_ACTION(options, env, action);
+
+ /* Set service client options */
+ AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options);
+
+ /* Engage addressing composite */
+ AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);
+
+
+ /* Send request */
+ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
+ if(ret_node)
+ {
+ ret = AXIOM_NODE_GET_FIRST_CHILD(ret_node, env);
+ if(!ret)
+ {
+ cout << "No data in response - failure on server" << endl;
+ }
+ }
+ else
+ {
+ cout << "request failed" << endl;
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
+ " %d :: %s", env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ }
+
+ if (svc_client)
+ {
+ AXIS2_SVC_CLIENT_FREE(svc_client, env);
+ svc_client = NULL;
+ }
+ if (endpoint_ref)
+ {
+ // The following line is commented out due to it causing a segmentation fault on Linux with Axis2C 0.93
+ // AXIS2_ENDPOINT_REF_FREE(endpoint_ref, env);
+ endpoint_ref = NULL;
+ }
+
+ return ret;
+}
+
+
+bool compareAxiomNodes(axiom_node_t* returned_payload, axiom_node_t* expected_payload)
+{
+ bool success = false;
+
+ AxiomHelper* axiomHelper = AxiomHelper::getHelper();
+ DataObjectPtr expectedDO = axiomHelper->toSdo(expected_payload, xsdHelper->getDataFactory());
+ DataObjectPtr returnedDO = axiomHelper->toSdo(returned_payload, xsdHelper->getDataFactory());
+
+ string diff;
+ success = Utils::compareDataObjects(expectedDO, returnedDO, diff);
+
+ if(!success)
+ {
+ cout << "Expected data does not match returned data:\n" << diff << "\nExpected data:"<<endl;
+ Utils::printDO(expectedDO);
+ cout << "Returned data:"<<endl;
+ Utils::printDO(returnedDO);
+ }
+ return success;
+}
+
+void loadAllXSD()
+{
+ const string resourcesDir = "./resources/";
+ const string dotxsd = ".xsd";
+
+ try
+ {
+ // Create an xsd helper
+ xsdHelper = HelperProvider::getXSDHelper();
+
+ // Tests 1 to 50
+ for(int i=1; i<=50; i++)
+ {
+ if( i==13 ||
+ i==48 ||
+ i==49 ||
+ i==5 ||
+ i==25 ||
+ i==27 ||
+ i==39 )
+ {
+ // Ignore non-existant/unsupported schemas
+ continue;
+ }
+
+ string currentTest = "interop";
+ if(i<10)
+ {
+ currentTest.append("0");
+ }
+ char buf[3];
+ sprintf(buf, "%d", i);
+ currentTest.append(buf);
+
+ string xsdFileName = resourcesDir + currentTest + dotxsd;
+ xsdHelper->defineFile(xsdFileName.c_str());
+ }
+
+ }
+ catch(SDORuntimeException& ex)
+ {
+ cout << "SDORuntimeException whilst loading xsd" << endl;
+ cout << ex.getMessageText() << endl;
+ }
+}
+
+/* build SOAP request message content using OM */
+axiom_node_t* get_om_payload_from_xml_file(axis2_env_t *env, const char* currentTest)
+{
+ axiom_node_t* req_om_node = NULL;
+ axiom_node_t* payload_om_node = NULL;
+ const string resourcesDir = "./resources/";
+ const string dotxml = "-in.xml";
+
+ string xmlFileName = resourcesDir + currentTest + dotxml;
+
+ try
+ {
+
+ xmlHelper = HelperProvider::getXMLHelper(xsdHelper->getDataFactory());
+
+ XMLDocumentPtr payloadFile = xmlHelper->loadFile(xmlFileName.c_str());
+ string rootElemURI = payloadFile->getRootElementURI();
+ string rootElemName = payloadFile->getRootElementName();
+
+ DataObjectPtr payloadDO = payloadFile->getRootDataObject();
+
+ AxiomHelper* axiomHelper = AxiomHelper::getHelper();
+ payload_om_node = axiomHelper->toAxiomNode(payloadDO, rootElemURI.c_str(), rootElemName.c_str());
+
+ if(!payload_om_node)
+ {
+ payload_om_node = axiomHelper->toAxiomNode(payloadDO);
+ }
+
+ if(payload_om_node)
+ {
+ axiom_element_t* req_om_elem = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+
+ ns1 = axiom_namespace_create (env, "http://www.apache.org/tuscany/interop", "ns1");
+ req_om_elem = axiom_element_create(env, NULL, currentTest, ns1, &req_om_node);
+ AXIOM_NODE_DETACH(payload_om_node, env);
+ AXIOM_NODE_ADD_CHILD(req_om_node, env, payload_om_node);
+ }
+ else
+ {
+ cout << "Could not convert xml document("<< xmlFileName <<") to Axiom" << endl;
+ return NULL;
+ }
+
+ }
+ catch(SDORuntimeException& ex)
+ {
+ cout << "SDORuntimeException whilst loading xml ("<< xmlFileName <<") & converting to Axiom" << endl;
+ cout << ex.getMessageText() << endl;
+ return NULL;
+ }
+
+ return req_om_node;
+}
Propchange: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop.client/TestClient.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/Test.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/Test.h?view=diff&rev=452477&r1=452476&r2=452477
==============================================================================
--- incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/Test.h (original)
+++ incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/Test.h Tue Oct 3 06:12:37 2006
@@ -1,82 +1,82 @@
-/*
-+----------------------------------------------------------------------+
-| |
-| Licensed under the Apache License, Version 2.0 (the "License"); you |
-| may not use this file except in compliance with the License. You may |
-| obtain a copy of the License at |
-| http://www.apache.org/licenses/LICENSE-2.0 |
-| |
-| Unless required by applicable law or agreed to in writing, software |
-| distributed under the License is distributed on an "AS IS" BASIS, |
-| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
-| implied. See the License for the specific language governing |
-| permissions and limitations under the License. |
-+----------------------------------------------------------------------+
-*/
-
-#ifndef TEST_H
-#define TEST_H
-
-#include <commonj/sdo/SDO.h>
-#include <stdio.h>
-#include <string>
-using std::string;
-
-class Test
-{
-public:
- virtual DataObjectPtr interop01(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop02(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop03(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop04(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop05(DataObjectPtr arg1) = 0;
- virtual string interop06(string arg1) = 0;
- virtual DataObjectPtr interop07(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop08(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop09(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop10(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop11(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop12(DataObjectPtr arg1) = 0;
- //virtual DataObjectPtr interop13(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop14(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop15(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop16(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop17(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop18(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop19(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop20(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop21(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop22(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop23(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop24(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop25(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop26(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop27(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop28(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop29(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop30(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop31(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop32(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop33(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop34(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop35(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop36(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop37(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop38(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop39(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop40(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop41(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop42(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop43(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop44(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop45(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop46(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop47(DataObjectPtr arg1) = 0;
- //virtual DataObjectPtr interop48(DataObjectPtr arg1) = 0;
- //virtual DataObjectPtr interop49(DataObjectPtr arg1) = 0;
- virtual DataObjectPtr interop50(DataObjectPtr arg1) = 0;
-};
-
-#endif
-
-
+/*
++----------------------------------------------------------------------+
+| |
+| Licensed under the Apache License, Version 2.0 (the "License"); you |
+| may not use this file except in compliance with the License. You may |
+| obtain a copy of the License at |
+| http://www.apache.org/licenses/LICENSE-2.0 |
+| |
+| Unless required by applicable law or agreed to in writing, software |
+| distributed under the License is distributed on an "AS IS" BASIS, |
+| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
+| implied. See the License for the specific language governing |
+| permissions and limitations under the License. |
++----------------------------------------------------------------------+
+*/
+
+#ifndef TEST_H
+#define TEST_H
+
+#include <commonj/sdo/SDO.h>
+#include <stdio.h>
+#include <string>
+using std::string;
+
+class Test
+{
+public:
+ virtual DataObjectPtr interop01(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop02(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop03(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop04(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop05(DataObjectPtr arg1) = 0;
+ virtual string interop06(string arg1) = 0;
+ virtual DataObjectPtr interop07(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop08(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop09(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop10(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop11(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop12(DataObjectPtr arg1) = 0;
+ //virtual DataObjectPtr interop13(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop14(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop15(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop16(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop17(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop18(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop19(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop20(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop21(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop22(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop23(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop24(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop25(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop26(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop27(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop28(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop29(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop30(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop31(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop32(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop33(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop34(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop35(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop36(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop37(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop38(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop39(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop40(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop41(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop42(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop43(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop44(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop45(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop46(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop47(DataObjectPtr arg1) = 0;
+ //virtual DataObjectPtr interop48(DataObjectPtr arg1) = 0;
+ //virtual DataObjectPtr interop49(DataObjectPtr arg1) = 0;
+ virtual DataObjectPtr interop50(DataObjectPtr arg1) = 0;
+};
+
+#endif
+
+
Propchange: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/Test.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/Test.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp?view=diff&rev=452477&r1=452476&r2=452477
==============================================================================
--- incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp (original)
+++ incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp Tue Oct 3 06:12:37 2006
@@ -1,509 +1,509 @@
-/*
-+----------------------------------------------------------------------+
-| (c) Copyright IBM Corporation 2005. |
-| All Rights Reserved. |
-+----------------------------------------------------------------------+
-| |
-| Licensed under the Apache License, Version 2.0 (the "License"); you |
-| may not use this file except in compliance with the License. You may |
-| obtain a copy of the License at |
-| http://www.apache.org/licenses/LICENSE-2.0 |
-| |
-| Unless required by applicable law or agreed to in writing, software |
-| distributed under the License is distributed on an "AS IS" BASIS, |
-| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
-| implied. See the License for the specific language governing |
-| permissions and limitations under the License. |
-+----------------------------------------------------------------------+
-*/
-
-#include "TestImpl.h"
-
-#include <tuscany/sca/util/Utils.h>
-#include <tuscany/sca/core/SCARuntime.h>
-#include <tuscany/sca/model/Component.h>
-#include <tuscany/sca/model/Composite.h>
-using namespace tuscany::sca;
-#include <commonj/sdo/SDO.h>
-using namespace commonj::sdo;
-
-#include <stdio.h>
-
-#include <string>
-using std::string;
-
-TestImpl::TestImpl()
-{
-}
-
-TestImpl::~TestImpl()
-{
-}
-
-bool TestImpl::compareWithFile(DataObjectPtr suppliedDO, string test)
-{
- Composite* composite = SCARuntime::getInstance()->getCurrentComponent()->getComposite();
- string rootPath = composite->getRoot();
- string xmlFileName = rootPath+"/"+test+"-in.xml";
-
- XMLHelperPtr helper = composite->getXMLHelper();
- XMLDocumentPtr expectedDoc = helper->loadFile(xmlFileName.c_str());
- DataObjectPtr expectedDO = expectedDoc->getRootDataObject();
-
- printf( "Comparing supplied DataObject against expected DataObject\n");
-
- string diff = "";
- bool result = Utils::compareDataObjects(suppliedDO, expectedDO, diff);
- if(!result)
- {
- printf("Supplied DO differs from expected DO:\n%s\nSupplied DO:\n", diff.c_str() );
- Utils::printDO(suppliedDO);
- printf("Expected DO:\n");
- Utils::printDO(expectedDO);
- }
- else
- {
- printf("DataObjects match!\n");
- }
-
- return result;
-}
-
-DataObjectPtr TestImpl::interop01(DataObjectPtr arg1)
-{
- printf("TestImpl::interop01 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop01"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop02(DataObjectPtr arg1)
-{
- printf("TestImpl::interop02 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop02"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop03(DataObjectPtr arg1)
-{
- printf("TestImpl::interop03 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop03"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop04(DataObjectPtr arg1)
-{
- printf("TestImpl::interop04 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop04"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop05(DataObjectPtr arg1)
-{
- printf("TestImpl::interop05 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop05"))
- {
- return arg1;
- }
- return NULL;
-}
-string TestImpl::interop06(string arg1)
-{
- printf("TestImpl::interop06 %s\n", arg1.c_str());
- return arg1;
-}
-DataObjectPtr TestImpl::interop07(DataObjectPtr arg1)
-{
- printf("TestImpl::interop07 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop07"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop08(DataObjectPtr arg1)
-{
- printf("TestImpl::interop08 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop08"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop09(DataObjectPtr arg1)
-{
- printf("TestImpl::interop09 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop09"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop10(DataObjectPtr arg1)
-{
- printf("TestImpl::interop10 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop10"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop11(DataObjectPtr arg1)
-{
- printf("TestImpl::interop11 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop11"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop12(DataObjectPtr arg1)
-{
- printf("TestImpl::interop12 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop12"))
- {
- return arg1;
- }
- return NULL;
-}
-// DataObjectPtr TestImpl::interop13(DataObjectPtr arg1)
-// {
-// printf("TestImpl::interop13 %s\n", arg1->getType().getURI());
-// Utils::printDO(arg1);
-// return arg1;
-// }
-DataObjectPtr TestImpl::interop14(DataObjectPtr arg1)
-{
- printf("TestImpl::interop14 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop14"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop15(DataObjectPtr arg1)
-{
- printf("TestImpl::interop15 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop15"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop16(DataObjectPtr arg1)
-{
- printf("TestImpl::interop16 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop16"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop17(DataObjectPtr arg1)
-{
- printf("TestImpl::interop17 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop17"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop18(DataObjectPtr arg1)
-{
- printf("TestImpl::interop18 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop18"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop19(DataObjectPtr arg1)
-{
- printf("TestImpl::interop19 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop19"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop20(DataObjectPtr arg1)
-{
- printf("TestImpl::interop20 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop20"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop21(DataObjectPtr arg1)
-{
- printf("TestImpl::interop21 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop21"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop22(DataObjectPtr arg1)
-{
- printf("TestImpl::interop22 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop22"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop23(DataObjectPtr arg1)
-{
- printf("TestImpl::interop23 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop23"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop24(DataObjectPtr arg1)
-{
- printf("TestImpl::interop24 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop24"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop25(DataObjectPtr arg1)
-{
- printf("TestImpl::interop25 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop25"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop26(DataObjectPtr arg1)
-{
- printf("TestImpl::interop26 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop26"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop27(DataObjectPtr arg1)
-{
- printf("TestImpl::interop27 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop27"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop28(DataObjectPtr arg1)
-{
- printf("TestImpl::interop28 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop28"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop29(DataObjectPtr arg1)
-{
- printf("TestImpl::interop29 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop29"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop30(DataObjectPtr arg1)
-{
- printf("TestImpl::interop30 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop30"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop31(DataObjectPtr arg1)
-{
- printf("TestImpl::interop31 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop31"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop32(DataObjectPtr arg1)
-{
- printf("TestImpl::interop32 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop32"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop33(DataObjectPtr arg1)
-{
- printf("TestImpl::interop33 %s\n", arg1->getType().getURI());
- bool result = compareWithFile(arg1, "interop33");
- if(result)
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop34(DataObjectPtr arg1)
-{
- printf("TestImpl::interop34 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop34"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop35(DataObjectPtr arg1)
-{
- printf("TestImpl::interop35 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop35"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop36(DataObjectPtr arg1)
-{
- printf("TestImpl::interop36 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop36"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop37(DataObjectPtr arg1)
-{
- printf("TestImpl::interop37 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop37"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop38(DataObjectPtr arg1)
-{
- printf("TestImpl::interop38 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop38"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop39(DataObjectPtr arg1)
-{
- printf("TestImpl::interop39 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop39"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop40(DataObjectPtr arg1)
-{
- printf("TestImpl::interop40 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop40"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop41(DataObjectPtr arg1)
-{
- printf("TestImpl::interop41 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop41"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop42(DataObjectPtr arg1)
-{
- printf("TestImpl::interop42 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop42"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop43(DataObjectPtr arg1)
-{
- printf("TestImpl::interop43 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop43"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop44(DataObjectPtr arg1)
-{
- printf("TestImpl::interop44 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop44"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop45(DataObjectPtr arg1)
-{
- printf("TestImpl::interop45 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop45"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop46(DataObjectPtr arg1)
-{
- printf("TestImpl::interop46 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop46"))
- {
- return arg1;
- }
- return NULL;
-}
-DataObjectPtr TestImpl::interop47(DataObjectPtr arg1)
-{
- printf("TestImpl::interop47 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop47"))
- {
- return arg1;
- }
- return NULL;
-}
-// DataObjectPtr TestImpl::interop48(DataObjectPtr arg1)
-// {
-// printf("TestImpl::interop48 %s\n", arg1->getType().getURI());
-// Utils::printDO(arg1);
-// return arg1;
-// }
-// DataObjectPtr TestImpl::interop49(DataObjectPtr arg1)
-// {
-// printf("TestImpl::interop49 %s\n", arg1->getType().getURI());
-// Utils::printDO(arg1);
-// return arg1;
-// }
-DataObjectPtr TestImpl::interop50(DataObjectPtr arg1)
-{
- printf("TestImpl::interop50 %s\n", arg1->getType().getURI());
- if(compareWithFile(arg1, "interop50"))
- {
- return arg1;
- }
- return NULL;
-}
+/*
++----------------------------------------------------------------------+
+| (c) Copyright IBM Corporation 2005. |
+| All Rights Reserved. |
++----------------------------------------------------------------------+
+| |
+| Licensed under the Apache License, Version 2.0 (the "License"); you |
+| may not use this file except in compliance with the License. You may |
+| obtain a copy of the License at |
+| http://www.apache.org/licenses/LICENSE-2.0 |
+| |
+| Unless required by applicable law or agreed to in writing, software |
+| distributed under the License is distributed on an "AS IS" BASIS, |
+| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
+| implied. See the License for the specific language governing |
+| permissions and limitations under the License. |
++----------------------------------------------------------------------+
+*/
+
+#include "TestImpl.h"
+
+#include <tuscany/sca/util/Utils.h>
+#include <tuscany/sca/core/SCARuntime.h>
+#include <tuscany/sca/model/Component.h>
+#include <tuscany/sca/model/Composite.h>
+using namespace tuscany::sca;
+#include <commonj/sdo/SDO.h>
+using namespace commonj::sdo;
+
+#include <stdio.h>
+
+#include <string>
+using std::string;
+
+TestImpl::TestImpl()
+{
+}
+
+TestImpl::~TestImpl()
+{
+}
+
+bool TestImpl::compareWithFile(DataObjectPtr suppliedDO, string test)
+{
+ Composite* composite = SCARuntime::getInstance()->getCurrentComponent()->getComposite();
+ string rootPath = composite->getRoot();
+ string xmlFileName = rootPath+"/"+test+"-in.xml";
+
+ XMLHelperPtr helper = composite->getXMLHelper();
+ XMLDocumentPtr expectedDoc = helper->loadFile(xmlFileName.c_str());
+ DataObjectPtr expectedDO = expectedDoc->getRootDataObject();
+
+ printf( "Comparing supplied DataObject against expected DataObject\n");
+
+ string diff = "";
+ bool result = Utils::compareDataObjects(suppliedDO, expectedDO, diff);
+ if(!result)
+ {
+ printf("Supplied DO differs from expected DO:\n%s\nSupplied DO:\n", diff.c_str() );
+ Utils::printDO(suppliedDO);
+ printf("Expected DO:\n");
+ Utils::printDO(expectedDO);
+ }
+ else
+ {
+ printf("DataObjects match!\n");
+ }
+
+ return result;
+}
+
+DataObjectPtr TestImpl::interop01(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop01 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop01"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop02(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop02 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop02"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop03(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop03 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop03"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop04(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop04 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop04"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop05(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop05 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop05"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+string TestImpl::interop06(string arg1)
+{
+ printf("TestImpl::interop06 %s\n", arg1.c_str());
+ return arg1;
+}
+DataObjectPtr TestImpl::interop07(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop07 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop07"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop08(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop08 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop08"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop09(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop09 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop09"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop10(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop10 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop10"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop11(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop11 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop11"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop12(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop12 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop12"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+// DataObjectPtr TestImpl::interop13(DataObjectPtr arg1)
+// {
+// printf("TestImpl::interop13 %s\n", arg1->getType().getURI());
+// Utils::printDO(arg1);
+// return arg1;
+// }
+DataObjectPtr TestImpl::interop14(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop14 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop14"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop15(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop15 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop15"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop16(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop16 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop16"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop17(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop17 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop17"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop18(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop18 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop18"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop19(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop19 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop19"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop20(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop20 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop20"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop21(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop21 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop21"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop22(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop22 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop22"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop23(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop23 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop23"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop24(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop24 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop24"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop25(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop25 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop25"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop26(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop26 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop26"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop27(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop27 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop27"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop28(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop28 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop28"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop29(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop29 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop29"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop30(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop30 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop30"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop31(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop31 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop31"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop32(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop32 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop32"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop33(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop33 %s\n", arg1->getType().getURI());
+ bool result = compareWithFile(arg1, "interop33");
+ if(result)
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop34(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop34 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop34"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop35(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop35 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop35"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop36(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop36 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop36"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop37(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop37 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop37"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop38(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop38 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop38"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop39(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop39 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop39"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop40(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop40 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop40"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop41(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop41 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop41"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop42(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop42 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop42"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop43(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop43 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop43"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop44(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop44 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop44"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop45(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop45 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop45"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop46(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop46 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop46"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+DataObjectPtr TestImpl::interop47(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop47 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop47"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
+// DataObjectPtr TestImpl::interop48(DataObjectPtr arg1)
+// {
+// printf("TestImpl::interop48 %s\n", arg1->getType().getURI());
+// Utils::printDO(arg1);
+// return arg1;
+// }
+// DataObjectPtr TestImpl::interop49(DataObjectPtr arg1)
+// {
+// printf("TestImpl::interop49 %s\n", arg1->getType().getURI());
+// Utils::printDO(arg1);
+// return arg1;
+// }
+DataObjectPtr TestImpl::interop50(DataObjectPtr arg1)
+{
+ printf("TestImpl::interop50 %s\n", arg1->getType().getURI());
+ if(compareWithFile(arg1, "interop50"))
+ {
+ return arg1;
+ }
+ return NULL;
+}
Propchange: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/test/ws.service.interop/ws.service.interop/TestImpl.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org