diff options
Diffstat (limited to 'sca-cpp/trunk/runtime/core/test/wsdlTests')
26 files changed, 1917 insertions, 0 deletions
diff --git a/sca-cpp/trunk/runtime/core/test/wsdlTests/BaseWsdlTest.cpp b/sca-cpp/trunk/runtime/core/test/wsdlTests/BaseWsdlTest.cpp new file mode 100755 index 0000000000..88563e5dfa --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/BaseWsdlTest.h b/sca-cpp/trunk/runtime/core/test/wsdlTests/BaseWsdlTest.h new file mode 100755 index 0000000000..7a2be5db5f --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/WSDLDefinitionTest.cpp b/sca-cpp/trunk/runtime/core/test/wsdlTests/WSDLDefinitionTest.cpp new file mode 100755 index 0000000000..df5e22bd68 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/WSDLDefinitionTest.h b/sca-cpp/trunk/runtime/core/test/wsdlTests/WSDLDefinitionTest.h new file mode 100755 index 0000000000..fb536b2153 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/WSDLErrorsTest.cpp b/sca-cpp/trunk/runtime/core/test/wsdlTests/WSDLErrorsTest.cpp new file mode 100755 index 0000000000..573c88d7ad --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/WSDLErrorsTest.h b/sca-cpp/trunk/runtime/core/test/wsdlTests/WSDLErrorsTest.h new file mode 100755 index 0000000000..e17d0edd28 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdlTests.h b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdlTests.h new file mode 100755 index 0000000000..f8d86133c1 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_correct/simple.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_correct/simple.wsdl new file mode 100644 index 0000000000..c9fe542dbd --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_input.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_input.wsdl new file mode 100755 index 0000000000..07423d3556 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_output.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_binding_output.wsdl new file mode 100755 index 0000000000..4c295bf0f5 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_bindings.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_bindings.wsdl new file mode 100755 index 0000000000..39932da219 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_messages.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_messages.wsdl new file mode 100755 index 0000000000..e0388f19d6 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_partnames.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_partnames.wsdl new file mode 100755 index 0000000000..6b5b1630e0 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_portTypes.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_portTypes.wsdl new file mode 100755 index 0000000000..1bbe57bbad --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_services.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_services.wsdl new file mode 100755 index 0000000000..e16d04a5ec --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_address.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_address.wsdl new file mode 100755 index 0000000000..01af450396 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_binding.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_binding.wsdl new file mode 100755 index 0000000000..a2dac5e15e --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_body.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_body.wsdl new file mode 100755 index 0000000000..3918b9e6f1 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_operation.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/duplicate_soap_operation.wsdl new file mode 100755 index 0000000000..542d60b7cb --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/missing_binding_for_port.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/missing_binding_for_port.wsdl new file mode 100755 index 0000000000..cfcb65f149 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/missing_message.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/missing_message.wsdl new file mode 100755 index 0000000000..ec2d17204d --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_part.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_part.wsdl new file mode 100755 index 0000000000..4e927e222f --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_port.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/missing_name_for_port.wsdl new file mode 100755 index 0000000000..f182c01cb6 --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/missing_operation.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/missing_operation.wsdl new file mode 100755 index 0000000000..f1fd4eba9c --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/missing_portType.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/missing_portType.wsdl new file mode 100755 index 0000000000..bdfac4d13d --- /dev/null +++ b/sca-cpp/trunk/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/runtime/core/test/wsdlTests/wsdls_erroneous/missing_type_for_part.wsdl b/sca-cpp/trunk/runtime/core/test/wsdlTests/wsdls_erroneous/missing_type_for_part.wsdl new file mode 100755 index 0000000000..1706ac2f13 --- /dev/null +++ b/sca-cpp/trunk/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> |