summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/contrib/runtime/core/test
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-23 05:48:11 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-23 05:48:11 +0000
commit1c2df9a2458897ff6c2393913b2723457e42a0da (patch)
tree69652a0305830b4472f39c55ad1168522d8301f1 /sca-cpp/trunk/contrib/runtime/core/test
parente5d978186780787e8dad6681cca139486df93643 (diff)
Simplified the automake build using configure options instead of environment variables and cleaned up some of the makefile.am files. Adjusted build instructions. Moved directories that don't yet build or work out of the main build dir and obsolete docs to a contrib dir.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@883254 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/contrib/runtime/core/test')
-rw-r--r--sca-cpp/trunk/contrib/runtime/core/test/Makefile.am17
-rw-r--r--sca-cpp/trunk/contrib/runtime/core/test/SCATestMacros.h84
-rw-r--r--sca-cpp/trunk/contrib/runtime/core/test/main.cpp95
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/sca_test.bat43
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/sca_test.sh40
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.cpp127
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.h50
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.cpp67
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.h40
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.cpp545
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.h34
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdlTests.h34
-rw-r--r--sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_correct/simple.wsdl74
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_input.wsdl67
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_output.wsdl67
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_bindings.wsdl77
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_messages.wsdl67
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_partnames.wsdl65
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_portTypes.wsdl72
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_services.wsdl70
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_address.wsdl46
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_binding.wsdl41
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_body.wsdl41
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_operation.wsdl41
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_binding_for_port.wsdl43
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_message.wsdl40
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_part.wsdl43
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_port.wsdl43
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_operation.wsdl40
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_portType.wsdl40
-rwxr-xr-xsca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_type_for_part.wsdl43
31 files changed, 2196 insertions, 0 deletions
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/Makefile.am b/sca-cpp/trunk/contrib/runtime/core/test/Makefile.am
new file mode 100644
index 0000000000..de5c2d1b1e
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/Makefile.am
@@ -0,0 +1,17 @@
+# 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.
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/SCATestMacros.h b/sca-cpp/trunk/contrib/runtime/core/test/SCATestMacros.h
new file mode 100644
index 0000000000..58c640f8a6
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/SCATestMacros.h
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+/* $Rev: $ $Date: $ */
+
+#ifndef sca_tests_macros_h_
+#define sca_tests_macros_h_
+
+#include <iostream>
+
+#define TEST_TRACE( message ) \
+ std::cout << "\tTRACE: " << message << std::endl;
+
+#define TEST_ASSERT( val ) \
+ if( ! val ) { \
+ std::cout << "Test failed in: " << __FILE__ << ": " << __LINE__ << std::endl; \
+ return false; \
+ }
+
+#define TEST_ASSERT_EQUALS( val1, val2 ) \
+ if( val1 != val2 ) { \
+ std::cout << "Test failed in: " << __FILE__ << ": " << __LINE__ << std::endl; \
+ return false; \
+ }
+
+#define TEST_ASSERT_NOT_EQUALS( val1, val2 ) \
+ if( val1 == val2 ) { \
+ std::cout << "Test failed in: " << __FILE__ << ": " << __LINE__ << std::endl; \
+ return false; \
+ }
+
+#define TEST_FAIL( message ) \
+ std::cout << "Test failed in: " << __FILE__ << ":" << __LINE__ << ": " << message << std::endl; \
+ return false;
+
+// For this macro, you must have the following variables defined:
+// int testsPassed = 0;
+// int testsTotal = 0;
+// bool retval = false;
+// The macro calls the test and increments the total and passed
+// tests and logs accordingly
+//
+#define TEST(testName) \
+ ++testsTotal; \
+ try { \
+ std::cout << "\nTest " << testsTotal << ": " << #testName << " ..... " << std::endl; \
+ retval = testName; \
+ if (retval) { \
+ std::cout << "PASSED" << std::endl; \
+ ++testsPassed; \
+ } \
+ else { \
+ std::cout << "FAILED" << std::endl; \
+ } \
+ } \
+ catch(const tuscany::sca::TuscanyRuntimeException &scaE) { \
+ std::cout << "FAILED (unexpected SCA exception): " << scaE.getMessageText() \
+ << std::endl; \
+ } \
+ catch(const commonj::sdo::SDORuntimeException &sdoE) { \
+ std::cout << "FAILED (unexpected SDO exception): " << sdoE.getMessageText() \
+ << std::endl; \
+ } \
+ catch(...) { \
+ std::cout << "FAILED (unexpected unknown exception)" << std::endl; \
+ }
+
+#endif
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/main.cpp b/sca-cpp/trunk/contrib/runtime/core/test/main.cpp
new file mode 100644
index 0000000000..9f9f733b49
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/main.cpp
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+/* $Rev: 583039 $ $Date: 2007-10-08 20:49:57 -0700 (Mon, 08 Oct 2007) $ */
+
+#pragma warning(disable:4786)
+
+#include <iostream>
+
+#include "tuscany/sca/core/Exceptions.h"
+
+#include "SCATestMacros.h"
+#include "wsdlTests/wsdlTests.h"
+//#include "compositeTests/compositeTests.h"
+
+using namespace std;
+
+extern "C"{
+
+int main (int argc, char** argv)
+{
+ // These variables are used and set by the TEST macro
+ int testsPassed = 0;
+ int testsTotal = 0;
+ bool retval = false;
+
+ try
+ {
+ WSDLDefinitionTest wsdlTest;
+ TEST( wsdlTest.testSimple() );
+
+ WSDLErrorsTest wsdlErrorsTest;
+// TEST( wsdlErrorsTest.testDuplicateWSDLInputOutputBinding() ); // fails, JIRA 1900
+// TEST( wsdlErrorsTest.testDuplicateWSDLMessagePartNames() ); // fails, JIRA 1900
+
+ TEST( wsdlErrorsTest.testDuplicateWSDLBindings() );
+ TEST( wsdlErrorsTest.testDuplicateWSDLMessages() );
+ TEST( wsdlErrorsTest.testDuplicateWSDLServices() );
+ TEST( wsdlErrorsTest.testDuplicateWSDLPortTypes() );
+
+ // The following 4 tests fail due to an SDO SPEC limitation:
+ // According to XSD rules, if a global element xsd:any has
+ // maxOccurs > 1 you can only have a single valued property
+ // The multiple SOAP addresses/bindings/bodies/operations should load
+ // and I should be able to get the list and throw if list.size() > 1
+ // but I cant because SDO says its a single value element
+// TEST( wsdlErrorsTest.testDuplicateSOAPAddress() );
+// TEST( wsdlErrorsTest.testDuplicateSOAPBinding() );
+// TEST( wsdlErrorsTest.testDuplicateSOAPBody() );
+// TEST( wsdlErrorsTest.testDuplicateSOAPOperation() );
+
+ TEST( wsdlErrorsTest.testMissingPortBinding() );
+ TEST( wsdlErrorsTest.testMissingOperation() );
+ TEST( wsdlErrorsTest.testMissingPortType() );
+ TEST( wsdlErrorsTest.testMissingMessage() );
+
+// TEST( wsdlErrorsTest.testMissingMessagePartName() ); // fails, JIRA 1901
+// TEST( wsdlErrorsTest.testMissingPortName() ); // fails, JIRA 1901
+// TEST( wsdlErrorsTest.testMissingMessagePartType() ); // fails, JIRA 1901
+ }
+ catch(...)
+ {
+ // All exceptions should be caught by the TEST macro
+
+ cout << "Unexpected exception caught" << endl;
+ }
+
+ cout
+ << "---------------------"
+ << "\nTest Results"
+ << "\n\tTotal tests: " << testsTotal
+ << "\n\tTests passed: " << testsPassed
+ << "\n\tTests failed: " << testsTotal - testsPassed
+ << endl;
+
+ return testsTotal - testsPassed;
+}
+
+}
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/sca_test.bat b/sca-cpp/trunk/contrib/runtime/core/test/sca_test.bat
new file mode 100755
index 0000000000..b082dd19ee
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/sca_test.bat
@@ -0,0 +1,43 @@
+@echo off
+
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+
+setlocal
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+goto end
+)
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+
+rem Run the client
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+
+.\sca_test.exe
+
+:end
+endlocal
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/sca_test.sh b/sca-cpp/trunk/contrib/runtime/core/test/sca_test.sh
new file mode 100755
index 0000000000..99d268af8e
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/sca_test.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# 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.
+
+APFULLDIR=`pwd`
+
+if [ x$TUSCANY_SCACPP = x ]; then
+echo "TUSCANY_SCACPP not set"
+exit;
+fi
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+./sca_test
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.cpp b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.cpp
new file mode 100755
index 0000000000..88563e5dfa
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.cpp
@@ -0,0 +1,127 @@
+/*
+ * 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.
+ */
+
+/* $Rev: 583039 $ $Date: 2007-10-08 20:49:57 -0700 (Mon, 08 Oct 2007) $ */
+
+#include "BaseWsdlTest.h"
+
+#include <tuscany/sca/model/WSDLDefinition.h>
+#include <commonj/sdo/SDO.h>
+
+BaseWsdlTest::BaseWsdlTest()
+{
+ // TODO: Should we possibly make this an arg to this class instead?
+ char *installRootVar = getenv( "TUSCANY_SCACPP" );
+ installRoot_ = installRootVar;
+}
+
+BaseWsdlTest::~BaseWsdlTest()
+{
+}
+
+void BaseWsdlTest::loadXsdHelper()
+{
+ if( ! (xsdHelper_ == 0) )
+ {
+ return;
+ }
+
+ try
+ {
+ xsdHelper_ = commonj::sdo::HelperProvider::getXSDHelper();
+
+ std::string filename = installRoot_ + "/xsd/wsdl_11.xsd";
+ xsdHelper_->defineFile(filename.c_str());
+
+ filename = installRoot_ + "/xsd/wsdl_11_http.xsd";
+ xsdHelper_->defineFile(filename.c_str());
+
+ filename = installRoot_ + "/xsd/wsdl_11_mime.xsd";
+ xsdHelper_->defineFile(filename.c_str());
+
+ filename = installRoot_ + "/xsd/wsdl_11_soap.xsd";
+ xsdHelper_->defineFile(filename.c_str());
+
+ filename = installRoot_ + "/xsd/wsdl_11_soap12.xsd";
+ xsdHelper_->defineFile(filename.c_str());
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ std::cerr
+ << "BaseWsdlTest::loadXsdHelper() SDO runtime Exception: "
+ << sdoE.getMessageText()
+ << std::endl;
+
+ throw;
+ }
+}
+
+void BaseWsdlTest::loadXmlHelper()
+{
+ if( ! (xmlHelper_ == 0) )
+ {
+ return;
+ }
+
+ if( xsdHelper_ == 0 )
+ {
+ loadXsdHelper();
+ }
+
+ try
+ {
+ xmlHelper_ = commonj::sdo::HelperProvider::getXMLHelper( xsdHelper_->getDataFactory() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ std::cerr
+ << "BaseWsdlTest::loadXmlHelper() SDO runtime Exception: "
+ << sdoE.getMessageText()
+ << std::endl;
+
+ throw;
+ }
+}
+
+tuscany::sca::model::WSDLDefinition *
+BaseWsdlTest::loadWsdl( const std::string &wsdlPath )
+{
+ loadXmlHelper();
+
+ tuscany::sca::model::WSDLDefinition *wsdl = 0;
+
+ try
+ {
+ commonj::sdo::XMLDocumentPtr doc = xmlHelper_->loadFile( wsdlPath );
+ wsdl = new tuscany::sca::model::WSDLDefinition( doc->getRootDataObject() );
+//tuscany::sca::util::Utils::printDO(doc->getRootDataObject()); // TODO remove this
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ std::cerr
+ << "BaseWsdlTest::loadWsdl() SDO runtime Exception: "
+ << sdoE.getMessageText()
+ << std::endl;
+
+ throw;
+ }
+
+ return wsdl;
+}
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.h b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.h
new file mode 100755
index 0000000000..7a2be5db5f
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/BaseWsdlTest.h
@@ -0,0 +1,50 @@
+#ifndef sca_tests_wsdl_BaseWsdlTest_h_
+#define sca_tests_wsdl_BaseWsdlTest_h_
+
+/*
+ * 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.
+ */
+
+/* $Rev: 583039 $ $Date: 2007-10-08 20:49:57 -0700 (Mon, 08 Oct 2007) $ */
+
+#include <string>
+
+#include <tuscany/sca/model/WSDLDefinition.h>
+#include <commonj/sdo/SDO.h>
+
+class BaseWsdlTest
+{
+ public:
+
+ BaseWsdlTest();
+ ~BaseWsdlTest();
+
+ tuscany::sca::model::WSDLDefinition *loadWsdl( const std::string &wsdlPath );
+
+ private:
+ void loadXmlHelper();
+ void loadXsdHelper();
+
+ std::string installRoot_;
+ commonj::sdo::XMLHelperPtr xmlHelper_;
+ commonj::sdo::XSDHelperPtr xsdHelper_;
+
+};
+
+#endif
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.cpp b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.cpp
new file mode 100755
index 0000000000..df5e22bd68
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.cpp
@@ -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.
+ */
+
+/* $Rev: 583039 $ $Date: 2007-10-08 20:49:57 -0700 (Mon, 08 Oct 2007) $ */
+
+#include <iostream>
+
+#include "SCATestMacros.h"
+#include "WSDLDefinitionTest.h"
+
+WSDLDefinitionTest::WSDLDefinitionTest()
+{
+}
+
+WSDLDefinitionTest::~WSDLDefinitionTest()
+{
+}
+
+bool WSDLDefinitionTest::testSimple()
+{
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_correct/simple.wsdl" );
+
+ TEST_ASSERT_EQUALS(
+ "http://www.tuscany.com/tests/simple.wsdl",
+ wsdl->getNamespace() );
+
+ // Get the operation based on portType, operName
+ tuscany::sca::model::WSDLOperation wsdlOp1 =
+ wsdl->findOperation( "simplePortType", "simpleOperation" );
+ TEST_ASSERT_EQUALS( "simpleOperation", wsdlOp1.getOperationName() );
+
+ // Get the operation based on service, portName, operName
+ tuscany::sca::model::WSDLOperation wsdlOp2 =
+ wsdl->findOperation( "simpleService", "simplePort", "simpleOperation" );
+ TEST_ASSERT_EQUALS( "simpleOperation", wsdlOp2.getOperationName() );
+
+ // Check the operation names
+ std::list<std::string> operNames = wsdl->getOperations( "simplePortType" );
+ TEST_ASSERT_EQUALS( 1, operNames.size() );
+ TEST_ASSERT_EQUALS( "simpleOperation", operNames.front() );
+
+ // Check the port type names
+ std::list<std::string> portTypeNames = wsdl->getPortTypes();
+ TEST_ASSERT_EQUALS( 1, portTypeNames.size() );
+ TEST_ASSERT_EQUALS( "simplePortType", portTypeNames.front() );
+
+ // Everything passed
+ return true;
+}
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.h b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.h
new file mode 100755
index 0000000000..fb536b2153
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLDefinitionTest.h
@@ -0,0 +1,40 @@
+#ifndef sca_tests_wsdl_WSDLDefinitionTest_h_
+#define sca_tests_wsdl_WSDLDefinitionTest_h_
+
+/*
+ * 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.
+ */
+
+/* $Rev: 583039 $ $Date: 2007-10-08 20:49:57 -0700 (Mon, 08 Oct 2007) $ */
+
+#include "BaseWsdlTest.h"
+
+class WSDLDefinitionTest : public BaseWsdlTest
+{
+
+ public:
+
+ WSDLDefinitionTest();
+ ~WSDLDefinitionTest();
+
+ bool testSimple();
+
+};
+
+#endif
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.cpp b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.cpp
new file mode 100755
index 0000000000..573c88d7ad
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.cpp
@@ -0,0 +1,545 @@
+
+#include <iostream>
+#include <string>
+
+#include "SCATestMacros.h"
+#include "WSDLErrorsTest.h"
+
+#include <commonj/sdo/SDO.h>
+#include <tuscany/sca/core/Exceptions.h>
+#include <tuscany/sca/util/File.h>
+
+WSDLErrorsTest::WSDLErrorsTest()
+{
+}
+
+WSDLErrorsTest::~WSDLErrorsTest()
+{
+}
+
+
+ // Each wsdl in the wsdls_erroneous directory will throw a different
+ // exception, so we need to check for each individual exception
+
+bool WSDLErrorsTest::testDuplicateWSDLInputOutputBinding()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_binding_input.wsdl" );
+
+ // This test fails because of JIRA 1900
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_binding_input.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_binding_output.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_binding_output.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+
+bool WSDLErrorsTest::testDuplicateWSDLMessagePartNames()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_partNames.wsdl" );
+
+ // This test fails because of JIRA 1900
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_partNames.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateWSDLMessages()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_messages.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_messages.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "message/name" ), std::string::npos );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "cannot be duplicated" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateWSDLPortTypes()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_portTypes.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_portTypes.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "portType/name" ), std::string::npos );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "cannot be duplicated" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateWSDLBindings()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_bindings.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_bindings.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "binding/name" ), std::string::npos );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "cannot be duplicated" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateWSDLServices()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_services.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_services.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "service/name" ), std::string::npos );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "cannot be duplicated" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateSOAPAddress()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_soap_address.wsdl" );
+
+ // This test fails due to an SDO SPEC limitation:
+ // According to XSD rules, if a global element xsd:any has
+ // maxOccurs > 1 you can only have a single valued property
+ // The multiple SOAP addresses/bindings/bodies/operations should load
+ // and I should be able to get the list and throw if list.size() > 1
+ // but I cant because SDO says its a single value element
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_soap_address.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateSOAPBinding()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_soap_binding.wsdl" );
+
+ // This test fails due to an SDO SPEC limitation:
+ // According to XSD rules, if a global element xsd:any has
+ // maxOccurs > 1 you can only have a single valued property
+ // The multiple SOAP addresses/bindings/bodies/operations should load
+ // and I should be able to get the list and throw if list.size() > 1
+ // but I cant because SDO says its a single value element
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_soap_binding.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateSOAPBody()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_soap_body.wsdl" );
+
+ // This test fails due to an SDO SPEC limitation:
+ // According to XSD rules, if a global element xsd:any has
+ // maxOccurs > 1 you can only have a single valued property
+ // The multiple SOAP addresses/bindings/bodies/operations should load
+ // and I should be able to get the list and throw if list.size() > 1
+ // but I cant because SDO says its a single value element
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_soap_body.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testDuplicateSOAPOperation()
+{
+ TEST_TRACE( "Testing erroneous wsdl: duplicate_soap_operation.wsdl" );
+
+ // This test fails due to an SDO SPEC limitation:
+ // According to XSD rules, if a global element xsd:any has
+ // maxOccurs > 1 you can only have a single valued property
+ // The multiple SOAP addresses/bindings/bodies/operations should load
+ // and I should be able to get the list and throw if list.size() > 1
+ // but I cant because SDO says its a single value element
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/duplicate_soap_operation.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testMissingPortBinding()
+{
+ TEST_TRACE( "Testing erroneous wsdl: missing_binding_for_port.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/missing_binding_for_port.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "Unable to find binding" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception" );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testMissingOperation()
+{
+ TEST_TRACE( "Testing erroneous wsdl: missing_operation.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/missing_operation.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "Unable to find PortType operation" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception" );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testMissingPortType()
+{
+ TEST_TRACE( "Testing erroneous wsdl: missing_portType.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/missing_portType.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "Unable to find PortType" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception" );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testMissingMessage()
+{
+ TEST_TRACE( "Testing erroneous wsdl: missing_message.wsdl" );
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/missing_message.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_TRACE( std::string( "Caught expected SCA Exception: " ) + scaE.getMessageText() );
+ std::string errorText( scaE.getMessageText() );
+ TEST_ASSERT_NOT_EQUALS( errorText.find( "unable to find PortType input message" ), std::string::npos );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception" );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testMissingMessagePartName()
+{
+ TEST_TRACE( "Testing erroneous wsdl: missing_name_for_part.wsdl" );
+
+ // This test fails because of JIRA 1901
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/missing_name_for_part.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testMissingPortName()
+{
+ TEST_TRACE( "Testing erroneous wsdl: missing_name_for_port.wsdl" );
+
+ // This test fails because of JIRA 1901
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/missing_name_for_port.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
+bool WSDLErrorsTest::testMissingMessagePartType()
+{
+ TEST_TRACE( "Testing erroneous wsdl: missing_type_for_part.wsdl" );
+
+ // This test fails because of JIRA 1901
+
+ try
+ {
+ tuscany::sca::model::WSDLDefinition *wsdl =
+ loadWsdl( "wsdlTests/wsdls_erroneous/missing_type_for_part.wsdl" );
+ TEST_FAIL( "Wsdl should have thrown an exception" );
+ }
+ catch( const tuscany::sca::TuscanyRuntimeException &scaE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SCA Exception: " ) + scaE.getMessageText() );
+ }
+ catch( const commonj::sdo::SDORuntimeException &sdoE )
+ {
+ TEST_FAIL( std::string( "Caught unexpected SDO Exception: " ) + sdoE.getMessageText() );
+ }
+ catch( ... )
+ {
+ TEST_FAIL( "Caught unexpected unknown Exception: " );
+ }
+
+ return true;
+}
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.h b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.h
new file mode 100755
index 0000000000..e17d0edd28
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/WSDLErrorsTest.h
@@ -0,0 +1,34 @@
+#ifndef sca_tests_wsdl_WSDLErrorsTest_h_
+#define sca_tests_wsdl_WSDLErrorsTest_h_
+
+#include "BaseWsdlTest.h"
+
+class WSDLErrorsTest : public BaseWsdlTest
+{
+ public:
+
+ WSDLErrorsTest();
+ ~WSDLErrorsTest();
+
+ bool testDuplicateWSDLInputOutputBinding();
+ bool testDuplicateWSDLMessagePartNames();
+ bool testDuplicateWSDLMessages();
+ bool testDuplicateWSDLPortTypes();
+ bool testDuplicateWSDLBindings();
+ bool testDuplicateWSDLServices();
+ bool testDuplicateSOAPAddress();
+ bool testDuplicateSOAPBinding();
+ bool testDuplicateSOAPBody();
+ bool testDuplicateSOAPOperation();
+
+ bool testMissingPortBinding();
+ bool testMissingOperation();
+ bool testMissingPortName();
+ bool testMissingPortType();
+ bool testMissingMessage();
+ bool testMissingMessagePartName();
+ bool testMissingMessagePartType();
+};
+
+#endif
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdlTests.h b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdlTests.h
new file mode 100755
index 0000000000..f8d86133c1
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdlTests.h
@@ -0,0 +1,34 @@
+#ifndef sca_tests_wsdl_wsdlTests_h_
+#define sca_tests_wsdl_wsdlTests_h_
+
+/*
+ * 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.
+ */
+
+/* $Rev: 583039 $ $Date: 2007-10-08 20:49:57 -0700 (Mon, 08 Oct 2007) $ */
+
+// This file is included by the main test program
+// it just includes all the necessary wsdl headers,
+// so the main doesnt have to know about all of them
+
+#include "wsdlTests/BaseWsdlTest.h"
+#include "wsdlTests/WSDLErrorsTest.h"
+#include "wsdlTests/WSDLDefinitionTest.h"
+
+#endif
+
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_correct/simple.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_correct/simple.wsdl
new file mode 100644
index 0000000000..c9fe542dbd
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_correct/simple.wsdl
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.tuscany.com/tests/simple.wsdl"
+ targetNamespace="http://www.tuscany.com/tests/simple.wsdl"
+ name="simple">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="simplePortType">
+ <operation name="simpleOperation">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="simpleBinding" type="tns:simplePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <!--soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/-->
+ <operation name="simpleOperation">
+ <soap:operation soapAction="http://www.tuscany.com/test/simpleOperation"/>
+
+ <input>
+ <soap:body use="literal"/>
+ <!-- this is a bug in SDO or the wsdl schemas: it parses incorrectly
+ <soap:body use="encoded"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="http://www.tuscany.com/tests"/>
+ -->
+ </input>
+
+ <output>
+ <soap:body use="literal"/>
+ </output>
+
+ </operation>
+ </binding>
+
+ <service name="simpleService">
+ <port name="simplePort" binding="tns:simpleBinding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_input.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_input.wsdl
new file mode 100755
index 0000000000..07423d3556
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_input.wsdl
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_output.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_output.wsdl
new file mode 100755
index 0000000000..4c295bf0f5
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_output.wsdl
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_bindings.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_bindings.wsdl
new file mode 100755
index 0000000000..39932da219
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_bindings.wsdl
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_messages.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_messages.wsdl
new file mode 100755
index 0000000000..e0388f19d6
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_messages.wsdl
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_partnames.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_partnames.wsdl
new file mode 100755
index 0000000000..6b5b1630e0
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_partnames.wsdl
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_portTypes.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_portTypes.wsdl
new file mode 100755
index 0000000000..1bbe57bbad
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_portTypes.wsdl
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_services.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_services.wsdl
new file mode 100755
index 0000000000..e16d04a5ec
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_services.wsdl
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_address.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_address.wsdl
new file mode 100755
index 0000000000..01af450396
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_address.wsdl
@@ -0,0 +1,46 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost:8090/tests"/>
+ <soap:address location="http://localhost:8090/tests"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_binding.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_binding.wsdl
new file mode 100755
index 0000000000..a2dac5e15e
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_binding.wsdl
@@ -0,0 +1,41 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_body.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_body.wsdl
new file mode 100755
index 0000000000..3918b9e6f1
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_body.wsdl
@@ -0,0 +1,41 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_operation.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_operation.wsdl
new file mode 100755
index 0000000000..542d60b7cb
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_operation.wsdl
@@ -0,0 +1,41 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_binding_for_port.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_binding_for_port.wsdl
new file mode 100755
index 0000000000..cfcb65f149
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_binding_for_port.wsdl
@@ -0,0 +1,43 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+<!-- This is the correct form
+ <port name="port" binding="tns:binding">
+-->
+ <port name="port">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_message.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_message.wsdl
new file mode 100755
index 0000000000..ec2d17204d
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_message.wsdl
@@ -0,0 +1,40 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:bogusMessageName"/> <!-- The error is here -->
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_part.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_part.wsdl
new file mode 100755
index 0000000000..4e927e222f
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_part.wsdl
@@ -0,0 +1,43 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+<!-- this is the correct form
+ <part name="zipcode" type="xsd:string"/>
+-->
+ <part type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_port.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_port.wsdl
new file mode 100755
index 0000000000..f182c01cb6
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_port.wsdl
@@ -0,0 +1,43 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+<!-- This is the correct form
+ <port name="port" binding="tns:binding">
+-->
+ <port binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_operation.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_operation.wsdl
new file mode 100755
index 0000000000..f1fd4eba9c
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_operation.wsdl
@@ -0,0 +1,40 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="bogusOperationName"> <!-- The error is here -->
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_portType.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_portType.wsdl
new file mode 100755
index 0000000000..bdfac4d13d
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_portType.wsdl
@@ -0,0 +1,40 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+ <part name="zipcode" type="xsd:string"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:bogusPortType"> <!-- The error is here -->
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_type_for_part.wsdl b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_type_for_part.wsdl
new file mode 100755
index 0000000000..1706ac2f13
--- /dev/null
+++ b/sca-cpp/trunk/contrib/runtime/core/test/wsdlTests/wsdls_erroneous/missing_type_for_part.wsdl
@@ -0,0 +1,43 @@
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ targetNamespace="http://www.tuscany.com/tests/duplicate_services.wsdl"
+ name="duplicate_services">
+
+ <message name="request">
+<!-- this is the correct form
+ <part name="zipcode" type="xsd:string"/>
+-->
+ <part name="zipcode"/>
+ </message>
+ <message name="response">
+ <part name="host" type="xsd:string"/>
+ <part name="port" type="xsd:string"/>
+ </message>
+ <portType name="portType">
+ <!-- Request/response -->
+ <operation name="test">
+ <input message="tns:request"/>
+ <output message="tns:response"/>
+ </operation>
+ </portType>
+ <binding name="binding" type="tns:portType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test">
+ <soap:operation soapAction="http://www.tuscany.com/test/duplicate_services"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="service">
+ <port name="port" binding="tns:binding">
+ <soap:address location="http://localhost/sca/tests"/>
+ </port>
+ </service>
+</definitions>