├── .clang-format ├── .cmake-format.py ├── .codedocs ├── .codespellrc ├── .github └── workflows │ ├── build.yml │ ├── documentation.yml │ └── tidyclazy.yml ├── .gitignore ├── .gitmodules ├── .krazy ├── .mdlrc ├── .mdlrc.rb ├── .pep8 ├── .pre-commit-config.yaml ├── .pylintrc ├── CMakeLists.txt ├── CMakePresets.json ├── CONTRIBUTORS.txt ├── FindKDSoap.cmake ├── INSTALL.txt ├── KDSoapConfig-buildtree.cmake.in ├── KDSoapConfig.cmake.in ├── KDSoapMacros.cmake.in ├── LICENSE.txt ├── LICENSES ├── BSD-3-Clause.txt ├── GPL-2.0-only.txt ├── LicenseRef-Microsoft.txt ├── LicenseRef-Novell.txt ├── LicenseRef-OASIS.txt ├── LicenseRef-SportingExchange.txt ├── MIT.txt └── W3C.txt ├── README.md ├── REUSE.toml ├── cmake ├── ECM │ └── modules │ │ ├── BSD-3-Clause.txt │ │ ├── ECMEnableSanitizers.cmake │ │ ├── ECMGenerateHeaders.cmake │ │ ├── ECMGeneratePriFile.cmake │ │ ├── ECMQueryQmake.cmake │ │ ├── ECMQueryQt.cmake │ │ ├── ECMSetupVersion.cmake │ │ ├── ECMUninstallTarget.cmake │ │ ├── ECMVersionHeader.h.in │ │ ├── QtVersionOption.cmake │ │ └── ecm_uninstall.cmake.in └── KDAB │ └── modules │ ├── KDCompilerFlags.cmake │ ├── KDFunctions.cmake │ ├── KDInstallLocation.cmake │ └── KDQtInstallPaths.cmake ├── conan ├── README.txt └── conanfile.py ├── deploy └── release-kdsoap.sh ├── distro ├── debian.changelog ├── debian.compat ├── qt5-debian.control ├── qt5-debian.rules ├── qt5-kdsoap.dsc ├── qt5-kdsoap.spec ├── qt6-debian.control ├── qt6-debian.rules ├── qt6-kdsoap.dsc └── qt6-kdsoap.spec ├── docs ├── CHANGES_1_1.txt ├── CHANGES_1_10.txt ├── CHANGES_1_2.txt ├── CHANGES_1_3.txt ├── CHANGES_1_4.txt ├── CHANGES_1_5.txt ├── CHANGES_1_5_1.txt ├── CHANGES_1_6.txt ├── CHANGES_1_7.txt ├── CHANGES_1_8.txt ├── CHANGES_1_9.txt ├── CHANGES_2_0.txt ├── CHANGES_2_1.txt ├── CHANGES_2_1_1.txt ├── CHANGES_2_2.txt ├── CHANGES_2_3.txt ├── CMakeLists.txt ├── api │ ├── CMakeLists.txt │ ├── Doxyfile.cmake │ ├── doxygen-awesome.css │ ├── doxygen.css │ ├── footer.html │ ├── header.html │ ├── kdab-logo-22x22.png │ └── xmldiagram2.png ├── kdsoap-server-design.odg ├── kdsoap-server-design.png └── manual │ └── kdsoap.pdf ├── examples ├── CMakeLists.txt ├── bank_gui │ ├── BLZService.wsdl │ ├── CMakeLists.txt │ ├── bank_gui.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── resources.qrc │ └── spinner.gif ├── bank_wsdl │ ├── BLZService.wsdl │ ├── CMakeLists.txt │ └── bank_wsdl.cpp ├── helloworld_client │ ├── CMakeLists.txt │ ├── helloworld_client.h │ └── main.cpp └── helloworld_server │ ├── CMakeLists.txt │ ├── helloworld.wsdl │ ├── helloworld_serverobject.cpp │ ├── helloworld_serverobject.h │ └── main.cpp ├── features ├── CMakeLists.txt └── kdsoap.prf ├── images ├── kdsoap-medium.png ├── kdsoap-small.png ├── kdsoap-trademark.png └── kdsoap256.png ├── kdsoap.bat ├── kdsoap.pri ├── kdwsdl2cpp.pri ├── kdwsdl2cpp ├── CMakeLists.txt ├── kode_export.h ├── schemas │ ├── schemas.qrc │ ├── soapenc-1.1.xsd │ └── soapenc-1.2.xsd ├── src │ ├── compiler.cpp │ ├── compiler.h │ ├── converter.cpp │ ├── converter.h │ ├── converter_clientstub.cpp │ ├── converter_complextype.cpp │ ├── converter_serverstub.cpp │ ├── converter_simpletype.cpp │ ├── creator.cpp │ ├── creator.h │ ├── elementargumentserializer.cpp │ ├── elementargumentserializer.h │ ├── kwsdlcfg.xsd │ ├── main.cpp │ ├── namemapper.cpp │ ├── namemapper.h │ ├── settings.cpp │ ├── settings.h │ ├── typemap.cpp │ └── typemap.h └── wsdl │ ├── abstractbinding.h │ ├── binding.cpp │ ├── binding.h │ ├── bindingoperation.cpp │ ├── bindingoperation.h │ ├── definitions.cpp │ ├── definitions.h │ ├── element.cpp │ ├── element.h │ ├── fault.cpp │ ├── fault.h │ ├── import.cpp │ ├── import.h │ ├── message.cpp │ ├── message.h │ ├── operation.cpp │ ├── operation.h │ ├── param.cpp │ ├── param.h │ ├── part.cpp │ ├── part.h │ ├── port.cpp │ ├── port.h │ ├── porttype.cpp │ ├── porttype.h │ ├── service.cpp │ ├── service.h │ ├── soapbinding.cpp │ ├── soapbinding.h │ ├── type.cpp │ ├── type.h │ ├── wsdl.cpp │ └── wsdl.h ├── scripts └── genignore.py ├── src ├── CMakeLists.txt ├── KDSoapClient │ ├── CMakeLists.txt │ ├── KDDateTime.cpp │ ├── KDDateTime.h │ ├── KDQName.cpp │ ├── KDQName.h │ ├── KDSoap.h │ ├── KDSoapAuthentication.cpp │ ├── KDSoapAuthentication.h │ ├── KDSoapClientInterface.cpp │ ├── KDSoapClientInterface.h │ ├── KDSoapClientInterface_p.h │ ├── KDSoapClientThread.cpp │ ├── KDSoapClientThread_p.h │ ├── KDSoapEndpointReference.cpp │ ├── KDSoapEndpointReference.h │ ├── KDSoapFaultException.cpp │ ├── KDSoapFaultException.h │ ├── KDSoapGlobal.h │ ├── KDSoapJob.cpp │ ├── KDSoapJob.h │ ├── KDSoapMessage.cpp │ ├── KDSoapMessage.h │ ├── KDSoapMessageAddressingProperties.cpp │ ├── KDSoapMessageAddressingProperties.h │ ├── KDSoapMessageReader.cpp │ ├── KDSoapMessageReader_p.h │ ├── KDSoapMessageWriter.cpp │ ├── KDSoapMessageWriter_p.h │ ├── KDSoapNamespaceManager.cpp │ ├── KDSoapNamespaceManager.h │ ├── KDSoapNamespacePrefixes.cpp │ ├── KDSoapNamespacePrefixes_p.h │ ├── KDSoapPendingCall.cpp │ ├── KDSoapPendingCall.h │ ├── KDSoapPendingCallWatcher.cpp │ ├── KDSoapPendingCallWatcher.h │ ├── KDSoapPendingCallWatcher_p.h │ ├── KDSoapPendingCall_p.h │ ├── KDSoapReplySslHandler.cpp │ ├── KDSoapReplySslHandler_p.h │ ├── KDSoapSslHandler.cpp │ ├── KDSoapSslHandler.h │ ├── KDSoapUdpClient.cpp │ ├── KDSoapUdpClient.h │ ├── KDSoapUdpClient_p.h │ ├── KDSoapValue.cpp │ ├── KDSoapValue.h │ └── doxygen.cpp └── KDSoapServer │ ├── CMakeLists.txt │ ├── KDSoapDelayedResponseHandle.cpp │ ├── KDSoapDelayedResponseHandle.h │ ├── KDSoapServer.cpp │ ├── KDSoapServer.h │ ├── KDSoapServerAuthInterface.cpp │ ├── KDSoapServerAuthInterface.h │ ├── KDSoapServerCustomVerbRequestInterface.cpp │ ├── KDSoapServerCustomVerbRequestInterface.h │ ├── KDSoapServerGlobal.h │ ├── KDSoapServerObjectInterface.cpp │ ├── KDSoapServerObjectInterface.h │ ├── KDSoapServerRawXMLInterface.cpp │ ├── KDSoapServerRawXMLInterface.h │ ├── KDSoapServerSocket.cpp │ ├── KDSoapServerSocket_p.h │ ├── KDSoapServerThread.cpp │ ├── KDSoapServerThread_p.h │ ├── KDSoapSocketList.cpp │ ├── KDSoapSocketList_p.h │ ├── KDSoapThreadPool.cpp │ └── KDSoapThreadPool.h ├── testtools ├── CMakeLists.txt ├── certs │ ├── README.txt │ ├── cacert.pem │ ├── cakey.pem │ ├── test-127.0.0.1-cert.pem │ └── test-127.0.0.1-key.pem ├── httpserver_p.cpp ├── httpserver_p.h └── testtools.qrc └── unittests ├── CMakeLists.txt ├── QSharedPointer_include ├── CMakeLists.txt ├── test_qsharedpointer_include.cpp └── test_qsharedpointer_include_wsdl.wsdl ├── add_test_subdir.sh ├── basic ├── CMakeLists.txt └── test_basic.cpp ├── builtinhttp ├── CMakeLists.txt └── test_builtinhttp.cpp ├── clearbooks ├── CMakeLists.txt ├── clearbooks.wsdl └── test_clearbooks.cpp ├── cribis ├── CMakeLists.txt ├── CribisSKWS.wsdl └── test_cribis.cpp ├── date_example ├── CMakeLists.txt ├── date_example.wsdl └── test_date_example.cpp ├── default_attribute_value_wsdl ├── CMakeLists.txt ├── default_attribute_value.wsdl └── test_default_attribute_value_wsdl.cpp ├── dv_terminalauth ├── BasicTypes_DV_TerminalAuth.xsd ├── CMakeLists.txt ├── WS_DV_TerminalAuth.wsdl └── test_dv_terminalauth.cpp ├── dwservice_12_wsdl ├── CMakeLists.txt ├── DWService_12.wsdl └── test_dwservice_12_wsdl.cpp ├── dwservice_combined_wsdl ├── CMakeLists.txt ├── DWServiceCombined.wsdl └── test_dwservice_combined_wsdl.cpp ├── dwservice_wsdl ├── CMakeLists.txt ├── DWService.wsdl └── test_dwservice_wsdl.cpp ├── element_ns_wsdl ├── CMakeLists.txt ├── test.wsdl ├── test_element_ns_wsdl.cpp └── test_element_ns_wsdl.h ├── empty_element_wsdl ├── CMakeLists.txt ├── empty_element.wsdl └── test_empty_element_wsdl.cpp ├── empty_list_wsdl ├── 1.xsd ├── 2.xsd ├── 3.xsd ├── CMakeLists.txt ├── empty_list.wsdl └── test_empty_list_wsdl.cpp ├── empty_response_wsdl ├── CMakeLists.txt ├── test.wsdl └── test_issue1.cpp ├── encapsecurity ├── CMakeLists.txt ├── authstateless.wsdl ├── test_encapsecurity.cpp └── xsdfiles │ ├── file0.xsd │ ├── file1.xsd │ ├── file2.xsd │ ├── file3.xsd │ ├── file4.xsd │ └── schema.xsd ├── enum_escape ├── CMakeLists.txt ├── test_enum.cpp └── test_enum.wsdl ├── enum_with_length_restriction ├── AtelierBovinIPG.XSD ├── CMakeLists.txt ├── CategorieBovinIPG.XSD ├── test_enum.cpp ├── test_enum.wsdl └── test_enum_length_restriction.cpp ├── enzo ├── CMakeLists.txt ├── EnzoService.wsdl ├── EnzoServiceWsdl0.xml ├── test_enzo.cpp ├── xsd0.xsd ├── xsd1.xsd ├── xsd2.xsd ├── xsd3.xsd └── xsd4.xsd ├── fault_namespace ├── CMakeLists.txt └── test_fault_namespace.cpp ├── groupwise_wsdl ├── CMakeLists.txt ├── events.xsd ├── groupwise.wsdl ├── methods.xsd ├── test_groupwise_wsdl.cpp └── types.xsd ├── ihc_wsdl ├── CMakeLists.txt ├── resourceinteraction.wsdl └── test_ihc.cpp ├── import_definition ├── CMakeLists.txt ├── import_definition.wsdl ├── import_definition_schema.xsd ├── import_definition_wsdl.wsdl └── test_import_definition.cpp ├── kddatetime ├── CMakeLists.txt └── test_kddatetime.cpp ├── keep_unused_types ├── CMakeLists.txt ├── keep_unused_types.cpp └── keep_unused_types.wsdl ├── literal_true_false ├── CMakeLists.txt ├── literal.wsdl └── test_literal.cpp ├── logbook_wsdl ├── CMakeLists.txt ├── logbookifv3.wsdl └── test_logbook_wsdl.cpp ├── messagereader ├── CMakeLists.txt ├── request.xml └── test_messagereader.cpp ├── msexchange_noservice_wsdl ├── CMakeLists.txt ├── Services_noservice.wsdl ├── messages.xsd ├── test_msexchange_noservice_wsdl.cpp └── types.xsd ├── msexchange_wsdl ├── CMakeLists.txt ├── Services.wsdl ├── messages.xsd ├── test_msexchange_wsdl.cpp └── types.xsd ├── multiple_input_param ├── CMakeLists.txt ├── helloworldextended.wsdl └── test_multiple_input_param.cpp ├── optionaltype_boost_optional ├── CMakeLists.txt ├── test.wsdl ├── test_boostapi.cpp └── test_boostapi.h ├── optionaltype_pointer ├── CMakeLists.txt ├── test.wsdl ├── test_optionaltype_pointer.cpp └── test_optionaltype_pointer.h ├── optionaltype_regular ├── CMakeLists.txt ├── test.wsdl ├── test_optionaltype_regular.cpp └── test_optionaltype_regular.h ├── pki.pca.dfn.de ├── CMakeLists.txt ├── pki.pca.dfn.de.wsdl └── test_pki.cpp ├── prefix_wsdl ├── CMakeLists.txt ├── kdtest.wsdl └── test_prefix.cpp ├── runTest.bat ├── salesforce_wsdl ├── CMakeLists.txt ├── salesforce-partner.wsdl └── test_salesforce_wsdl.cpp ├── serverlib ├── CMakeLists.txt └── test_serverlib.cpp ├── soap12 ├── CMakeLists.txt ├── soap12.wsdl └── test_soap12.cpp ├── soap_over_udp ├── CMakeLists.txt ├── docs.oasis-open.org │ └── ws-dd │ │ └── discovery │ │ └── 1.1 │ │ └── os │ │ └── wsdd-discovery-1.1-schema-os.xsd ├── test_soap_over_udp.cpp ├── wsdd-discovery-200901.wsdl └── www.w3.org │ └── 2006 │ └── 03 │ └── addressing │ └── ws-addr.xsd ├── specialchars_wsdl ├── CMakeLists.txt ├── test.wsdl └── test_specialchars_wsdl.cpp ├── sugar_wsdl ├── CMakeLists.txt ├── sugarcrm.wsdl └── test_sugar_wsdl.cpp ├── tech3356_wsdl ├── CMakeLists.txt ├── baseMediaService-V1_0_7.xsd ├── description-V1_0_7.xsd ├── test_tech3356.cpp ├── transformMedia-V1_0_7.wsdl ├── transformMedia-V1_0_7.xsd └── xml.xsd ├── test_calc ├── CMakeLists.txt ├── calc.wsdl └── test_calc.cpp ├── uitapi ├── CMakeLists.txt ├── test_uitapi.cpp └── uitapi.wsdl ├── unqualified_formdefault ├── CMakeLists.txt ├── test_unqualified.cpp └── unqualified.wsdl ├── vidyo ├── CMakeLists.txt ├── VidyoPortalGuestService.wsdl └── test_vidyo.cpp ├── webcalls ├── CMakeLists.txt └── test_webcalls.cpp ├── webcalls_wsdl ├── BFGlobalService.wsdl ├── BLZService.wsdl ├── CMakeLists.txt ├── OrteLookup.wsdl └── test_webcalls_wsdl.cpp ├── ws_addressing_support ├── CMakeLists.txt ├── test_wsaddressing.cpp └── wsaddressing.wsdl ├── ws_discovery_wsdl ├── CMakeLists.txt ├── schemas.xmlsoap.org │ └── ws │ │ ├── 2004 │ │ └── 08 │ │ │ └── addressing │ │ └── 2005 │ │ └── 04 │ │ └── discovery │ │ └── ws-discovery.xsd ├── test_ws_discovery_wsdl.cpp └── ws_discovery200504.wsdl ├── ws_usernametoken_support ├── CMakeLists.txt ├── test_wsusernametoken.cpp └── wsusernametoken.wsdl ├── wsdl_document ├── CMakeLists.txt ├── mywsdl_document.wsdl ├── test_wsdl_document.cpp ├── thomas-bayer.wsdl └── thomas-bayer.xsd ├── wsdl_rpc-server ├── CMakeLists.txt ├── rpcexample.wsdl ├── sayhello.wsdl └── test_wsdl_rpc_server.cpp └── wsdl_rpc ├── CMakeLists.txt ├── mywsdl_rpc.wsdl └── test_wsdl_rpc.cpp /.codespellrc: -------------------------------------------------------------------------------- 1 | [codespell] 2 | skip = *.wsdl,*.xsd,*.XSD,*.ts,./kdwsdl2cpp/libkode,./build-*,.git 3 | interactive = 3 4 | ignore-words-list = crosssite,statics 5 | -------------------------------------------------------------------------------- /.github/workflows/documentation.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | name: Deploy doxygen to GitHub Pages 6 | 7 | on: 8 | push: 9 | branches: 10 | - kdsoap-2.2 11 | 12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 20 | concurrency: 21 | group: "pages" 22 | cancel-in-progress: false 23 | 24 | jobs: 25 | build: 26 | runs-on: ubuntu-latest 27 | 28 | steps: 29 | - name: Install Dependencies on Linux 30 | run: | 31 | sudo apt update -qq 32 | sudo apt install -y doxygen 33 | 34 | - name: Install Qt 35 | uses: jurplel/install-qt-action@v3 36 | with: 37 | aqtversion: null # use whatever the default is 38 | version: 5.15.2 39 | cache: true 40 | 41 | - name: Checkout sources 42 | uses: actions/checkout@v4 43 | with: 44 | submodules: recursive 45 | 46 | - name: Configure project 47 | run: > 48 | cmake -S . -B ./build -DKDSoap_DOCS=ON 49 | 50 | - name: Create docs 51 | run: cmake --build ./build --target docs 52 | 53 | - name: Upload artifact 54 | uses: actions/upload-pages-artifact@v3 55 | with: 56 | path: build/docs/api/html/ 57 | 58 | # Deployment job, what was uploaded to artifact 59 | deploy: 60 | needs: build 61 | runs-on: ubuntu-latest 62 | environment: 63 | name: github-pages 64 | url: ${{ steps.deployment.outputs.page_url }} 65 | 66 | steps: 67 | - name: Deploy to GitHub Pages 68 | id: deployment 69 | uses: actions/deploy-pages@v4 70 | -------------------------------------------------------------------------------- /.github/workflows/tidyclazy.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | name: Tidy / Clazy / cppcheck 6 | 7 | on: 8 | push: 9 | branches: 10 | - master 11 | - kdsoap-2.1 12 | - kdsoap-2.2 13 | pull_request: 14 | branches: 15 | - master 16 | - kdsoap-2.1 17 | - kdsoap-2.2 18 | 19 | jobs: 20 | build: 21 | runs-on: ${{ matrix.os }} 22 | strategy: 23 | fail-fast: true 24 | matrix: 25 | os: 26 | - ubuntu-latest 27 | 28 | config: 29 | - name: clang-tidy 30 | preset: "clang-tidy" 31 | qt_version: "6.6" 32 | 33 | - name: clazy 34 | preset: "clazy" 35 | qt_version: "6.6" 36 | apt_pgks: 37 | - clazy 38 | - cppcheck 39 | 40 | steps: 41 | - name: Install Qt ${{ matrix.config.qt_version }} with options and default aqtversion 42 | uses: jurplel/install-qt-action@v3 43 | with: 44 | version: ${{ matrix.config.qt_version }} 45 | cache: true 46 | 47 | - name: Install ninja-build tool (must be after Qt due PATH changes) 48 | uses: turtlesec-no/get-ninja@main 49 | 50 | - name: Install dependencies on Ubuntu (${{ join(matrix.config.apt_pgks, ' ') }}) 51 | if: ${{ runner.os == 'Linux' && matrix.config.apt_pgks }} 52 | run: | 53 | sudo apt update -qq 54 | echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y 55 | 56 | - name: Checkout sources 57 | uses: actions/checkout@v4 58 | 59 | - name: Fetch Git submodules 60 | run: git submodule update --init --recursive 61 | 62 | - name: Configure project 63 | run: > 64 | cmake --preset=${{ matrix.config.preset }} 65 | 66 | - name: Build Project 67 | run: cmake --build --preset=${{ matrix.config.preset }} 68 | 69 | - name: Run cppcheck 70 | if: ${{ matrix.config.preset == 'clazy' }} 71 | run: cmake --build --preset=${{ matrix.config.preset }} --target cppcheck 72 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.* 3 | *.pro.user 4 | *.pro.user* 5 | *.so 6 | *.so.* 7 | *.exe 8 | moc_* 9 | *.moc 10 | *.obj 11 | *.directory 12 | testtools/qrc_testtools.cpp 13 | lib 14 | bin 15 | generated 16 | .qmake.cache 17 | CMakeLists.txt.user 18 | _moc 19 | _obj 20 | *.o 21 | .license.accepted 22 | CPackConfig.cmake 23 | autogen.pyc 24 | configure.bat 25 | configure.sh 26 | .qmake.stash 27 | 28 | /build 29 | 30 | /include 31 | 32 | /examples/holidays_gui/qrc_resources.cpp 33 | /examples/holidays_gui/wsdl_holidays.cpp 34 | /examples/holidays_gui/wsdl_holidays.h 35 | /examples/holidays_wsdl/wsdl_holidays.cpp 36 | /examples/holidays_wsdl/wsdl_holidays.h 37 | 38 | /unittests/*/wsdl_*.cpp 39 | /unittests/*/wsdl_*.h 40 | /unittests/basic/basic 41 | /unittests/builtinhttp/builtinhttp 42 | /unittests/dwservice_12_wsdl/dwservice_12_wsdl 43 | /unittests/dwservice_combined_wsdl/dwservice_combined_wsdl 44 | /unittests/dwservice_wsdl/dwservice_wsdl 45 | /unittests/groupwise_wsdl/groupwise_wsdl 46 | /unittests/ihc_wsdl/ihc_wsdl 47 | /unittests/issue1/issue1 48 | /unittests/issue4/issue4 49 | /unittests/issue38/issue38 50 | /unittests/issue42/issue42 51 | /unittests/logbook_wsdl/logbook_wsdl 52 | /unittests/messagereader/messagereader 53 | /unittests/msexchange_wsdl/msexchange_wsdl 54 | /unittests/salesforce_wsdl/salesforce_wsdl 55 | /unittests/servertest/servertest 56 | /unittests/soap12/soap12 57 | /unittests/sugar_wsdl/sugar_wsdl 58 | /unittests/import_definition/import_definition 59 | /unittests/tech3356_wsdl/tech3356_wsdl 60 | /unittests/webcalls/webcalls 61 | /unittests/webcalls_wsdl/webcalls_wsdl 62 | /unittests/wsdl_document/wsdl_document 63 | /unittests/wsdl_rpc-server/wsdl_rpc-server 64 | /unittests/unqualified_formdefault/unqualified_formdefault 65 | /unittests/faults_support/faults_support 66 | /unittests/wsdl_rpc/wsdl_rpc 67 | /unittests/enum_escape/enum_escape 68 | /unittests/literal_true_false/literal_true_false 69 | /unittests/msexchange_noservice_wsdl/msexchange_noservice_wsdl 70 | /build-* 71 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "kdwsdl2cpp/libkode"] 2 | path = kdwsdl2cpp/libkode 3 | url = https://github.com/cornelius/libkode 4 | -------------------------------------------------------------------------------- /.krazy: -------------------------------------------------------------------------------- 1 | CHECKSETS qt5,c++,foss 2 | 3 | #KDAB-specific checks 4 | EXTRA kdabcopyright-reuse,fosslicense-reuse 5 | 6 | #exclude checks now being done by clazy or clang-tools 7 | EXCLUDE includes,strings,explicit,normalize,passbyvalue,operators,nullstrcompare,nullstrassign,doublequote_chars,qobject,sigsandslots,staticobjects,cpp 8 | #exclude more checks 9 | EXCLUDE qminmax,captruefalse,dpointer,inline,constref 10 | #exclude spelling as codespell is much, much better tool 11 | #too many false positives 12 | EXCLUDE insecurenet 13 | EXCLUDE spelling 14 | EXCLUDE style 15 | 16 | #if you have a build subdir, skip it 17 | SKIP /build- 18 | 19 | #skip 3rdparty 20 | SKIP /libkode/ 21 | SKIP /kdwsdl2cpp/ 22 | SKIP /KDQName\.cpp|/KDQName\.h 23 | 24 | #skip scripts 25 | SKIP /scripts/ 26 | #skip other cmake 27 | SKIP Doxyfile.cmake 28 | SKIP \.cmake-format\.py 29 | 30 | #skip the borrowed code in the cmake subdir 31 | SKIP cmake/ECM|/cmake/KDAB/ 32 | -------------------------------------------------------------------------------- /.mdlrc: -------------------------------------------------------------------------------- 1 | style ".mdlrc.rb" 2 | -------------------------------------------------------------------------------- /.mdlrc.rb: -------------------------------------------------------------------------------- 1 | all 2 | rule 'MD013', :line_length => 100, :tables => false 3 | rule 'MD029', :style => :ordered 4 | exclude_rule 'MD033' 5 | exclude_rule 'MD041' 6 | -------------------------------------------------------------------------------- /.pep8: -------------------------------------------------------------------------------- 1 | [pycodestyle] 2 | max_line_length = 120 3 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # See https://pre-commit.com for more information 2 | # See https://pre-commit.com/hooks.html for more hooks 3 | 4 | ci: 5 | autoupdate_schedule: monthly 6 | 7 | exclude: ^(cmake/ECM/|cmake/KDAB/|docs/api/doxygen-awesome.css) 8 | repos: 9 | - repo: https://github.com/pre-commit/pre-commit-hooks 10 | rev: v5.0.0 11 | hooks: 12 | - id: trailing-whitespace 13 | - id: end-of-file-fixer 14 | - id: check-added-large-files 15 | - id: check-case-conflict 16 | - id: check-yaml 17 | args: [--allow-multiple-documents] 18 | - id: check-json 19 | - id: check-symlinks 20 | - id: destroyed-symlinks 21 | - id: check-executables-have-shebangs 22 | - repo: https://github.com/pre-commit/mirrors-clang-format 23 | rev: v19.1.7 24 | hooks: 25 | - id: clang-format 26 | - repo: https://github.com/PyCQA/pylint 27 | rev: v3.3.4 28 | hooks: 29 | - id: pylint 30 | exclude: ^(.cmake-format.py|conan/conanfile.py|scripts/genignore.py) 31 | - repo: https://github.com/hhatto/autopep8 32 | rev: v2.3.2 33 | hooks: 34 | - id: autopep8 35 | exclude: ^(.cmake-format.py|conan/conanfile.py) 36 | - repo: https://github.com/codespell-project/codespell 37 | rev: v2.4.1 38 | hooks: 39 | - id: codespell 40 | - repo: https://github.com/cheshirekow/cmake-format-precommit 41 | rev: v0.6.13 42 | hooks: 43 | - id: cmake-lint 44 | exclude: (.py.cmake|Doxyfile.cmake) 45 | - id: cmake-format 46 | exclude: (.py.cmake|Doxyfile.cmake) 47 | - repo: https://github.com/markdownlint/markdownlint 48 | rev: v0.12.0 49 | hooks: 50 | - id: markdownlint 51 | entry: mdl 52 | language: ruby 53 | files: \.(md|mdown|markdown)$ 54 | - repo: https://github.com/fsfe/reuse-tool 55 | rev: v5.0.2 56 | hooks: 57 | - id: reuse 58 | -------------------------------------------------------------------------------- /CONTRIBUTORS.txt: -------------------------------------------------------------------------------- 1 | Casper Meijn 2 | Matt Broadstone 3 | Raphaël Cotty 4 | Rok Mandeljc 5 | Ryan van der Bijl 6 | Miklós Márton 7 | Research & Engineering Center of St. Petersburg Electro-Technical University 8 | -------------------------------------------------------------------------------- /FindKDSoap.cmake: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2011 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | include(FindPackageHandleStandardArgs) 9 | 10 | find_library( 11 | KDSoap_LIBRARIES 12 | NAMES KDSoap kdsoap 13 | PATH_SUFFIXES bin 14 | ) 15 | 16 | find_path( 17 | KDSoap_INCLUDE_DIR 18 | NAMES KDSoapClient/KDSoapValue.h 19 | PATH_SUFFIXES include src 20 | ) 21 | 22 | find_program( 23 | KDSoap_CODEGENERATOR 24 | NAMES kdwsdl2cpp 25 | PATH_SUFFIXES bin 26 | ) 27 | 28 | mark_as_advanced(KDSoap_LIBRARIES KDSoap_INCLUDE_DIR KDSoap_CODEGENERATOR) 29 | 30 | find_package_handle_standard_args( 31 | KDSoap 32 | DEFAULT_MSG 33 | KDSoap_LIBRARIES 34 | KDSoap_INCLUDE_DIR 35 | KDSoap_CODEGENERATOR 36 | ) 37 | -------------------------------------------------------------------------------- /KDSoapConfig-buildtree.cmake.in: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2013 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | 9 | set(KDSoap_INCLUDE_DIRS "@INSTALL_INCLUDE_DIR@") 10 | 11 | include("${CMAKE_CURRENT_LIST_DIR}/KDSoapTargets.cmake") 12 | include("${CMAKE_CURRENT_LIST_DIR}/KDSoapMacros.cmake") 13 | -------------------------------------------------------------------------------- /KDSoapConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | @PACKAGE_INIT@ 9 | 10 | include(CMakeFindDependencyMacro) 11 | 12 | find_dependency(Qt@QT_VERSION_MAJOR@Core @QT_MIN_VERSION@) 13 | find_dependency(Qt@QT_VERSION_MAJOR@Network @QT_MIN_VERSION@) 14 | 15 | set_and_check(KDSoap_INCLUDE_DIR "@PACKAGE_INSTALL_INCLUDE_DIR@") 16 | 17 | set(KDSoap_INCLUDE_DIRS "${KDSoap_INCLUDE_DIR}") 18 | set(KDSoap_CODEGENERATOR KDSoap::kdwsdl2cpp) 19 | 20 | include("${CMAKE_CURRENT_LIST_DIR}/KDSoapTargets.cmake") 21 | include("${CMAKE_CURRENT_LIST_DIR}/KDSoapMacros.cmake") 22 | -------------------------------------------------------------------------------- /KDSoapMacros.cmake.in: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2011 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | macro(KDSOAP_GENERATE_WSDL _sources) 9 | set(KDWSDL2CPP kdwsdl2cpp) 10 | if(KDSOAP_KDWSDL2CPP_COMPILER) 11 | set(KDWSDL2CPP ${KDSOAP_KDWSDL2CPP_COMPILER}) 12 | elseif(TARGET KDSoap::kdwsdl2cpp) 13 | set(KDWSDL2CPP KDSoap::kdwsdl2cpp) 14 | endif() 15 | set(_KSWSDL2CPP_OPTION) 16 | if(KSWSDL2CPP_OPTION) 17 | set(_KSWSDL2CPP_OPTION ${KSWSDL2CPP_OPTION}) 18 | endif() 19 | foreach(_source_FILE ${ARGN}) 20 | get_filename_component(_tmp_FILE ${_source_FILE} ABSOLUTE) 21 | get_filename_component(_basename ${_tmp_FILE} NAME_WE) 22 | set(_header_wsdl_FILE ${CMAKE_CURRENT_BINARY_DIR}/wsdl_${_basename}.h) 23 | set(_source_wsdl_FILE ${CMAKE_CURRENT_BINARY_DIR}/wsdl_${_basename}.cpp) 24 | add_custom_command(OUTPUT ${_header_wsdl_FILE} 25 | COMMAND ${KDWSDL2CPP} 26 | ARGS ${_KSWSDL2CPP_OPTION} ${_tmp_FILE} -o ${_header_wsdl_FILE} 27 | MAIN_DEPENDENCY ${_tmp_FILE} 28 | DEPENDS ${_tmp_FILE} ${KDWSDL2CPP}) 29 | 30 | add_custom_command(OUTPUT ${_source_wsdl_FILE} 31 | COMMAND ${KDWSDL2CPP} 32 | ARGS ${_KSWSDL2CPP_OPTION} -impl ${_header_wsdl_FILE} ${_tmp_FILE} -o ${_source_wsdl_FILE} 33 | MAIN_DEPENDENCY ${_tmp_FILE} ${_header_wsdl_FILE} 34 | DEPENDS ${_tmp_FILE} ${KDWSDL2CPP}) 35 | 36 | set_source_files_properties(${_header_wsdl_FILE} ${_source_wsdl_FILE} PROPERTIES 37 | SKIP_AUTOMOC ON 38 | SKIP_AUTOUIC ON 39 | ) 40 | qt@QT_VERSION_MAJOR@_wrap_cpp(_sources_MOCS ${_header_wsdl_FILE}) 41 | list(APPEND ${_sources} ${_header_wsdl_FILE} ${_source_wsdl_FILE} ${_sources_MOCS}) 42 | endforeach() 43 | endmacro() 44 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | License 2 | ======= 3 | The KD Soap Software is © Klarälvdalens Datakonsult AB (KDAB), and is 4 | available under the terms of the MIT license. 5 | 6 | Note that this project requires the 3rd party 'libkode' submodule 7 | that is licensed separately with LGPL-2.0-or-later; however, libkode 8 | is used for code-generation only and the resulting code can be made 9 | available under any license. 10 | 11 | Various other freely distributable files are contained in the unittests 12 | and are not used in the library code itself. 13 | 14 | See the full license texts in the LICENSES folder. 15 | -------------------------------------------------------------------------------- /LICENSES/BSD-3-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) . All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 26 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-SportingExchange.txt: -------------------------------------------------------------------------------- 1 | The presentation, distribution or other dissemination of the information contained herein by The Sporting Exchange Limited (Betfair) is not a license, either expressly or impliedly, to any intellectual property owned or controlled by Betfair. 2 | Save as provided by statute and to the fullest extent permitted by law, the following provisions set out the entire liability of Betfair (including any liability for the acts and omissions of its employees, agents and sub-contractors) to the User in respect of the use of its WSDL file whether in contract, tort, statute, equity or otherwise: 3 | (a) The User acknowledges and agrees that (except as expressly provided in this Agreement) the WSDL is provided "AS IS" without warranties of any kind (whether express or implied); 4 | (b) All conditions, warranties, terms and undertakings (whether express or implied, statutory or otherwise relating to the delivery, performance, quality, uninterrupted use, fitness for purpose, occurrence or reliability of the WSDL are hereby excluded to the fullest extent permitted by law; and 5 | (c) Betfair shall not be liable to the User for loss of profit (whether direct or indirect), loss of contracts or goodwill, lost advertising, loss of data or any type of special, indirect, consequential or economic loss (including loss or damage suffered by the User as a result of an action brought by a third party) even if such loss was reasonably foreseeable or Betfair had been advised of the possibility of the User incurring such loss. 6 | No exclusion or limitation set out in this Agreement shall apply in the case of fraud or fraudulent concealment, death or personal injury resulting from the negligence of either party or any of its employees, agents or sub-contractors; and/or any breach of the obligations implied by (as appropriate) section 12 of the Sale of Goods Act 1979, section 2 of the Supply of Goods and Services Act 1982 or section 8 of the Supply of Goods (Implied Terms) Act 1973. 7 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /cmake/ECM/modules/BSD-3-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) . All rights reserved. 2 | 3 | This license applies to the CMake ECM modules only. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its contributors 16 | may be used to endorse or promote products derived from this software without 17 | specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /cmake/ECM/modules/ECMQueryQmake.cmake: -------------------------------------------------------------------------------- 1 | if (${ECM_GLOBAL_FIND_VERSION} VERSION_GREATER_EQUAL 5.93) 2 | message(DEPRECATION "ECMQueryQmake.cmake is deprecated since 5.93, please use ECMQueryQt.cmake instead.") 3 | endif() 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/QtVersionOption.cmake) 6 | find_package(Qt${QT_MAJOR_VERSION}Core QUIET) 7 | 8 | if (Qt5Core_FOUND) 9 | set(_qmake_executable_default "qmake-qt5") 10 | endif () 11 | if (TARGET Qt5::qmake) 12 | get_target_property(_qmake_executable_default Qt5::qmake LOCATION) 13 | endif() 14 | set(QMAKE_EXECUTABLE ${_qmake_executable_default} 15 | CACHE FILEPATH "Location of the Qt5 qmake executable") 16 | 17 | # Helper method 18 | # This is not public API (yet)! 19 | # Usage: query_qmake( [TRY]) 20 | # Passing TRY will result in the method not failing fatal if no qmake executable 21 | # has been found, but instead simply returning an empty string 22 | function(query_qmake result_variable qt_variable) 23 | set(options TRY) 24 | set(oneValueArgs ) 25 | set(multiValueArgs ) 26 | 27 | cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) 28 | 29 | if(NOT QMAKE_EXECUTABLE) 30 | if(ARGS_TRY) 31 | set(${result_variable} "" PARENT_SCOPE) 32 | message(STATUS "No qmake Qt5 binary found. Can't check ${qt_variable}") 33 | return() 34 | else() 35 | message(FATAL_ERROR "No qmake Qt5 binary found. Can't check ${qt_variable} as required") 36 | endif() 37 | endif() 38 | execute_process( 39 | COMMAND ${QMAKE_EXECUTABLE} -query "${qt_variable}" 40 | RESULT_VARIABLE return_code 41 | OUTPUT_VARIABLE output 42 | ) 43 | if(return_code EQUAL 0) 44 | string(STRIP "${output}" output) 45 | file(TO_CMAKE_PATH "${output}" output_path) 46 | set(${result_variable} "${output_path}" PARENT_SCOPE) 47 | else() 48 | message(WARNING "Failed call: ${QMAKE_EXECUTABLE} -query \"${qt_variable}\"") 49 | message(FATAL_ERROR "QMake call failed: ${return_code}") 50 | endif() 51 | endfunction() 52 | -------------------------------------------------------------------------------- /cmake/ECM/modules/ECMUninstallTarget.cmake: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Alex Merry 2 | # 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | #[=======================================================================[.rst: 6 | ECMUninstallTarget 7 | ------------------ 8 | 9 | Add an ``uninstall`` target. 10 | 11 | By including this module, an ``uninstall`` target will be added to your CMake 12 | project. This will remove all files installed (or updated) by a previous 13 | invocation of the ``install`` target. It will not remove files created or 14 | modified by an ``install(SCRIPT)`` or ``install(CODE)`` command; you should 15 | create a custom uninstallation target for these and use ``add_dependency`` to 16 | make the ``uninstall`` target depend on it: 17 | 18 | .. code-block:: cmake 19 | 20 | include(ECMUninstallTarget) 21 | install(SCRIPT install-foo.cmake) 22 | add_custom_target(uninstall_foo COMMAND ${CMAKE_COMMAND} -P uninstall-foo.cmake) 23 | add_dependency(uninstall uninstall_foo) 24 | 25 | The target will fail if the ``install`` target has not yet been run (so it is 26 | not possible to run CMake on the project and then immediately run the 27 | ``uninstall`` target). 28 | 29 | .. warning:: 30 | 31 | CMake deliberately does not provide an ``uninstall`` target by default on 32 | the basis that such a target has the potential to remove important files 33 | from a user's computer. Use with caution. 34 | 35 | Since 1.7.0. 36 | #]=======================================================================] 37 | 38 | if (NOT TARGET uninstall) 39 | configure_file( 40 | "${CMAKE_CURRENT_LIST_DIR}/ecm_uninstall.cmake.in" 41 | "${CMAKE_BINARY_DIR}/ecm_uninstall.cmake" 42 | IMMEDIATE 43 | @ONLY 44 | ) 45 | 46 | add_custom_target(uninstall 47 | COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/ecm_uninstall.cmake" 48 | WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" 49 | ) 50 | endif() 51 | -------------------------------------------------------------------------------- /cmake/ECM/modules/ECMVersionHeader.h.in: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_setup_version(): DO NOT EDIT! 2 | 3 | #ifndef @HEADER_PREFIX@_VERSION_H 4 | #define @HEADER_PREFIX@_VERSION_H 5 | 6 | #define @HEADER_PREFIX@_VERSION_STRING "@HEADER_VERSION@" 7 | #define @HEADER_PREFIX@_VERSION_MAJOR @HEADER_VERSION_MAJOR@ 8 | #define @HEADER_PREFIX@_VERSION_MINOR @HEADER_VERSION_MINOR@ 9 | #define @HEADER_PREFIX@_VERSION_PATCH @HEADER_VERSION_PATCH@ 10 | #define @HEADER_PREFIX@_VERSION @HEADER_PREFIX@_VERSION_CHECK(@HEADER_PREFIX@_VERSION_MAJOR, @HEADER_PREFIX@_VERSION_MINOR, @HEADER_PREFIX@_VERSION_PATCH) 11 | 12 | /* 13 | for example: @HEADER_PREFIX@_VERSION >= @HEADER_PREFIX@_VERSION_CHECK(1, 2, 2)) 14 | */ 15 | #define @HEADER_PREFIX@_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /cmake/ECM/modules/QtVersionOption.cmake: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Volker Krause 2 | # 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | #[=======================================================================[.rst: 6 | QtVersionOption 7 | --------------- 8 | 9 | Adds a build option to select the major Qt version if necessary, 10 | that is, if the major Qt version has not yet been determined otherwise 11 | (e.g. by a corresponding ``find_package()`` call). 12 | This module is typically included by other modules requiring knowledge 13 | about the major Qt version. 14 | 15 | If the ECM version passed to find_package was at least 5.240.0 Qt6 is picked by default. 16 | Otherwise Qt5 is picked. 17 | 18 | ``QT_MAJOR_VERSION`` is defined to either be "5" or "6". 19 | 20 | Since 5.82.0. 21 | #]=======================================================================] 22 | 23 | if (DEFINED QT_MAJOR_VERSION) 24 | return() 25 | endif() 26 | 27 | if (TARGET Qt5::Core) 28 | set(QT_MAJOR_VERSION 5) 29 | elseif (TARGET Qt6::Core) 30 | set(QT_MAJOR_VERSION 6) 31 | else() 32 | if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.240) 33 | option(BUILD_WITH_QT6 "Build against Qt 6" ON) 34 | else() 35 | option(BUILD_WITH_QT6 "Build against Qt 6" OFF) 36 | endif() 37 | 38 | if (BUILD_WITH_QT6) 39 | set(QT_MAJOR_VERSION 6) 40 | else() 41 | set(QT_MAJOR_VERSION 5) 42 | endif() 43 | endif() 44 | -------------------------------------------------------------------------------- /cmake/ECM/modules/ecm_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") 3 | endif() 4 | 5 | file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 9 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program( 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 12 | OUTPUT_VARIABLE rm_out 13 | RETURN_VALUE rm_retval 14 | ) 15 | if(NOT "${rm_retval}" STREQUAL 0) 16 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 17 | endif() 18 | else() 19 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 20 | endif() 21 | endforeach() 22 | -------------------------------------------------------------------------------- /cmake/KDAB/modules/KDFunctions.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-FileCopyrightText: 2021 Klarälvdalens Datakonsult AB, a KDAB Group company 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | if(POLICY CMP0057) 7 | cmake_policy(SET CMP0057 NEW) # if() supports IN_LIST 8 | endif() 9 | 10 | get_property(_supported_languages GLOBAL PROPERTY ENABLED_LANGUAGES) 11 | if("C" IN_LIST _supported_languages) 12 | include(CheckCCompilerFlag) 13 | set(KD_C_PROJECT True SCOPE GLOBAL) 14 | endif() 15 | if("CXX" IN_LIST _supported_languages) 16 | include(CheckCXXCompilerFlag) 17 | set(KD_CXX_PROJECT True SCOPE GLOBAL) 18 | endif() 19 | 20 | # If the condition is true, add the specified value to the arguments at the parent scope 21 | function(kd_append_if condition value) 22 | if(${condition}) 23 | foreach(variable ${ARGN}) 24 | set(${variable} 25 | "${${variable}} ${value}" 26 | PARENT_SCOPE 27 | ) 28 | endforeach() 29 | endif() 30 | endfunction() 31 | 32 | # Add C and C++ compiler command line option 33 | macro(kd_add_flag_if_supported flag name) 34 | if(KD_C_PROJECT) 35 | check_c_compiler_flag("-Werror ${flag}" "C_SUPPORTS_${name}") 36 | kd_append_if("C_SUPPORTS_${name}" "${flag}" CMAKE_C_FLAGS) 37 | endif() 38 | if(KD_CXX_PROJECT) 39 | check_cxx_compiler_flag("-Werror ${flag}" "CXX_SUPPORTS_${name}") 40 | kd_append_if("CXX_SUPPORTS_${name}" "${flag}" CMAKE_CXX_FLAGS) 41 | endif() 42 | endmacro() 43 | -------------------------------------------------------------------------------- /cmake/KDAB/modules/KDInstallLocation.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 3 | # 4 | # SPDX-License-Identifier: BSD-3-Clause 5 | # 6 | 7 | # Some default installation locations. These should be global, with any project 8 | # specific locations added to the end. These paths are all relative to the 9 | # install prefix. 10 | # 11 | # These paths attempt to adhere to the FHS, and are similar to those provided 12 | # by autotools and used in many Linux distributions. 13 | 14 | # Use GNU install directories 15 | include(GNUInstallDirs) 16 | 17 | if(NOT INSTALL_RUNTIME_DIR) 18 | set(INSTALL_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR}) 19 | endif() 20 | if(NOT INSTALL_LIBRARY_DIR) 21 | set(INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}) 22 | endif() 23 | if(NOT INSTALL_ARCHIVE_DIR) 24 | set(INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR}) 25 | endif() 26 | if(NOT INSTALL_INCLUDE_DIR) 27 | set(INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}) 28 | endif() 29 | if(NOT INSTALL_DATADIR) 30 | set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}) 31 | endif() 32 | if(NOT INSTALL_DOC_DIR) 33 | set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${${PROJECT_NAME}_LIBRARY_QTID}) 34 | endif() 35 | 36 | set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 37 | if(APPLE) 38 | set(CMAKE_MACOSX_RPATH ON) 39 | else() 40 | set(CMAKE_INSTALL_RPATH "$ORIGIN/../${INSTALL_LIBRARY_DIR}") 41 | endif() 42 | -------------------------------------------------------------------------------- /conan/README.txt: -------------------------------------------------------------------------------- 1 | In the following example we assume you have the kdsoap source available in 2 | /path/to/kdsoap-source. replace '/path/to/kdsoap-source' to fit your needs. 3 | 4 | $ conan create -s build_type=Release -o kdsoap:build_examples=True -o kdsoap:build_tests=True /path/to/kdsoap-source/conan kdab/stable 5 | 6 | configuration options: 7 | * build_static 8 | Builds static versions of the libraries. Default=False 9 | 10 | * build_tests 11 | Build the test harness. Default=False 12 | 13 | * build_examples 14 | Build the examples. Default=True 15 | -------------------------------------------------------------------------------- /distro/debian.compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /distro/qt5-debian.control: -------------------------------------------------------------------------------- 1 | Source: kdsoap 2 | Section: Miscellaneous 3 | Priority: optional 4 | Maintainer: Allen Winter 5 | Build-Depends: debhelper (>=9), cdbs, cmake 6 | Standards-Version: 3.9.6 7 | Homepage: https://github.com/KDAB/KDSoap 8 | 9 | Package: qt5-kdsoap 10 | Architecture: any 11 | Depends: ${misc:Depends}, ${shlibs:Depends} 12 | Description: A Qt5-based client-side and server-side SOAP component 13 | KDSoap can be used to create client applications for web services 14 | and also provides the means to create web services without the need 15 | for any further component such as a dedicated web server. 16 | -------------------------------------------------------------------------------- /distro/qt5-debian.rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | DEB_CMAKE_EXTRA_FLAGS = -DCMAKE_BUILD_TYPE=Release -DKDSoap_QT6=False 3 | include /usr/share/cdbs/1/rules/debhelper.mk 4 | include /usr/share/cdbs/1/class/cmake.mk 5 | -------------------------------------------------------------------------------- /distro/qt5-kdsoap.dsc: -------------------------------------------------------------------------------- 1 | Format: 1.0 2 | Source: kdsoap 3 | Version: 2.2.0-1 4 | Binary: kdsoap 5 | Maintainer: Allen Winter 6 | Architecture: any 7 | Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev 8 | 9 | Files: 10 | 00000000000000000000000000000000 00000 qt5-kdsoap-2.2.0.tar.gz 11 | -------------------------------------------------------------------------------- /distro/qt6-debian.control: -------------------------------------------------------------------------------- 1 | Source: kdsoap 2 | Section: Miscellaneous 3 | Priority: optional 4 | Maintainer: Allen Winter 5 | Build-Depends: debhelper (>=9), cdbs, cmake 6 | Standards-Version: 3.9.6 7 | Homepage: https://github.com/KDAB/KDSoap 8 | 9 | Package: qt6-kdsoap 10 | Architecture: any 11 | Depends: ${misc:Depends}, ${shlibs:Depends} 12 | Description: A Qt6-based client-side and server-side SOAP component 13 | KDSoap can be used to create client applications for web services 14 | and also provides the means to create web services without the need 15 | for any further component such as a dedicated web server. 16 | -------------------------------------------------------------------------------- /distro/qt6-debian.rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | DEB_CMAKE_EXTRA_FLAGS = -DKDSoap_QT6=True -DCMAKE_BUILD_TYPE=Release 3 | include /usr/share/cdbs/1/rules/debhelper.mk 4 | include /usr/share/cdbs/1/class/cmake.mk 5 | -------------------------------------------------------------------------------- /distro/qt6-kdsoap.dsc: -------------------------------------------------------------------------------- 1 | Format: 1.0 2 | Source: kdsoap 3 | Version: 2.2.0-1 4 | Binary: kdsoap 5 | Maintainer: Allen Winter 6 | Architecture: any 7 | Build-Depends: debhelper (>=9), cdbs, cmake, qt6-base-dev, libgl1-mesa-dev 8 | 9 | Files: 10 | 00000000000000000000000000000000 00000 qt6-kdsoap-2.2.0.tar.gz 11 | -------------------------------------------------------------------------------- /docs/CHANGES_1_1.txt: -------------------------------------------------------------------------------- 1 | Client side: 2 | 3 | Fixed handling of faults (fault XML was not parsed when the HTTP error code was correctly set to 500 by the server) 4 | Fixed serialization of times and datetimes, to use ISO format and include milliseconds 5 | Support for hexBinary 6 | Response parsing in KDSoapMessage: implement type conversion based on type information sent back, fix handling of empty strings. 7 | Fix compilation error when the name of a wsdl:service contains a '-'. 8 | 9 | NEW: server side support 10 | -------------------------------------------------------------------------------- /docs/CHANGES_1_10.txt: -------------------------------------------------------------------------------- 1 | General: 2 | ======== 3 | * No longer supporting Qt 4 4 | * Minimum Qt version is 5.7 5 | * Minimum CMake version is 3.0.2 6 | * qmake buildsystem -- no longer prompt for license choice. 7 | users should carefully consider their choice of license 8 | * The qmake buildsystem is deprecated 9 | 10 | CMake buildsystem: 11 | ================== 12 | * Generates .pri files for qmake users 13 | * Installs library pdb files with MSVC builds 14 | * fix library versioning for RelWithDebInfo on Windows (Version 1.10.1) 15 | 16 | WSDL parser / code generator changes, applying to both client and server side: 17 | ================================================================ 18 | * Add commandline options to turn off generation of the sync/async/asyncjobs APIs. This improves compilation times. (#225) 19 | -------------------------------------------------------------------------------- /docs/CHANGES_1_2.txt: -------------------------------------------------------------------------------- 1 | General: 2 | ======== 3 | * Fix compilation with gcc-4.6, and fix behavior with Qt-4.8 4 | 5 | Client-side: 6 | ============ 7 | * Generic soapError() signal, for central processing of all SOAP errors (faults) [Jira SOAP-6] 8 | * Fix support for the "short" and "unsignedShort" data types 9 | * Apply end point configuration changes also if interface was already used 10 | * Support for network cookies, see setCookieJar(). Requires Qt >= 4.7.0 11 | * Support for network proxies, see setProxy() and the class QNetworkProxy in Qt. 12 | * Generated code: make clientInterface() public, add const overload. 13 | * Generate additional job-based API for asynchronous calls. 14 | 15 | Server-side: 16 | ============ 17 | * Support for delayed responses 18 | * Fix support for messages with no input or output arguments 19 | * Set response namespace automatically in generated processRequest, so as to not rely on the namespace 20 | of the incoming request. 21 | * Fix parsing of requests with Qt-4.8. 22 | * Fix crash in Qt-4.8 at server shutdown. 23 | * Return an error if receiving a GET request (other than when retrieving the .wsdl file) 24 | 25 | Code generator changes, applying to both client and server side: 26 | ================================================================ 27 | * Handle paths with non-ascii letters (url encoding issues). 28 | * Handle wsdl files with multiple service definitions 29 | * Reworked parsing of XML namespaces. 30 | * New option -namespace <...> to kdwsdl2cpp, in order to put all the generated code into a C++ namespace. 31 | * Better handling of whether elements are "qualified" or not, and writing out the correct namespace for them. 32 | -------------------------------------------------------------------------------- /docs/CHANGES_1_5_1.txt: -------------------------------------------------------------------------------- 1 | General: 2 | ======== 3 | * 4 | 5 | Client-side: 6 | ============ 7 | * 8 | 9 | Server-side: 10 | ============ 11 | * 12 | 13 | WSDL parser / code generator changes, applying to both client and server side: 14 | ================================================================ 15 | * RPC mode: escape part names which look like C++ keywords (e.g. "delete") 16 | -------------------------------------------------------------------------------- /docs/CHANGES_1_6.txt: -------------------------------------------------------------------------------- 1 | General: 2 | ======== 3 | * 4 | 5 | Client-side: 6 | ============ 7 | * Fix generated KDSoapJob never emitting finished, when an RPC-mode reply is empty (and expected to be empty) (github issue 94) 8 | * Add lastErrorCode() method for better error handling after sync calls. 9 | 10 | Server-side: 11 | ============ 12 | * 13 | 14 | WSDL parser / code generator changes, applying to both client and server side: 15 | ================================================================ 16 | * Fix deserialization of optional lists (the associated nil variable wasn't set to false) 17 | -------------------------------------------------------------------------------- /docs/CHANGES_1_7.txt: -------------------------------------------------------------------------------- 1 | General: 2 | ======== 3 | * Qt 5.9.0 support (compilation fix due to qt_qhash_seed being removed, unittest fix due to QNetworkReply error code difference) 4 | 5 | Client-side: 6 | ============ 7 | * Fix unwanted generation of SoapAction header when it should be empty (SOAP-135). 8 | * Abort the connection when destroying a job with a pending call (SOAP-138). 9 | 10 | Server-side: 11 | ============ 12 | 13 | WSDL parser / code generator changes, applying to both client and server side: 14 | ================================================================ 15 | 16 | * Add support for body namespace specification in RPC calls. 17 | * Fix namespace handling in typename comparison for optional element used inside itself (github issue #83). 18 | * Add missing include in generated header, when an operation's return value needs one (ex: QDate) (github issue #110). 19 | * Fix namespace handling in restriction and extension tags 20 | * Fix wrong indentation of "};" for classes inside namespaces 21 | -------------------------------------------------------------------------------- /docs/CHANGES_1_9.txt: -------------------------------------------------------------------------------- 1 | General: 2 | ======== 3 | * C++11 is now required. Qt4 is still supported, but this is the last release with support for Qt4. 4 | * Fix rpath for Unix/Linux/macOS (#181). 5 | * Improve cmake usage by setting the install interface directories on the library targets (#196). 6 | You can just link to KDSoap::kdsoap and you'll get the correct include paths now. 7 | * New installing file for Conan (WIP - see conan folder) 8 | 9 | In release 1.9.1: 10 | ----------------- 11 | * Restore previous EULA (LICENSE.txt and LICENSE.US.txt) 12 | * remove unittests: onvif_org_event, onvif_ptz, onvif.org WSDL 13 | * Fix static linking examples and unittests in the CMake buildsystem 14 | * small buildsystem improvements 15 | 16 | Client-side: 17 | ============ 18 | * Add support for selecting WS-Addressing namespace for send messages (#176). 19 | * Fix WS-Addressing spec compliance (#193) 20 | * Add support for implementing SOAP-over-UDP clients (see KDSoapUdpClient). 21 | 22 | Server-side: 23 | ============ 24 | 25 | WSDL parser / code generator changes, applying to both client and server side: 26 | ================================================================ 27 | * Add override indicator to generated files. This requires c++11 for users of generated files. 28 | * Add option for loading PKCS12 certificates (#190). 29 | * Remove all special handling of soap/encoding namespace, which fixes the use of soapenc:string and soapenc:integer for instance (#179). 30 | * Fix compilation error due to missing QSharedPointer include in generated code (#170). 31 | 32 | Examples: 33 | ======== 34 | * The holidays examples have been replaced with bank-lookup examples. Less fun, but the holidays web service no longer exists... 35 | -------------------------------------------------------------------------------- /docs/CHANGES_2_0.txt: -------------------------------------------------------------------------------- 1 | 2 | General: 3 | ======== 4 | * Supports Qt6 in addition to Qt5 5 | * Minimum Qt version is 5.9 6 | * The qmake buildsystem (via autogen.py) is removed. 7 | * buildsystem: a new 'docs' target is created when CMake -DKDSoap_DOCS=True. 8 | * buildsystem: the API manual is now generated in build/docs vice source/docs. 9 | * buildsystem: added an uninstall target 10 | * buildsystem: generate and install kdsoap-version.h 11 | * The API manual is generated+installed in qch format for Qt assistant. 12 | 13 | Client-side: 14 | ============ 15 | * Added options to the KDSoapClient specifying the SOAP action sending method 16 | 17 | Server-side: 18 | ============ 19 | 20 | WSDL parser / code generator changes, applying to both client and server side: 21 | ================================================================ 22 | * Fix generated code in case a variable is called "d" or "q" (#118) 23 | * Fix generated code for an enumeration type with a length restriction (#234) 24 | * Avoid potential type collisions in nested complexTypes (#239) 25 | -------------------------------------------------------------------------------- /docs/CHANGES_2_1.txt: -------------------------------------------------------------------------------- 1 | 2 | General: 3 | ======== 4 | * Re-license project to MIT and remove the commercial offering 5 | * buildsystem - Increase minimum CMake version to 3.12.0 6 | * buildsystem - Build in Release mode by default (in non-developer situations) 7 | 8 | Client-side: 9 | ============ 10 | * Generate "explicit" in front of service and job constructors (issue #206) 11 | 12 | Server-side: 13 | ============ 14 | * Disable HTTP/2 support (which Qt 6 enables by default), it causes trouble with some SOAP servers (issue #246). 15 | * Improve parsing of GET argument to avoid misinterpreting queries (possible security issue #247). 16 | 17 | WSDL parser / code generator changes, applying to both client and server side: 18 | ================================================================ 19 | * 20 | -------------------------------------------------------------------------------- /docs/CHANGES_2_1_1.txt: -------------------------------------------------------------------------------- 1 | 2 | General: 3 | ======== 4 | * buildsystem - undo co-installability of Qt5 and Qt6 headers. 5 | It would require that kdwsdl2cpp generates #include 6 | which in turn would break the build of KDSoap itself, so this gets tricky. 7 | 8 | Client-side: 9 | ============ 10 | * 11 | 12 | Server-side: 13 | ============ 14 | * 15 | 16 | WSDL parser / code generator changes, applying to both client and server side: 17 | ================================================================ 18 | * 19 | -------------------------------------------------------------------------------- /docs/CHANGES_2_2.txt: -------------------------------------------------------------------------------- 1 | 2 | General: 3 | ======== 4 | * buildsystem - Add co-installability of Qt5 and Qt6 headers back. 5 | Installs Qt6 headers into their own subdirectory so client code still works, but can be co-installed with Qt5 again. 6 | 7 | Client-side: 8 | ============ 9 | * Add KDSoapClientInterface::setMessageAddressingProperties() so that WS-Addressing support can be used with WSDL-generated services (issue #254) 10 | * Don't require a SOAP action in order to write addressing properties (also issue #254) 11 | 12 | Server-side: 13 | ============ 14 | * 15 | 16 | WSDL parser / code generator changes, applying to both client and server side: 17 | ================================================================ 18 | * Improve -import-path support by using the import path in more places in the code 19 | -------------------------------------------------------------------------------- /docs/CHANGES_2_3.txt: -------------------------------------------------------------------------------- 1 | 2 | General: 3 | ======== 4 | * C++17 is now required. Qt-5.15 is still supported, in addition to the latest Qt6 versions. 5 | * KDSoap now looks for Qt6 by default, rather than Qt5. If your Qt5 build broke, pass -DKDSoap_QT6=OFF to CMake. 6 | 7 | Client-side: 8 | ============ 9 | * 10 | 11 | Server-side: 12 | ============ 13 | * To avoid mixing up raw-xml requests in the same server object (#288), KDSoap now creates a server object for each incoming connection. 14 | Make sure your server object is ready to be created multiple times (this was already a requirement when enabling multi-threading with setThreadPool()). 15 | -------------------------------------------------------------------------------- /docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2021 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | # Doxygen 9 | find_package(Doxygen) 10 | set_package_properties( 11 | Doxygen PROPERTIES 12 | TYPE OPTIONAL 13 | DESCRIPTION "API Documentation system" 14 | URL "https://www.doxygen.org" 15 | PURPOSE "Needed to build the API documentation." 16 | ) 17 | 18 | if(DOXYGEN_FOUND) 19 | add_subdirectory(api) 20 | endif() 21 | -------------------------------------------------------------------------------- /docs/api/doxygen.css: -------------------------------------------------------------------------------- 1 | span.blue 2 | { 3 | color: #4169E1; 4 | } 5 | -------------------------------------------------------------------------------- /docs/api/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | © Klarälvdalens Datakonsult AB (KDAB) 5 |
6 | "Trusted Software Excellence"
7 | https://www.kdab.com/ 8 |
9 | 10 |
11 | 12 | https://www.kdab.com/development-resources/qt-tools/kd-soap/
13 | $generatedby doxygen $doxygenversion
14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/api/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | $title 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

KD Soap

          | Home |          | Namespaces |          | Classes |          | Files |          | Directories |
22 | -------------------------------------------------------------------------------- /docs/api/kdab-logo-22x22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/docs/api/kdab-logo-22x22.png -------------------------------------------------------------------------------- /docs/api/xmldiagram2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/docs/api/xmldiagram2.png -------------------------------------------------------------------------------- /docs/kdsoap-server-design.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/docs/kdsoap-server-design.odg -------------------------------------------------------------------------------- /docs/kdsoap-server-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/docs/kdsoap-server-design.png -------------------------------------------------------------------------------- /docs/manual/kdsoap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/docs/manual/kdsoap.pdf -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | find_package( 9 | Qt${QT_VERSION_MAJOR} ${QT_MIN_VERSION} 10 | COMPONENTS Widgets CONFIG 11 | REQUIRED 12 | ) 13 | list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::Widgets) 14 | 15 | include(${CMAKE_BINARY_DIR}/KDSoap/KDSoapMacros.cmake) 16 | include_directories(../src/ ../src/KDSoapClient/ ../src/KDSoapServer/) 17 | 18 | add_subdirectory(helloworld_client) 19 | add_subdirectory(helloworld_server) 20 | add_subdirectory(bank_gui) 21 | add_subdirectory(bank_wsdl) 22 | -------------------------------------------------------------------------------- /examples/bank_gui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(bank_gui) 9 | 10 | set(bank_gui_SRCS bank_gui.cpp mainwindow.cpp) 11 | 12 | kdsoap_generate_wsdl(bank_gui_SRCS BLZService.wsdl) 13 | 14 | add_executable( 15 | bank_gui 16 | ${bank_gui_SRCS} resources.qrc 17 | ) 18 | target_link_libraries( 19 | bank_gui ${QT_LIBRARIES} kdsoap 20 | ) 21 | -------------------------------------------------------------------------------- /examples/bank_gui/bank_gui.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "mainwindow.h" 12 | #include 13 | 14 | int main(int argc, char **argv) 15 | { 16 | QApplication app(argc, argv); 17 | 18 | MainWindow *m = new MainWindow(); 19 | m->show(); 20 | 21 | return app.exec(); 22 | } 23 | -------------------------------------------------------------------------------- /examples/bank_gui/mainwindow.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef MAINWINDOW_H 12 | #define MAINWINDOW_H 13 | 14 | #include 15 | 16 | namespace BLZService { 17 | class BLZServiceSOAP11Binding; 18 | } 19 | class TNS__GetBankResponseType; 20 | 21 | QT_BEGIN_NAMESPACE 22 | class QPushButton; 23 | class QLabel; 24 | class QProgressBar; 25 | class QMovie; 26 | class QTableWidget; 27 | QT_END_NAMESPACE 28 | 29 | class MainWindow : public QWidget 30 | { 31 | Q_OBJECT 32 | public: 33 | MainWindow(QWidget *parent = 0); 34 | 35 | private slots: 36 | void syncCalls(); 37 | void asyncCalls(); 38 | void done(int index, const TNS__GetBankResponseType &response); 39 | void createJob(int index); 40 | 41 | private: 42 | void setBankName(int row, const QString &text); 43 | void clearResults(); 44 | 45 | QPushButton *mBtnAsync; 46 | QPushButton *mBtnSync; 47 | QTableWidget *mTableWidget; 48 | QLabel *mLblAnim; 49 | QMovie *mMovAnim; 50 | QStringList mBankCodes; 51 | 52 | BLZService::BLZServiceSOAP11Binding *mService; 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /examples/bank_gui/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | spinner.gif 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/bank_gui/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/examples/bank_gui/spinner.gif -------------------------------------------------------------------------------- /examples/bank_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(bank_wsdl) 9 | 10 | set(bank_wsdl_SRCS bank_wsdl.cpp) 11 | 12 | kdsoap_generate_wsdl(bank_wsdl_SRCS BLZService.wsdl) 13 | 14 | add_executable( 15 | bank_wsdl 16 | ${bank_wsdl_SRCS} 17 | ) 18 | target_link_libraries( 19 | bank_wsdl ${QT_LIBRARIES} kdsoap 20 | ) 21 | -------------------------------------------------------------------------------- /examples/bank_wsdl/bank_wsdl.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapClientInterface.h" 12 | #include "KDSoapMessage.h" 13 | #include 14 | 15 | #include 16 | 17 | #include "wsdl_BLZService.h" 18 | 19 | int main(int argc, char **argv) 20 | { 21 | QCoreApplication app(argc, argv); 22 | 23 | const QString bankCode = QString::fromLatin1("20130600"); 24 | std::cout << "Looking up the bank with code " << qPrintable(bankCode) << "..." << std::endl; 25 | 26 | BLZService::BLZServiceSOAP11Binding service; 27 | TNS__GetBankType getBankType; 28 | getBankType.setBlz(bankCode); 29 | TNS__GetBankResponseType response = service.getBank(getBankType); 30 | 31 | std::cout << "\"" << qPrintable(response.details().bezeichnung()) << "\" in " << qPrintable(response.details().ort()) << std::endl; 32 | 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /examples/helloworld_client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(helloworld_client) 9 | 10 | set(helloworld_client_SRCS main.cpp helloworld_client.h) 11 | 12 | kdsoap_generate_wsdl(helloworld_client_SRCS ../helloworld_server/helloworld.wsdl) 13 | 14 | add_executable( 15 | helloworld_client 16 | ${helloworld_client_SRCS} 17 | ) 18 | target_link_libraries( 19 | helloworld_client ${QT_LIBRARIES} kdsoap 20 | ) 21 | -------------------------------------------------------------------------------- /examples/helloworld_client/helloworld_client.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2011 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef HELLOWORLD_CLIENT_H 12 | #define HELLOWORLD_CLIENT_H 13 | 14 | #include "wsdl_helloworld.h" 15 | 16 | #include 17 | 18 | QT_BEGIN_NAMESPACE 19 | class QLineEdit; 20 | class QTextBrowser; 21 | QT_END_NAMESPACE 22 | 23 | class MainWindow : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit MainWindow(QWidget *parent = 0); 28 | 29 | private Q_SLOTS: 30 | void sayHello(); 31 | void sayHelloDone(const QString &reply); 32 | void sayHelloError(const KDSoapMessage &fault); 33 | 34 | private: 35 | Hello_Service m_service; 36 | QLineEdit *m_input; 37 | QTextBrowser *m_browser; 38 | }; 39 | 40 | #endif // HELLOWORLD_CLIENT_H 41 | -------------------------------------------------------------------------------- /examples/helloworld_server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(helloworld_server) 9 | 10 | set(KSWSDL2CPP_OPTION "-server") 11 | set(helloworld_server_SRCS main.cpp helloworld_serverobject.cpp) 12 | 13 | kdsoap_generate_wsdl(helloworld_server_SRCS helloworld.wsdl) 14 | 15 | add_executable( 16 | helloworld_server 17 | ${helloworld_server_SRCS} 18 | ) 19 | target_link_libraries( 20 | helloworld_server ${QT_LIBRARIES} kdsoap kdsoap-server 21 | ) 22 | -------------------------------------------------------------------------------- /examples/helloworld_server/helloworld.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 44 | WSDL File for HelloService 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /examples/helloworld_server/helloworld_serverobject.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2011 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include 12 | 13 | #include "KDSoapServer.h" 14 | #include "helloworld_serverobject.h" 15 | #include 16 | 17 | HelloWorldServerObject::HelloWorldServerObject() 18 | : Hello_ServiceServerBase() 19 | { 20 | } 21 | 22 | HelloWorldServerObject::~HelloWorldServerObject() 23 | { 24 | } 25 | 26 | QString HelloWorldServerObject::sayHello(const QString &msg) 27 | { 28 | if (msg.isEmpty()) { 29 | setFault(QLatin1String("Client.Data"), QLatin1String("Empty message"), QLatin1String("HelloWorldServerObject"), tr("You must say something.")); 30 | return QString(); 31 | } 32 | return tr("I'm helloworld_server and you said: %1").arg(msg); 33 | } 34 | -------------------------------------------------------------------------------- /examples/helloworld_server/helloworld_serverobject.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2011 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef HELLOWORLD_SERVER_H 12 | #define HELLOWORLD_SERVER_H 13 | 14 | #include "KDSoapServerObjectInterface.h" 15 | #include "wsdl_helloworld.h" 16 | 17 | // clazy:excludeall=ctor-missing-parent-argument 18 | class HelloWorldServerObject : public Hello_ServiceServerBase 19 | { 20 | Q_OBJECT 21 | Q_INTERFACES(KDSoapServerObjectInterface) 22 | public: 23 | HelloWorldServerObject(); 24 | ~HelloWorldServerObject(); 25 | 26 | QString sayHello(const QString &msg) override; 27 | }; 28 | 29 | #endif // HELLOWORLD_SERVER_H 30 | -------------------------------------------------------------------------------- /examples/helloworld_server/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2011 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include 12 | 13 | #include "KDSoapServer.h" 14 | #include "helloworld_serverobject.h" 15 | #include 16 | 17 | class Server : public KDSoapServer 18 | { 19 | Q_OBJECT 20 | public: 21 | using KDSoapServer::KDSoapServer; 22 | 23 | QObject *createServerObject() override 24 | { 25 | return new HelloWorldServerObject; 26 | } 27 | }; 28 | 29 | int main(int argc, char **argv) 30 | { 31 | QCoreApplication app(argc, argv); 32 | Server server; 33 | server.setLogLevel(Server::LogEveryCall); 34 | const bool listening = server.listen(QHostAddress::Any, 8081); 35 | if (!listening) { 36 | std::cerr << "Cannot start server: " << qPrintable(server.errorString()) << std::endl; 37 | return 1; 38 | } else { 39 | std::cout << "Listening..." << std::endl; 40 | } 41 | return app.exec(); 42 | } 43 | 44 | #include "main.moc" 45 | -------------------------------------------------------------------------------- /features/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | if(NOT ${PROJECT_NAME}_QT6) 9 | install(FILES kdsoap.prf DESTINATION ${INSTALL_DATADIR}/mkspecs/features) 10 | endif() 11 | -------------------------------------------------------------------------------- /images/kdsoap-medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/images/kdsoap-medium.png -------------------------------------------------------------------------------- /images/kdsoap-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/images/kdsoap-small.png -------------------------------------------------------------------------------- /images/kdsoap-trademark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/images/kdsoap-trademark.png -------------------------------------------------------------------------------- /images/kdsoap256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDAB/KDSoap/46b89eee08fe4a608e243e619f48d02cb991e5d6/images/kdsoap256.png -------------------------------------------------------------------------------- /kdsoap.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set PATH=%CD%\bin;%PATH% 3 | set LIB=%CD%\lib;%LIB% 4 | set KDSOAPDIR=%CD% 5 | -------------------------------------------------------------------------------- /kdwsdl2cpp/kode_export.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | /* We use static libs, no need for export macros */ 12 | #define KODE_EXPORT 13 | #define KXMLCOMMON_EXPORT 14 | #define KWSDL_EXPORT 15 | #define SCHEMA_EXPORT 16 | -------------------------------------------------------------------------------- /kdwsdl2cpp/schemas/schemas.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | soapenc-1.1.xsd 4 | soapenc-1.2.xsd 5 | 6 | 7 | -------------------------------------------------------------------------------- /kdwsdl2cpp/src/compiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_COMPILER_H 8 | #define KWSDL_COMPILER_H 9 | 10 | #include 11 | #include 12 | 13 | namespace KWSDL { 14 | 15 | // clazy:excludeall=ctor-missing-parent-argument 16 | class Compiler : public QObject 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | Compiler(); // created on stack 22 | 23 | public slots: 24 | void run(); 25 | 26 | private slots: 27 | void download(); 28 | void parse(const QDomElement &); 29 | }; 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /kdwsdl2cpp/src/creator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "settings.h" 12 | 13 | #include "creator.h" 14 | 15 | #include 16 | 17 | using namespace KWSDL; 18 | 19 | Creator::Creator() 20 | { 21 | // Set generated header details. 22 | _printer.setCreationWarning(true); 23 | _printer.setGenerator(QLatin1String("KDAB's kdwsdl2cpp")); 24 | _printer.setStatementsAfterIncludes(QStringList() << "#undef daylight" 25 | << "#undef timezone"); 26 | 27 | // Qt-like coding style 28 | _printer.setLabelsDefineIndent(false); 29 | _printer.setIndentLabels(false); 30 | 31 | _file.setLicense(KODE::License::GeneratedNoRestriction); 32 | } 33 | 34 | void Creator::setOutputDirectory(const QString &outputDirectory) 35 | { 36 | _printer.setOutputDirectory(outputDirectory); 37 | } 38 | 39 | void Creator::setSourceFile(const QString &sourceFile) 40 | { 41 | _printer.setSourceFile(sourceFile); 42 | } 43 | 44 | void Creator::setHeaderFileName(const QString &headerFileName) 45 | { 46 | _file.setHeaderFilename(headerFileName); 47 | } 48 | 49 | void Creator::setImplementationFileName(const QString &implementationFileName) 50 | { 51 | _file.setImplementationFilename(implementationFileName); 52 | } 53 | 54 | void Creator::setClasses(const KODE::Class::List &list) 55 | { 56 | for (const KODE::Class &newClass : std::as_const(list)) { 57 | _file.insertClass(newClass); 58 | } 59 | } 60 | 61 | void Creator::createHeader() 62 | { 63 | _printer.printHeader(_file); 64 | } 65 | 66 | void Creator::createImplementation() 67 | { 68 | _printer.printImplementation(_file); 69 | } 70 | -------------------------------------------------------------------------------- /kdwsdl2cpp/src/creator.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_CREATOR_H 8 | #define KWSDL_CREATOR_H 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace KWSDL { 16 | 17 | class Creator 18 | { 19 | public: 20 | Creator(); 21 | 22 | void setOutputDirectory(const QString &outputDirectory); 23 | void setSourceFile(const QString &sourceFile); 24 | 25 | void setHeaderFileName(const QString &headerFileName); 26 | void setImplementationFileName(const QString &implementationFileName); 27 | void setClasses(const KODE::Class::List &list); 28 | 29 | void createHeader(); 30 | void createImplementation(); 31 | 32 | private: 33 | KODE::File _file; 34 | KODE::Printer _printer; 35 | }; 36 | 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /kdwsdl2cpp/src/kwsdlcfg.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | SPDX-FileCopyrightText: 2006 Tobias Koenig <tokoe@kde.org> 11 | SPDX-License-Identifier: MIT 12 | Permission to use, copy, modify and distribute this schema 13 | and its accompanying documentation for any purpose and without fee 14 | is hereby granted in perpetuity, provided that the above copyright 15 | notice and this paragraph appear in all copies. The copyright 16 | holders make no representation about the suitability of the schema for 17 | any purpose. It is provided "as is" without expressed or implied 18 | warranty. 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /kdwsdl2cpp/src/namemapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_NAMEMAPPER_H 8 | #define KWSDL_NAMEMAPPER_H 9 | 10 | #include 11 | 12 | namespace KWSDL { 13 | 14 | class NameMapper 15 | { 16 | public: 17 | NameMapper(); 18 | 19 | QString escape(const QString &name) const; 20 | QString unescape(const QString &name) const; 21 | 22 | private: 23 | QStringList mKeyWords; 24 | }; 25 | 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/abstractbinding.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_ABSTRACTBINDING_H 8 | #define KWSDL_ABSTRACTBINDING_H 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | class ParserContext; 16 | 17 | namespace KWSDL { 18 | 19 | class AbstractBinding 20 | { 21 | public: 22 | AbstractBinding() = default; 23 | AbstractBinding(const AbstractBinding &other) = delete; 24 | AbstractBinding &operator=(const AbstractBinding &other) = delete; 25 | virtual ~AbstractBinding() 26 | { 27 | } 28 | 29 | virtual void parseBinding(ParserContext *context, const QDomElement &parent) = 0; 30 | virtual void parseOperation(ParserContext *context, const QString &name, const QDomElement &parent) = 0; 31 | virtual void parseOperationInput(ParserContext *context, const QString &name, const QDomElement &parent) = 0; 32 | virtual void parseOperationOutput(ParserContext *context, const QString &name, const QDomElement &parent) = 0; 33 | virtual void parseOperationFault(ParserContext *context, const QString &name, const QDomElement &parent) = 0; 34 | virtual void parsePort(ParserContext *context, const QDomElement &parent) = 0; 35 | 36 | virtual void synthesizeBinding(ParserContext *context, QDomDocument &document, QDomElement &parent) const = 0; 37 | virtual void synthesizeOperation(ParserContext *context, const QString &name, QDomDocument &document, QDomElement &parent) const = 0; 38 | virtual void synthesizeOperationInput(ParserContext *context, const QString &name, QDomDocument &document, QDomElement &parent) const = 0; 39 | virtual void synthesizeOperationOutput(ParserContext *context, const QString &name, QDomDocument &document, QDomElement &parent) const = 0; 40 | virtual void synthesizeOperationFault(ParserContext *context, const QString &name, QDomDocument &document, QDomElement &parent) const = 0; 41 | virtual void synthesizePort(ParserContext *context, QDomDocument &document, QDomElement &parent) const = 0; 42 | }; 43 | 44 | } 45 | 46 | #endif // KWSDL_ABSTRACTBINDING_H 47 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/binding.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_BINDING_H 8 | #define KWSDL_BINDING_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include 19 | 20 | class ParserContext; 21 | 22 | namespace KWSDL { 23 | 24 | class KWSDL_EXPORT Binding : public Element 25 | { 26 | public: 27 | typedef QList List; 28 | 29 | enum Type 30 | { 31 | SOAPBinding, 32 | HTTPBinding, 33 | MIMEBinding, 34 | UnknownBinding 35 | }; 36 | 37 | Binding(); 38 | Binding(const QString &nameSpace); 39 | ~Binding(); 40 | 41 | void setName(const QString &name); 42 | QString name() const; 43 | 44 | void setPortTypeName(const QName &portTypeName); 45 | QName portTypeName() const; 46 | 47 | void setType(Type type); 48 | Type type() const; 49 | 50 | enum Version 51 | { 52 | SOAP_1_1, 53 | SOAP_1_2 54 | }; 55 | void setVersion(Version v); 56 | Version version() const; 57 | 58 | void setOperations(const BindingOperation::List &operations); 59 | BindingOperation::List operations() const; 60 | 61 | // void setSoapBinding( const SoapBinding &soapBinding ); 62 | SoapBinding soapBinding() const; 63 | 64 | const AbstractBinding *binding() const; 65 | 66 | void loadXML(ParserContext *context, const QDomElement &element); 67 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 68 | 69 | private: 70 | QString mName; 71 | QName mPortTypeName; 72 | BindingOperation::List mOperations; 73 | 74 | Type mType; 75 | SoapBinding mSoapBinding; // ## this should probably be a std::shared_ptr? 76 | Version mVersion; 77 | }; 78 | 79 | } 80 | 81 | #endif // KWSDL_BINDING_H 82 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/bindingoperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_BINDINGOPERATION_H 8 | #define KWSDL_BINDINGOPERATION_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | class ParserContext; 19 | 20 | namespace KWSDL { 21 | 22 | class AbstractBinding; 23 | 24 | class KWSDL_EXPORT BindingOperation : public Element 25 | { 26 | public: 27 | typedef QList List; 28 | 29 | BindingOperation(); 30 | BindingOperation(const QString &nameSpace); 31 | ~BindingOperation(); 32 | 33 | void setName(const QString &name); 34 | QString name() const; 35 | 36 | void loadXML(AbstractBinding *binding, ParserContext *context, const QDomElement &element); 37 | void saveXML(const AbstractBinding *binding, ParserContext *context, QDomDocument &document, QDomElement &parent) const; 38 | 39 | private: 40 | QString mName; 41 | }; 42 | 43 | } 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/element.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "element.h" 8 | 9 | using namespace KWSDL; 10 | 11 | Element::Element() 12 | { 13 | } 14 | 15 | Element::Element(const QString &nameSpace) 16 | : mNameSpace(nameSpace) 17 | { 18 | } 19 | 20 | Element::~Element() 21 | { 22 | } 23 | 24 | void Element::setNameSpace(const QString &nameSpace) 25 | { 26 | mNameSpace = nameSpace; 27 | } 28 | 29 | QString Element::nameSpace() const 30 | { 31 | return mNameSpace; 32 | } 33 | 34 | void Element::setDocumentation(const QString &documentation) 35 | { 36 | mDocumentation = documentation; 37 | } 38 | 39 | QString Element::documentation() const 40 | { 41 | return mDocumentation; 42 | } 43 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/element.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_ELEMENT_H 8 | #define KWSDL_ELEMENT_H 9 | 10 | #include 11 | 12 | #include 13 | 14 | namespace KWSDL { 15 | 16 | class KWSDL_EXPORT Element 17 | { 18 | public: 19 | Element(); 20 | Element(const QString &nameSpace); 21 | ~Element(); 22 | 23 | void setNameSpace(const QString &nameSpace); 24 | QString nameSpace() const; 25 | 26 | void setDocumentation(const QString &documentation); 27 | QString documentation() const; 28 | 29 | private: 30 | QString mNameSpace; 31 | QString mDocumentation; 32 | }; 33 | 34 | } 35 | 36 | #endif // KWSDL_ELEMENT_H 37 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/fault.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include "fault.h" 11 | 12 | using namespace KWSDL; 13 | 14 | Fault::Fault() 15 | { 16 | } 17 | 18 | Fault::Fault(const QString &nameSpace) 19 | : Element(nameSpace) 20 | { 21 | } 22 | 23 | Fault::~Fault() 24 | { 25 | } 26 | 27 | void Fault::setName(const QString &name) 28 | { 29 | mName = name; 30 | } 31 | 32 | QString Fault::name() const 33 | { 34 | return mName; 35 | } 36 | 37 | void Fault::setMessage(const QName &message) 38 | { 39 | mMessage = message; 40 | } 41 | 42 | QName Fault::message() const 43 | { 44 | return mMessage; 45 | } 46 | 47 | void Fault::loadXML(ParserContext *context, const QDomElement &element) 48 | { 49 | mName = element.attribute(QLatin1String("name")); 50 | if (mName.isEmpty()) { 51 | context->messageHandler()->warning(QLatin1String("Fault: 'name' required")); 52 | } 53 | 54 | mMessage = element.attribute(QLatin1String("message")); 55 | if (mMessage.isEmpty()) { 56 | context->messageHandler()->warning(QLatin1String("Fault: 'message' required")); 57 | } 58 | } 59 | 60 | void Fault::saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const 61 | { 62 | QDomElement element = document.createElement(QLatin1String("fault")); 63 | parent.appendChild(element); 64 | 65 | if (!mName.isEmpty()) { 66 | element.setAttribute(QLatin1String("name"), mName); 67 | } else { 68 | context->messageHandler()->warning(QLatin1String("Fault: 'name' required")); 69 | } 70 | 71 | if (!mMessage.isEmpty()) { 72 | element.setAttribute(QLatin1String("message"), mMessage.qname()); 73 | } else { 74 | context->messageHandler()->warning(QLatin1String("Fault: 'message' required")); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/fault.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_FAULT_H 8 | #define KWSDL_FAULT_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | class ParserContext; 19 | 20 | namespace KWSDL { 21 | 22 | class KWSDL_EXPORT Fault : public Element 23 | { 24 | public: 25 | typedef QList List; 26 | 27 | Fault(); 28 | Fault(const QString &nameSpace); 29 | ~Fault(); 30 | 31 | void setName(const QString &name); 32 | QString name() const; 33 | 34 | void setMessage(const QName &message); 35 | QName message() const; 36 | 37 | void loadXML(ParserContext *context, const QDomElement &element); 38 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 39 | 40 | private: 41 | QString mName; 42 | QName mMessage; 43 | }; 44 | 45 | } 46 | 47 | #endif // KWSDL_FAULT_H 48 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/import.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include "import.h" 11 | 12 | using namespace KWSDL; 13 | 14 | Import::Import() 15 | { 16 | } 17 | 18 | Import::Import(const QString &nameSpace) 19 | : Element(nameSpace) 20 | { 21 | } 22 | 23 | Import::~Import() 24 | { 25 | } 26 | 27 | void Import::setImportNamespace(const QString &nameSpace) 28 | { 29 | mImportNamespace = nameSpace; 30 | } 31 | 32 | QString Import::importNamespace() const 33 | { 34 | return mImportNamespace; 35 | } 36 | 37 | void Import::setLocation(const QUrl &location) 38 | { 39 | mLocation = location; 40 | } 41 | 42 | QUrl Import::location() const 43 | { 44 | return mLocation; 45 | } 46 | 47 | void Import::loadXML(ParserContext *context, const QDomElement &element) 48 | { 49 | mImportNamespace = element.attribute(QLatin1String("namespace")); 50 | if (mImportNamespace.isEmpty()) { 51 | context->messageHandler()->warning(QLatin1String("Import: 'namespace' required")); 52 | } 53 | 54 | mLocation = QUrl(element.attribute(QLatin1String("schemaLocation"))); 55 | if (!mLocation.isValid()) { 56 | context->messageHandler()->warning(QLatin1String("Import: 'schemaLocation' required")); 57 | } 58 | } 59 | 60 | void Import::saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const 61 | { 62 | QDomElement element = document.createElement(QLatin1String("import")); 63 | parent.appendChild(element); 64 | 65 | if (mImportNamespace.isEmpty()) { 66 | element.setAttribute(QLatin1String("namespace"), mImportNamespace); 67 | } else { 68 | context->messageHandler()->warning(QLatin1String("Import: 'namespace' required")); 69 | } 70 | 71 | if (mLocation.isValid()) { 72 | element.setAttribute(QLatin1String("schemaLocation"), mLocation.toString()); 73 | } else { 74 | context->messageHandler()->warning(QLatin1String("Import: 'schemaLocation' required")); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/import.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_IMPORT_H 8 | #define KWSDL_IMPORT_H 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #include 17 | 18 | class ParserContext; 19 | 20 | namespace KWSDL { 21 | 22 | class KWSDL_EXPORT Import : public Element 23 | { 24 | public: 25 | typedef QList List; 26 | 27 | Import(); 28 | Import(const QString &nameSpace); 29 | ~Import(); 30 | 31 | void loadXML(ParserContext *context, const QDomElement &element); 32 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 33 | 34 | void setImportNamespace(const QString &nameSpace); 35 | QString importNamespace() const; 36 | 37 | void setLocation(const QUrl &location); 38 | QUrl location() const; 39 | 40 | private: 41 | QString mImportNamespace; 42 | QUrl mLocation; 43 | }; 44 | 45 | } 46 | 47 | #endif // KWSDL_IMPORT_H 48 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/message.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_MESSAGE_H 8 | #define KWSDL_MESSAGE_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | class ParserContext; 19 | 20 | namespace KWSDL { 21 | 22 | class KWSDL_EXPORT Message : public Element 23 | { 24 | public: 25 | typedef QList List; 26 | 27 | Message(); 28 | Message(const QString &nameSpace); 29 | ~Message(); 30 | 31 | void setName(const QString &name); 32 | QString name() const; 33 | 34 | void setParts(const Part::List &parts); 35 | Part::List parts() const; 36 | Part partByName(const QString &name) const; 37 | 38 | void loadXML(ParserContext *context, const QDomElement &element); 39 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 40 | 41 | private: 42 | QString mName; 43 | Part::List mParts; 44 | }; 45 | 46 | } 47 | 48 | #endif // KWSDL_MESSAGE_H 49 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/operation.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_OPERATION_H 8 | #define KWSDL_OPERATION_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | class ParserContext; 20 | 21 | namespace KWSDL { 22 | 23 | /** 24 | * as defined inside . 25 | * Contains input message, output message, and faults. 26 | */ 27 | class KWSDL_EXPORT Operation : public Element 28 | { 29 | public: 30 | typedef QList List; 31 | 32 | enum OperationType 33 | { 34 | OneWayOperation, 35 | RequestResponseOperation, 36 | SolicitResponseOperation, 37 | NotificationOperation 38 | }; 39 | 40 | Operation(); 41 | Operation(const QString &nameSpace); 42 | ~Operation(); 43 | 44 | void setOperationType(OperationType type); 45 | OperationType operationType() const; 46 | 47 | void setName(const QString &name); 48 | QString name() const; 49 | 50 | void setInput(const Param &input); 51 | Param input() const; 52 | 53 | void setOutput(const Param &output); 54 | Param output() const; 55 | 56 | void setFaults(const Fault::List &faults); 57 | Fault::List faults() const; 58 | 59 | void loadXML(ParserContext *context, const QDomElement &element); 60 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 61 | 62 | private: 63 | OperationType mType; 64 | 65 | Param mInput; 66 | Param mOutput; 67 | Fault::List mFaults; 68 | 69 | QString mName; 70 | }; 71 | 72 | } 73 | 74 | #endif // KWSDL_OPERATION_H 75 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/param.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "param.h" 12 | #include 13 | 14 | using namespace KWSDL; 15 | 16 | Param::Param() 17 | { 18 | } 19 | 20 | Param::Param(const QString &nameSpace) 21 | : Element(nameSpace) 22 | { 23 | } 24 | 25 | Param::~Param() 26 | { 27 | } 28 | 29 | void Param::setName(const QString &name) 30 | { 31 | mName = name; 32 | } 33 | 34 | QString Param::name() const 35 | { 36 | return mName; 37 | } 38 | 39 | void Param::setMessage(const QName &message) 40 | { 41 | mMessage = message; 42 | } 43 | 44 | QName Param::message() const 45 | { 46 | return mMessage; 47 | } 48 | 49 | void Param::loadXML(ParserContext *context, const QDomElement &element) 50 | { 51 | mName = element.attribute(QLatin1String("name")); 52 | mMessage = element.attribute(QLatin1String("message")); 53 | if (mMessage.isEmpty()) { 54 | context->messageHandler()->warning(QLatin1String("Param: 'message' required")); 55 | } else { 56 | if (mMessage.prefix().isEmpty()) { 57 | mMessage.setNameSpace(nameSpace()); 58 | } else { 59 | mMessage.setNameSpace(context->namespaceManager()->uri(mMessage.prefix())); 60 | } 61 | } 62 | } 63 | 64 | void Param::saveXML(ParserContext *context, const QString &name, QDomDocument &document, QDomElement &parent) const 65 | { 66 | QDomElement element = document.createElement(name); 67 | parent.appendChild(element); 68 | 69 | if (!mName.isEmpty()) { 70 | element.setAttribute(QLatin1String("name"), mName); 71 | } 72 | 73 | if (!mMessage.isEmpty()) { 74 | element.setAttribute(QLatin1String("message"), mMessage.qname()); 75 | } else { 76 | context->messageHandler()->warning(QLatin1String("Param: 'message' required")); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/param.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_PARAM_H 8 | #define KWSDL_PARAM_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | class ParserContext; 19 | 20 | namespace KWSDL { 21 | 22 | class KWSDL_EXPORT Param : public Element 23 | { 24 | public: 25 | typedef QList List; 26 | 27 | Param(); 28 | Param(const QString &nameSpace); 29 | ~Param(); 30 | 31 | void setName(const QString &name); 32 | QString name() const; 33 | 34 | void setMessage(const QName &message); 35 | QName message() const; 36 | 37 | void loadXML(ParserContext *context, const QDomElement &element); 38 | void saveXML(ParserContext *context, const QString &name, QDomDocument &document, QDomElement &parent) const; 39 | 40 | private: 41 | QString mName; 42 | QName mMessage; 43 | }; 44 | 45 | } 46 | 47 | #endif // KWSDL_PARAM_H 48 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/part.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include "part.h" 11 | 12 | using namespace KWSDL; 13 | 14 | Part::Part() 15 | { 16 | } 17 | 18 | Part::Part(const QString &nameSpace) 19 | : Element(nameSpace) 20 | { 21 | } 22 | 23 | Part::~Part() 24 | { 25 | } 26 | 27 | void Part::setName(const QString &name) 28 | { 29 | mName = name; 30 | } 31 | 32 | QString Part::name() const 33 | { 34 | return mName; 35 | } 36 | 37 | void Part::setType(const QName &type) 38 | { 39 | mType = type; 40 | } 41 | 42 | QName Part::type() const 43 | { 44 | return mType; 45 | } 46 | 47 | void Part::setElement(const QName &element) 48 | { 49 | mElement = element; 50 | } 51 | 52 | QName Part::element() const 53 | { 54 | return mElement; 55 | } 56 | 57 | void Part::loadXML(ParserContext *context, const QDomElement &element) 58 | { 59 | mName = element.attribute(QLatin1String("name")); 60 | mType = element.attribute(QLatin1String("type")); 61 | if (!mType.prefix().isEmpty()) { 62 | mType.setNameSpace(context->namespaceManager()->uri(mType.prefix())); 63 | } 64 | 65 | mElement = element.attribute(QLatin1String("element")); 66 | mElement.setNameSpace(context->namespaceManager()->uri(mElement.prefix())); 67 | } 68 | 69 | void Part::saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const 70 | { 71 | Q_UNUSED(context); 72 | 73 | QDomElement element = document.createElement(QLatin1String("part")); 74 | parent.appendChild(element); 75 | 76 | if (!mName.isEmpty()) { 77 | element.setAttribute(QLatin1String("name"), mName); 78 | } 79 | 80 | if (!mType.isEmpty()) { 81 | element.setAttribute(QLatin1String("type"), mType.qname()); 82 | } 83 | 84 | if (!mElement.isEmpty()) { 85 | element.setAttribute(QLatin1String("element"), mElement.qname()); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/part.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_PART_H 8 | #define KWSDL_PART_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | class ParserContext; 19 | 20 | namespace KWSDL { 21 | 22 | class KWSDL_EXPORT Part : public Element 23 | { 24 | public: 25 | typedef QList List; 26 | 27 | Part(); 28 | Part(const QString &nameSpace); 29 | ~Part(); 30 | 31 | void setName(const QString &name); 32 | QString name() const; 33 | 34 | void setType(const QName &type); 35 | QName type() const; 36 | 37 | void setElement(const QName &element); 38 | QName element() const; 39 | 40 | void loadXML(ParserContext *context, const QDomElement &element); 41 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 42 | 43 | private: 44 | QString mName; 45 | QName mType; 46 | QName mElement; 47 | }; 48 | 49 | } 50 | 51 | #endif // KWSDL_PART_H 52 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/port.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_PORT_H 8 | #define KWSDL_PORT_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | class ParserContext; 20 | 21 | namespace KWSDL { 22 | 23 | class KWSDL_EXPORT Port : public Element 24 | { 25 | public: 26 | typedef QList List; 27 | 28 | Port(); 29 | Port(const QString &nameSpace); 30 | ~Port(); 31 | 32 | void setName(const QString &name); 33 | QString name() const; 34 | 35 | void setBindingName(const QName &bindingName); 36 | QName bindingName() const; 37 | 38 | void loadXML(ParserContext *context, Binding::List *bindings, const QDomElement &element); 39 | void saveXML(ParserContext *context, const Binding::List *bindings, QDomDocument &document, QDomElement &parent) const; 40 | 41 | private: 42 | QString mName; 43 | QName mBindingName; 44 | }; 45 | 46 | } 47 | 48 | #endif // KWSDL_PORT_H 49 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/porttype.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_PORTTYPE_H 8 | #define KWSDL_PORTTYPE_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | class ParserContext; 19 | 20 | namespace KWSDL { 21 | 22 | class KWSDL_EXPORT PortType : public Element 23 | { 24 | public: 25 | typedef QList List; 26 | 27 | PortType(); 28 | PortType(const QString &nameSpace); 29 | ~PortType(); 30 | 31 | void setName(const QString &name); 32 | QString name() const; 33 | 34 | void setOperations(const Operation::List &operations); 35 | Operation::List operations() const; 36 | 37 | void loadXML(ParserContext *context, const QDomElement &element); 38 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 39 | 40 | private: 41 | QString mName; 42 | Operation::List mOperations; 43 | }; 44 | 45 | } 46 | 47 | #endif // KWSDL_PORTTYPE_H 48 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/service.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_SERVICE_H 8 | #define KWSDL_SERVICE_H 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | class ParserContext; 20 | 21 | namespace KWSDL { 22 | 23 | class KWSDL_EXPORT Service : public Element 24 | { 25 | public: 26 | typedef QList List; 27 | 28 | Service(); 29 | Service(const QString &nameSpace); 30 | ~Service(); 31 | 32 | void setName(const QString &name); 33 | QString name() const; 34 | 35 | void setPorts(const Port::List &ports); 36 | Port::List ports() const; 37 | 38 | void loadXML(ParserContext *context, Binding::List *bindings, const QDomElement &element); 39 | void saveXML(ParserContext *context, const Binding::List *bindings, QDomDocument &document, QDomElement &parent) const; 40 | 41 | private: 42 | QString mName; 43 | Port::List mPorts; 44 | }; 45 | 46 | } 47 | 48 | #endif // KWSDL_SERVICE_H 49 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/type.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_TYPE_H 8 | #define KWSDL_TYPE_H 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | class ParserContext; 18 | 19 | namespace KWSDL { 20 | 21 | class KWSDL_EXPORT Type : public Element 22 | { 23 | public: 24 | Type(); 25 | Type(const QString &nameSpace); 26 | ~Type(); 27 | 28 | void setTypes(const XSD::Types &types); 29 | XSD::Types types() const; 30 | 31 | bool loadXML(ParserContext *context, const QDomElement &element); 32 | void saveXML(ParserContext *context, QDomDocument &document, QDomElement &parent) const; 33 | 34 | private: 35 | XSD::Types mTypes; 36 | }; 37 | 38 | } 39 | 40 | #endif // KWSDL_TYPE_H 41 | -------------------------------------------------------------------------------- /kdwsdl2cpp/wsdl/wsdl.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Tobias Koenig 3 | 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef KWSDL_WSDL_H 8 | #define KWSDL_WSDL_H 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace KWSDL { 15 | 16 | class KWSDL_EXPORT WSDL 17 | { 18 | public: 19 | WSDL(); 20 | ~WSDL(); 21 | 22 | void setDefinitions(const Definitions &definitions); 23 | Definitions definitions() const; 24 | 25 | void setNamespaceManager(const NSManager &namespaceManager); 26 | const NSManager &namespaceManager() const; 27 | 28 | QSet uniqueBindings(const Service &service) const; 29 | 30 | Binding findBinding(const QName &bindingName) const; 31 | BindingOperation findBindingOperation(const Binding &binding, const QString &operationName); 32 | PortType findPortType(const QName &portTypeName) const; 33 | Message findMessage(const QName &messageName) const; 34 | XSD::Element findElement(const QName &elementName) const; 35 | XSD::ComplexType findComplexType(const QName &typeName) const; 36 | 37 | private: 38 | Definitions mDefinitions; 39 | NSManager mNamespaceManager; 40 | }; 41 | 42 | } 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /scripts/genignore.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import stat 4 | 5 | # 6 | # This file is part of the KD Soap project. 7 | # 8 | # SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company 9 | # 10 | # SPDX-License-Identifier: MIT 11 | # 12 | 13 | # This script, when run in KD Soap's source and build directory containing the results of a full 14 | # build, writes a list of files to be excluded from packaging to CPackIgnores.txt. 15 | # autogen reads that list and passes it to CPack. 16 | 17 | # You should re-generate CPackIgnores.txt before every release and also check that no new binary 18 | # slips through the cracks using 19 | # find . -type f -executable 20 | 21 | sourceDirectory = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 22 | 23 | 24 | def ignoredFiles(): 25 | ret = [] 26 | 27 | def findExecutables(top): 28 | for f in os.listdir(top): 29 | pathname = os.path.join(top, f) 30 | if stat.S_ISDIR(os.stat(pathname).st_mode): 31 | findExecutables(pathname) 32 | elif os.access(pathname, os.X_OK): 33 | # The file is executable for us 34 | ret.append(pathname + '$') 35 | # for OS X 36 | ret.append(pathname + '.app/') 37 | 38 | # With one exception, the executables in those paths are binaries and we're making a SOURCE package. 39 | for path in ['unittests']: 40 | findExecutables(os.path.join(sourceDirectory, path)) 41 | # The exception! 42 | def isGoodExclude(s): return not s.startswith(os.path.join(sourceDirectory, 'unittests/runTest.bat')) 43 | return sorted(filter(isGoodExclude, ret)) 44 | 45 | 46 | f = open('CPackIgnores.txt', 'w') 47 | for ign in ignoredFiles(): 48 | # write paths relative to the source dir, one per line 49 | f.write(ign[len(sourceDirectory):] + '\n') 50 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | add_subdirectory(KDSoapClient) 9 | add_subdirectory(KDSoapServer) 10 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDQName.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of KDE. 3 | 4 | SPDX-FileCopyrightText: 2005 Tobias Koenig 5 | based on wsdlpull parser by Vivek Krishna 6 | 7 | SPDX-License-Identifier: MIT 8 | */ 9 | 10 | #ifndef KDQNAME_H 11 | #define KDQNAME_H 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | class KDSoapValue; 19 | 20 | #include "KDSoapGlobal.h" 21 | 22 | class KDSOAP_EXPORT KDQName 23 | { 24 | public: 25 | typedef QList List; 26 | 27 | KDQName(); 28 | 29 | // Create a KDQName with prefix+localname 30 | explicit KDQName(const QString &name); 31 | 32 | // Create a KDQName with namespace+localname 33 | KDQName(const QString &nameSpace, const QString &localName); 34 | 35 | void operator=(const QString &name); 36 | 37 | QString localName() const; 38 | QString prefix() const; 39 | QString qname() const; 40 | 41 | void setNameSpace(const QString &nameSpace); 42 | QString nameSpace() const; 43 | 44 | bool operator==(const KDQName &) const; 45 | bool operator!=(const KDQName &) const; 46 | 47 | bool isEmpty() const; 48 | 49 | /** 50 | * Creates a KDQName from a KDSoapValue. 51 | */ 52 | static KDQName fromSoapValue(const KDSoapValue &value); 53 | 54 | /** 55 | * Returns a KDSoapValue representation. 56 | */ 57 | KDSoapValue toSoapValue(const QString &name, const QString &typeNameSpace = QString(), const QString &typeName = QString()) const; 58 | 59 | private: 60 | void parse(const QString &); 61 | 62 | QString mNameSpace; 63 | QString mLocalName; 64 | QString mPrefix; 65 | }; 66 | 67 | Q_DECLARE_METATYPE(KDQName) 68 | 69 | inline uint qHash(const KDQName &qn) 70 | { 71 | return qHash(qn.nameSpace()) ^ qHash(qn.localName()); 72 | } 73 | 74 | KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDQName &qn); 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoap.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef KDSOAP_H 12 | #define KDSOAP_H 13 | 14 | #include "KDSoapAuthentication.h" 15 | #include "KDSoapClientInterface.h" 16 | #include "KDSoapMessage.h" 17 | #include "KDSoapNamespaceManager.h" 18 | #include "KDSoapPendingCall.h" 19 | #include "KDSoapPendingCallWatcher.h" 20 | #include "KDSoapValue.h" 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapEndpointReference.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapEndpointReference.h" 12 | 13 | #include 14 | 15 | class KDSoapEndpointReferenceData : public QSharedData 16 | { 17 | public: 18 | KDSoapEndpointReferenceData() 19 | { 20 | } 21 | 22 | QString m_address; 23 | KDSoapValueList m_metadata; 24 | KDSoapValueList m_referenceParameters; 25 | }; 26 | 27 | KDSoapEndpointReference::KDSoapEndpointReference(const QString &address) 28 | : d(new KDSoapEndpointReferenceData) 29 | { 30 | d->m_address = address; 31 | } 32 | 33 | KDSoapEndpointReference::KDSoapEndpointReference(const KDSoapEndpointReference &other) 34 | : d(other.d) 35 | { 36 | } 37 | 38 | KDSoapEndpointReference &KDSoapEndpointReference::operator=(const KDSoapEndpointReference &other) 39 | { 40 | d = other.d; 41 | return *this; 42 | } 43 | 44 | KDSoapEndpointReference::~KDSoapEndpointReference() 45 | { 46 | } 47 | 48 | QString KDSoapEndpointReference::address() const 49 | { 50 | return d->m_address; 51 | } 52 | 53 | void KDSoapEndpointReference::setAddress(const QString &address) 54 | { 55 | d->m_address = address; 56 | } 57 | 58 | KDSoapValueList KDSoapEndpointReference::metadata() const 59 | { 60 | return d->m_metadata; 61 | } 62 | 63 | void KDSoapEndpointReference::setMetadata(const KDSoapValueList &metadata) 64 | { 65 | d->m_metadata = metadata; 66 | } 67 | 68 | bool KDSoapEndpointReference::isEmpty() const 69 | { 70 | return d->m_address.isEmpty(); 71 | } 72 | 73 | KDSoapValueList KDSoapEndpointReference::referenceParameters() const 74 | { 75 | return d->m_referenceParameters; 76 | } 77 | 78 | void KDSoapEndpointReference::setReferenceParameters(const KDSoapValueList &referenceParameters) 79 | { 80 | d->m_referenceParameters = referenceParameters; 81 | } 82 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapGlobal.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPGLOBAL_H 11 | #define KDSOAPGLOBAL_H 12 | 13 | #include 14 | 15 | #ifdef KDSOAP_STATICLIB 16 | #undef KDSOAP_SHARED 17 | #define KDSOAP_EXPORT 18 | #else 19 | #ifdef KDSOAP_BUILD_KDSOAP_LIB 20 | #define KDSOAP_EXPORT Q_DECL_EXPORT 21 | #else 22 | #define KDSOAP_EXPORT Q_DECL_IMPORT 23 | #endif 24 | #endif 25 | 26 | #endif /* KDSOAPGLOBAL_H */ 27 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapJob.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapJob.h" 12 | #include "KDSoapMessage.h" 13 | 14 | class KDSoapJob::Private 15 | { 16 | public: 17 | KDSoapHeaders requestHeaders; 18 | KDSoapMessage reply; 19 | KDSoapHeaders replyHeaders; 20 | bool isAutoDelete; 21 | }; 22 | 23 | KDSoapJob::KDSoapJob(QObject *parent) 24 | : QObject(parent) 25 | , d(new Private) 26 | { 27 | d->isAutoDelete = true; 28 | } 29 | 30 | KDSoapJob::~KDSoapJob() 31 | { 32 | delete d; 33 | } 34 | 35 | KDSoapHeaders KDSoapJob::requestHeaders() const 36 | { 37 | return d->requestHeaders; 38 | } 39 | 40 | void KDSoapJob::setRequestHeaders(const KDSoapHeaders &headers) 41 | { 42 | d->requestHeaders = headers; 43 | } 44 | 45 | void KDSoapJob::start() 46 | { 47 | QMetaObject::invokeMethod(this, "doStart", Qt::QueuedConnection); 48 | } 49 | 50 | void KDSoapJob::setAutoDelete(bool enable) 51 | { 52 | d->isAutoDelete = enable; 53 | } 54 | 55 | void KDSoapJob::emitFinished(const KDSoapMessage &reply, const KDSoapHeaders &replyHeaders) 56 | { 57 | d->reply = reply; 58 | d->replyHeaders = replyHeaders; 59 | emit finished(this); 60 | if (d->isAutoDelete) { 61 | deleteLater(); 62 | } 63 | } 64 | 65 | KDSoapMessage KDSoapJob::reply() const 66 | { 67 | return d->reply; 68 | } 69 | 70 | KDSoapHeaders KDSoapJob::replyHeaders() const 71 | { 72 | return d->replyHeaders; 73 | } 74 | 75 | bool KDSoapJob::isFault() const 76 | { 77 | return d->reply.isFault(); 78 | } 79 | 80 | QString KDSoapJob::faultAsString() const 81 | { 82 | if (d->reply.isFault()) { 83 | return d->reply.faultAsString(); 84 | } else { 85 | return QString(); 86 | } 87 | } 88 | 89 | #include "moc_KDSoapJob.cpp" 90 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapMessageReader_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef KDSOAPMESSAGEREADER_P_H 12 | #define KDSOAPMESSAGEREADER_P_H 13 | 14 | #include "KDSoapClientInterface.h" 15 | #include "KDSoapMessage.h" 16 | 17 | class KDSOAP_EXPORT KDSoapMessageReader 18 | { 19 | public: 20 | enum XmlError 21 | { 22 | NoError = 0, 23 | ParseError, 24 | PrematureEndOfDocumentError 25 | }; 26 | 27 | KDSoapMessageReader(); 28 | 29 | XmlError xmlToMessage(const QByteArray &data, KDSoapMessage *pParsedMessage, QString *pMessageNamespace, KDSoapHeaders *pRequestHeaders, 30 | KDSoap::SoapVersion soapVersion) const; 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapMessageWriter_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPMESSAGEWRITER_P_H 11 | #define KDSOAPMESSAGEWRITER_P_H 12 | 13 | #include "KDSoapAuthentication.h" 14 | #include "KDSoapClientInterface.h" 15 | #include "KDSoapMessage.h" 16 | #include 17 | #include 18 | #include 19 | #include 20 | class KDSoapMessage; 21 | class KDSoapHeaders; 22 | class KDSoapNamespacePrefixes; 23 | class KDSoapValue; 24 | class KDSoapValueList; 25 | 26 | /** 27 | * \internal 28 | * Internal class -- only exported for the server lib 29 | */ 30 | class KDSOAP_EXPORT KDSoapMessageWriter 31 | { 32 | public: 33 | KDSoapMessageWriter(); 34 | 35 | void setVersion(KDSoap::SoapVersion version); 36 | void setMessageNamespace(const QString &ns); 37 | 38 | QByteArray messageToXml(const KDSoapMessage &message, const QString &method /*empty in document style*/, 39 | const KDSoapHeaders &headers, 40 | const QMap &persistentHeaders, 41 | const KDSoapAuthentication &authentication = KDSoapAuthentication()) const; 42 | 43 | private: 44 | QString m_messageNamespace; 45 | KDSoap::SoapVersion m_version; 46 | }; 47 | 48 | #endif // KDSOAPMESSAGEWRITER_P_H 49 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapNamespaceManager.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPNAMESPACEMANAGER_H 11 | #define KDSOAPNAMESPACEMANAGER_H 12 | 13 | #include "KDSoapGlobal.h" 14 | #include 15 | 16 | /** 17 | * Repository of namespaces 18 | */ 19 | class KDSOAP_EXPORT KDSoapNamespaceManager // krazy:exclude=dpointer 20 | { 21 | public: 22 | static QString xmlSchema1999(); 23 | static QString xmlSchema2001(); 24 | static QString xmlSchemaInstance1999(); 25 | static QString xmlSchemaInstance2001(); 26 | static QString soapEnvelope(); 27 | static QString soapEnvelope200305(); 28 | static QString soapEncoding(); 29 | static QString soapEncoding200305(); 30 | static QString soapMessageAddressing(); 31 | static QString soapSecurityExtention(); 32 | static QString soapSecurityUtility(); 33 | static QString soapMessageAddressing200303(); 34 | static QString soapMessageAddressing200403(); 35 | static QString soapMessageAddressing200408(); 36 | 37 | private: // TODO instantiate to handle custom namespaces per clientinterface 38 | KDSoapNamespaceManager(); 39 | }; 40 | 41 | #endif // KDSOAPNAMESPACEMANAGER_H 42 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapNamespacePrefixes.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #include "KDSoapClientInterface_p.h" 11 | #include "KDSoapNamespaceManager.h" 12 | #include "KDSoapNamespacePrefixes_p.h" 13 | 14 | void KDSoapNamespacePrefixes::writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version, bool messageAddressingEnabled, 15 | KDSoapMessageAddressingProperties::KDSoapAddressingNamespace messageAddressingNamespace) 16 | { 17 | if (version == KDSoap::SOAP1_1) { 18 | writeNamespace(writer, KDSoapNamespaceManager::soapEnvelope(), QLatin1String("soap")); 19 | writeNamespace(writer, KDSoapNamespaceManager::soapEncoding(), QLatin1String("soap-enc")); 20 | } else if (version == KDSoap::SOAP1_2) { 21 | writeNamespace(writer, KDSoapNamespaceManager::soapEnvelope200305(), QLatin1String("soap")); 22 | writeNamespace(writer, KDSoapNamespaceManager::soapEncoding200305(), QLatin1String("soap-enc")); 23 | } 24 | 25 | writeNamespace(writer, KDSoapNamespaceManager::xmlSchema2001(), QLatin1String("xsd")); 26 | writeNamespace(writer, KDSoapNamespaceManager::xmlSchemaInstance2001(), QLatin1String("xsi")); 27 | 28 | if (messageAddressingEnabled) { 29 | const QString addressingNS = KDSoapMessageAddressingProperties::addressingNamespaceToString(messageAddressingNamespace); 30 | writeNamespace(writer, addressingNS, QLatin1String("wsa")); 31 | } 32 | 33 | // Also insert known variants 34 | insert(KDSoapNamespaceManager::xmlSchema1999(), QString::fromLatin1("xsd")); 35 | insert(KDSoapNamespaceManager::xmlSchemaInstance1999(), QString::fromLatin1("xsi")); 36 | } 37 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapNamespacePrefixes_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPNAMESPACEPREFIXES_P_H 11 | #define KDSOAPNAMESPACEPREFIXES_P_H 12 | 13 | #include 14 | #include 15 | 16 | #include "KDSoapClientInterface.h" 17 | #include "KDSoapMessageAddressingProperties.h" 18 | 19 | class KDSoapNamespacePrefixes : public QMap 20 | { 21 | public: 22 | void writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version = KDSoap::SOAP1_1, bool messageAddressingEnabled = false, 23 | KDSoapMessageAddressingProperties::KDSoapAddressingNamespace messageAddressingNamespace = 24 | KDSoapMessageAddressingProperties::Addressing200508); 25 | 26 | void writeNamespace(QXmlStreamWriter &writer, const QString &ns, const QString &prefix) 27 | { 28 | // qDebug() << "writeNamespace" << ns << prefix; 29 | insert(ns, prefix); 30 | writer.writeNamespace(ns, prefix); 31 | } 32 | QString resolve(const QString &ns, const QString &localName) const 33 | { 34 | const QString prefix = value(ns); 35 | if (prefix.isEmpty()) { 36 | qWarning("ERROR: Namespace not found: %s (for localName %s)", qPrintable(ns), qPrintable(localName)); 37 | } 38 | return prefix + QLatin1Char(':') + localName; 39 | } 40 | }; 41 | 42 | #endif // KDSOAPNAMESPACESPREFIXES_H 43 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapPendingCallWatcher.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #include "KDSoapPendingCallWatcher.h" 11 | #include "KDSoapPendingCallWatcher_p.h" 12 | #include "KDSoapPendingCall_p.h" 13 | #include 14 | #include 15 | 16 | KDSoapPendingCallWatcher::KDSoapPendingCallWatcher(const KDSoapPendingCall &call, QObject *parent) 17 | : QObject(parent) 18 | , KDSoapPendingCall(call) 19 | , d(nullptr) // currently unused 20 | { 21 | connect(call.d->reply.data(), &QNetworkReply::finished, this, [&]() { 22 | emit finished(this); 23 | }); 24 | } 25 | 26 | KDSoapPendingCallWatcher::~KDSoapPendingCallWatcher() 27 | { 28 | } 29 | 30 | #include "moc_KDSoapPendingCallWatcher.cpp" 31 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapPendingCallWatcher_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPPENDINGCALLWATCHER_P_H 11 | #define KDSOAPPENDINGCALLWATCHER_P_H 12 | 13 | // currently unused 14 | class KDSoapPendingCallWatcher::Private 15 | { 16 | public: 17 | Private(KDSoapPendingCallWatcher *qq) 18 | : q(qq) 19 | { 20 | } 21 | 22 | KDSoapPendingCallWatcher *q; 23 | }; 24 | 25 | #endif // KDSOAPPENDINGCALLWATCHER_P_H 26 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapPendingCall_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPPENDINGCALL_P_H 11 | #define KDSOAPPENDINGCALL_P_H 12 | 13 | #include "KDSoapClientInterface.h" 14 | #include "KDSoapMessage.h" 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | class KDSoapValue; 22 | 23 | void maybeDebugRequest(const QByteArray &data, const QNetworkRequest &request, QNetworkReply *reply); 24 | 25 | class KDSoapPendingCall::Private : public QSharedData 26 | { 27 | public: 28 | Private(QNetworkReply *r, QBuffer *b) 29 | : reply(r) 30 | , buffer(b) 31 | , soapVersion(KDSoap::SOAP1_1) 32 | , parsed(false) 33 | { 34 | } 35 | ~Private(); 36 | 37 | void parseReply(); 38 | KDSoapValue parseReplyElement(QXmlStreamReader &reader); 39 | 40 | // Can be deleted under us if the KDSoapClientInterface (and its QNetworkAccessManager) 41 | // are deleted before the KDSoapPendingCall. 42 | QPointer reply; 43 | QBuffer *buffer; 44 | KDSoapMessage replyMessage; 45 | KDSoapHeaders replyHeaders; 46 | KDSoap::SoapVersion soapVersion; 47 | bool parsed; 48 | }; 49 | 50 | #endif // KDSOAPPENDINGCALL_P_H 51 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapReplySslHandler.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include //krazy:exclude=includes must come first to define QT_NO_SSL 12 | 13 | #ifndef QT_NO_SSL 14 | 15 | #include "KDSoapReplySslHandler_p.h" 16 | #include "KDSoapSslHandler.h" 17 | 18 | KDSoapReplySslHandler::KDSoapReplySslHandler(QNetworkReply *reply, KDSoapSslHandler *handler) 19 | : QObject(reply) 20 | , m_handler(handler) 21 | { 22 | Q_ASSERT(reply); 23 | Q_ASSERT(handler); 24 | QObject::connect(reply, &QNetworkReply::sslErrors, this, &KDSoapReplySslHandler::slotReplySslErrors); 25 | } 26 | 27 | void KDSoapReplySslHandler::slotReplySslErrors(const QList &errors) 28 | { 29 | QNetworkReply *reply = qobject_cast(parent()); 30 | Q_ASSERT(reply); 31 | m_handler->handleSslErrors(reply, errors); 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapReplySslHandler_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef KDSOAPREPLYSSLHANDLER_P_H 12 | #define KDSOAPREPLYSSLHANDLER_P_H 13 | 14 | #include 15 | #include 16 | QT_BEGIN_NAMESPACE 17 | class QNetworkReply; 18 | QT_END_NAMESPACE 19 | 20 | class KDSoapSslHandler; 21 | 22 | #ifndef QT_NO_SSL 23 | 24 | class KDSoapReplySslHandler : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit KDSoapReplySslHandler(QNetworkReply *reply, KDSoapSslHandler *handler); 29 | 30 | private Q_SLOTS: 31 | void slotReplySslErrors(const QList &errors); 32 | 33 | private: 34 | KDSoapSslHandler *m_handler; 35 | }; 36 | 37 | #endif 38 | #endif // KDSOAPREPLYSSLHANDLER_P_H 39 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapSslHandler.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include //may define QT_NO_SSL. krazy:exclude=includes 12 | 13 | #ifndef QT_NO_SSL 14 | #include "KDSoapSslHandler.h" 15 | 16 | KDSoapSslHandler::KDSoapSslHandler(QObject *parent) 17 | : QObject(parent) 18 | , m_reply(nullptr) 19 | { 20 | } 21 | 22 | KDSoapSslHandler::~KDSoapSslHandler() 23 | { 24 | } 25 | 26 | void KDSoapSslHandler::ignoreSslErrors() 27 | { 28 | Q_ASSERT(m_reply); 29 | m_reply->ignoreSslErrors(); 30 | } 31 | 32 | void KDSoapSslHandler::ignoreSslErrors(const QList &errors) 33 | { 34 | Q_ASSERT(m_reply); 35 | m_reply->ignoreSslErrors(errors); 36 | } 37 | 38 | void KDSoapSslHandler::handleSslErrors(QNetworkReply *reply, const QList &errors) 39 | { 40 | m_reply = reply; 41 | Q_ASSERT(m_reply); 42 | Q_EMIT sslErrors(this, errors); 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /src/KDSoapClient/KDSoapUdpClient_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef KDSOAPUDPCLIENT_P_H 12 | #define KDSOAPUDPCLIENT_P_H 13 | 14 | #include 15 | #include 16 | 17 | #include "KDSoapUdpClient.h" 18 | 19 | class KDSoapUdpClientPrivate : public QObject 20 | { 21 | Q_OBJECT 22 | public: 23 | explicit KDSoapUdpClientPrivate(KDSoapUdpClient *q) 24 | : q_ptr(q) 25 | { 26 | } 27 | 28 | void receivedDatagram(const QByteArray &messageData, const QHostAddress &senderAddress, quint16 senderPort); 29 | 30 | public Q_SLOTS: 31 | void readyRead(); 32 | 33 | public: 34 | QUdpSocket *socket = nullptr; 35 | KDSoap::SoapVersion soapVersion = KDSoap::SOAP1_2; 36 | 37 | private: 38 | KDSoapUdpClient *const q_ptr; 39 | Q_DECLARE_PUBLIC(KDSoapUdpClient) 40 | }; 41 | 42 | #endif // KDSOAPUDPCLIENT_P_H 43 | -------------------------------------------------------------------------------- /src/KDSoapClient/doxygen.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2011 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | /*! 12 | 13 | \mainpage KD Soap Reference Documentation 14 | 15 | \image html xmldiagram2.png 16 | 17 | KD SOAP is a tool for creating client applications for web services. It makes it possible to interact with applications which have APIs that can be 18 | exported as SOAP objects. The web service then provides a machine-accessible interface to its functionality via HTTP. The remote method calls are 19 | handled with the SOAP standard, which describes method calls, their parameters and return values as XML documents. KD SOAP is used by a variety of 20 | programs for a variety of different purposes - for example, one application uses KD SOAP to access data from a CRM system such as SugarCRM or 21 | Salesforce. 22 | 23 | \section Features 24 | 25 | \li The KD SOAP library provides an abstraction layer for both the actual transport, as well as, the construction of data objects and method calls. 26 | (The latter relieves application developers from manually writing XML marshalling and demarshalling code, allowing them to build arbitrary complex 27 | data structures using simple C++ classes.) \li The transport abstraction provides both synchronous as well as Qt signal/slot based asynchronous remote 28 | method call and response handling. \li Alongside the library, KD SOAP ships with the kdwsdl2cpp code generator, providing additional means for 29 | increasing developer productivity by generating a proxy API for a target web service based on its formal WSDL service description. Using classes 30 | generated by this approach adds build-time type checking and “in process”-like object behavior (i.e. using C++ data types as parameters and return 31 | values of each of the web service’s methods). 32 | */ 33 | -------------------------------------------------------------------------------- /src/KDSoapServer/KDSoapDelayedResponseHandle.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapDelayedResponseHandle.h" 12 | #include "KDSoapServerSocket_p.h" 13 | #include 14 | #include 15 | 16 | class KDSoapDelayedResponseHandleData : public QSharedData 17 | { 18 | public: 19 | KDSoapDelayedResponseHandleData(KDSoapServerSocket *s) 20 | : socket(s) 21 | { 22 | } 23 | // QPointer in case the client disconnects during a delayed response 24 | QPointer socket; 25 | }; 26 | 27 | KDSoapDelayedResponseHandle::KDSoapDelayedResponseHandle() 28 | : data(new KDSoapDelayedResponseHandleData(nullptr)) 29 | { 30 | } 31 | 32 | KDSoapDelayedResponseHandle::KDSoapDelayedResponseHandle(const KDSoapDelayedResponseHandle &rhs) 33 | : data(rhs.data) 34 | { 35 | } 36 | 37 | KDSoapDelayedResponseHandle &KDSoapDelayedResponseHandle::operator=(const KDSoapDelayedResponseHandle &rhs) 38 | { 39 | if (this != &rhs) { 40 | data.operator=(rhs.data); 41 | } 42 | return *this; 43 | } 44 | 45 | KDSoapDelayedResponseHandle::~KDSoapDelayedResponseHandle() 46 | { 47 | } 48 | 49 | KDSoapDelayedResponseHandle::KDSoapDelayedResponseHandle(KDSoapServerSocket *socket) 50 | : data(new KDSoapDelayedResponseHandleData(socket)) 51 | { 52 | socket->setResponseDelayed(); 53 | } 54 | 55 | KDSoapServerSocket *KDSoapDelayedResponseHandle::serverSocket() const 56 | { 57 | return data->socket; 58 | } 59 | -------------------------------------------------------------------------------- /src/KDSoapServer/KDSoapDelayedResponseHandle.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef KDSOAPDELAYEDRESPONSEHANDLE_H 12 | #define KDSOAPDELAYEDRESPONSEHANDLE_H 13 | 14 | #include "KDSoapServerGlobal.h" 15 | #include 16 | 17 | class KDSoapDelayedResponseHandleData; 18 | class KDSoapServerSocket; 19 | 20 | /** 21 | * The delayed-response handle is an opaque data type representing 22 | * a delayed response. When a server object wants to implement a SOAP method 23 | * call using an asynchronous operation, it can call KDSoapServerObjectInterface::prepareDelayedResponse(), store 24 | * the handle, and use the handle later on in order to send the delayed response. 25 | */ 26 | class KDSOAPSERVER_EXPORT KDSoapDelayedResponseHandle 27 | { 28 | public: 29 | /** 30 | * Constructs a null handle. 31 | */ 32 | KDSoapDelayedResponseHandle(); 33 | KDSoapDelayedResponseHandle(const KDSoapDelayedResponseHandle &); 34 | KDSoapDelayedResponseHandle &operator=(const KDSoapDelayedResponseHandle &); 35 | ~KDSoapDelayedResponseHandle(); 36 | 37 | private: 38 | friend class KDSoapServerObjectInterface; 39 | explicit KDSoapDelayedResponseHandle(KDSoapServerSocket *socket); 40 | KDSoapServerSocket *serverSocket() const; 41 | QSharedDataPointer data; 42 | }; 43 | 44 | #endif // KDSOAPDELAYEDRESPONSEHANDLE_H 45 | -------------------------------------------------------------------------------- /src/KDSoapServer/KDSoapServerAuthInterface.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPSERVERAUTHINTERFACE_H 11 | #define KDSOAPSERVERAUTHINTERFACE_H 12 | 13 | #include "KDSoapServerGlobal.h" 14 | #include 15 | class KDSoapAuthentication; 16 | class KDSoapServerSocket; 17 | 18 | /** 19 | * Additional interface for handling authentication. 20 | * 21 | * In addition to deriving from KDSoapServerObjectInterface, you can derive from 22 | * KDSoapServerAuthInterface in order to handle HTTP authentication. 23 | * 24 | * Use Q_INTERFACES(KDSoapServerAuthInterface) in your derived class (under Q_OBJECT) 25 | * so that Qt can discover the additional inheritance. 26 | * 27 | * \since 1.3 28 | */ 29 | class KDSOAPSERVER_EXPORT KDSoapServerAuthInterface 30 | { 31 | public: 32 | /** 33 | * Constructor 34 | */ 35 | KDSoapServerAuthInterface(); 36 | 37 | KDSoapServerAuthInterface(const KDSoapServerAuthInterface &other) = delete; 38 | KDSoapServerAuthInterface &operator=(const KDSoapServerAuthInterface &other) = delete; 39 | 40 | /** 41 | * Destructor 42 | */ 43 | virtual ~KDSoapServerAuthInterface(); 44 | 45 | /** 46 | * Return true if the authentication details are valid. 47 | */ 48 | virtual bool validateAuthentication(const KDSoapAuthentication &auth, const QString &path); 49 | 50 | private: 51 | friend class KDSoapServerSocket; 52 | bool handleHttpAuth(const QByteArray &authValue, const QString &path); 53 | class Private; 54 | Private *const d; 55 | }; 56 | 57 | QT_BEGIN_NAMESPACE 58 | Q_DECLARE_INTERFACE(KDSoapServerAuthInterface, "com.kdab.KDSoap.ServerAuthInterface/1.0") 59 | QT_END_NAMESPACE 60 | 61 | #endif /* KDSOAPSERVERAUTHINTERFACE_H */ 62 | -------------------------------------------------------------------------------- /src/KDSoapServer/KDSoapServerCustomVerbRequestInterface.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapServerCustomVerbRequestInterface.h" 12 | 13 | KDSoapServerCustomVerbRequestInterface::KDSoapServerCustomVerbRequestInterface() 14 | : d(nullptr) 15 | { 16 | } 17 | 18 | KDSoapServerCustomVerbRequestInterface::~KDSoapServerCustomVerbRequestInterface() 19 | { 20 | } 21 | 22 | bool KDSoapServerCustomVerbRequestInterface::processCustomVerbRequest(const QByteArray &requestType, const QByteArray &requestData, 23 | const QMap &httpHeaders, QByteArray &customAnswer) 24 | { 25 | Q_UNUSED(requestType); 26 | Q_UNUSED(requestData); 27 | Q_UNUSED(httpHeaders); 28 | Q_UNUSED(customAnswer); 29 | 30 | return false; 31 | } 32 | -------------------------------------------------------------------------------- /src/KDSoapServer/KDSoapServerGlobal.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPSERVERGLOBAL_H 11 | #define KDSOAPSERVERGLOBAL_H 12 | 13 | #include 14 | 15 | #ifdef KDSOAPSERVER_STATICLIB 16 | #undef KDSOAPSERVER_SHAREDLIB 17 | #define KDSOAPSERVER_EXPORT 18 | #else 19 | #ifdef KDSOAP_BUILD_KDSOAPSERVER_LIB 20 | #define KDSOAPSERVER_EXPORT Q_DECL_EXPORT 21 | #else 22 | #define KDSOAPSERVER_EXPORT Q_DECL_IMPORT 23 | #endif 24 | #endif 25 | 26 | #endif /* KDSOAPSERVERGLOBAL_H */ 27 | -------------------------------------------------------------------------------- /src/KDSoapServer/KDSoapServerRawXMLInterface.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapServerRawXMLInterface.h" 12 | 13 | KDSoapServerRawXMLInterface::KDSoapServerRawXMLInterface() 14 | : d(nullptr) 15 | { 16 | } 17 | 18 | KDSoapServerRawXMLInterface::~KDSoapServerRawXMLInterface() 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /src/KDSoapServer/KDSoapSocketList_p.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | #ifndef KDSOAPSOCKETLIST_P_H 11 | #define KDSOAPSOCKETLIST_P_H 12 | 13 | #include 14 | #include 15 | QT_BEGIN_NAMESPACE 16 | class QTcpSocket; 17 | class QObject; 18 | QT_END_NAMESPACE 19 | class KDSoapServer; 20 | class KDSoapServerSocket; 21 | 22 | class KDSoapSocketList : public QObject // clazy:exclude=ctor-missing-parent-argument 23 | { 24 | Q_OBJECT 25 | public: 26 | explicit KDSoapSocketList(KDSoapServer *server); 27 | ~KDSoapSocketList(); 28 | 29 | KDSoapServerSocket *handleIncomingConnection(int socketDescriptor); 30 | 31 | int socketCount() const; 32 | void disconnectAll(); 33 | 34 | int totalConnectionCount() const; 35 | void increaseConnectionCount(); 36 | void resetTotalConnectionCount(); 37 | 38 | KDSoapServer *server() const 39 | { 40 | return m_server; 41 | } 42 | 43 | public Q_SLOTS: 44 | void socketDeleted(KDSoapServerSocket *socket); 45 | 46 | private: 47 | KDSoapServer *m_server; 48 | QSet m_sockets; 49 | QAtomicInt m_totalConnectionCount; 50 | }; 51 | 52 | #endif // KDSOAPSOCKETLIST_P_H 53 | -------------------------------------------------------------------------------- /testtools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | find_package( 9 | Qt${QT_VERSION_MAJOR} ${QT_MIN_VERSION} 10 | COMPONENTS Xml CONFIG 11 | REQUIRED 12 | ) 13 | list(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::Xml) 14 | 15 | include_directories(.. ../src/KDSoapClient) 16 | 17 | set(testtools_srcs httpserver_p.cpp testtools.qrc) 18 | 19 | add_library( 20 | testtools STATIC 21 | ${testtools_srcs} 22 | ) 23 | target_link_libraries( 24 | testtools ${QT_LIBRARIES} 25 | ) 26 | if(Qt5_POSITION_INDEPENDENT_CODE) 27 | set_target_properties(testtools PROPERTIES POSITION_INDEPENDENT_CODE TRUE) 28 | endif() 29 | -------------------------------------------------------------------------------- /testtools/certs/README.txt: -------------------------------------------------------------------------------- 1 | Instructions for generating the SSL certificates (every 10 years) 2 | ================================================================= 3 | 4 | New CA key/certificate 5 | ---------------------- 6 | 7 | openssl req -x509 -nodes -new -sha256 -days 3650 -newkey rsa:4096 -keyout cakey.pem -out cacert.pem -subj "/CN=KDAB Certificate Test CA/C=SE/ST=Värmland/O=KDAB Test Root Certification Authority/emailAddress=ca@example.com" 8 | 9 | Localhost signed certificate 10 | ---------------------------- 11 | 12 | Add this into a file called cert.ext: 13 | 14 | authorityInfoAccess=OCSP;URI:http://ocsp.example.com:8888/ 15 | basicConstraints=CA:FALSE 16 | 17 | Create a certificate request: 18 | 19 | openssl req -nodes -new -sha256 -newkey rsa:4096 -keyout test-127.0.0.1-key.pem -out test-127.0.0.1-cert.crt -subj "/CN=127.0.0.1/C=SE/ST=Värmland/O=KDSoap Tests/emailAddress=test@example.com" 20 | 21 | Sign the certificate with the CA: 22 | 23 | openssl x509 -req -sha256 -days 3650 -in test-127.0.0.1-cert.crt -CA cacert.pem -CAkey cakey.pem -CAcreateserial -out test-127.0.0.1-cert.pem -extfile cert.ext 24 | 25 | You then just need to commit the .pem files, no need of the .crt or .srl, I think. 26 | -------------------------------------------------------------------------------- /testtools/testtools.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | certs/cacert.pem 4 | certs/test-127.0.0.1-cert.pem 5 | certs/cakey.pem 6 | certs/test-127.0.0.1-key.pem 7 | 8 | 9 | -------------------------------------------------------------------------------- /unittests/QSharedPointer_include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(QSharedPointer_include_SRCS test_qsharedpointer_include.cpp) 9 | 10 | set(WSDL_FILES test_qsharedpointer_include_wsdl.wsdl) 11 | 12 | add_unittest(${QSharedPointer_include_SRCS}) 13 | -------------------------------------------------------------------------------- /unittests/QSharedPointer_include/test_qsharedpointer_include.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "wsdl_test_qsharedpointer_include_wsdl.h" 12 | 13 | #include 14 | 15 | class RightInclude : public QObject 16 | { 17 | Q_OBJECT 18 | 19 | private Q_SLOTS: 20 | 21 | void testCompiled() 22 | { 23 | Hello_Service service; 24 | } 25 | }; 26 | 27 | QTEST_MAIN(RightInclude) 28 | 29 | #include "test_qsharedpointer_include.moc" 30 | -------------------------------------------------------------------------------- /unittests/add_test_subdir.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This file is part of the KD Soap project. 4 | # 5 | # SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | # 7 | # SPDX-License-Identifier: MIT 8 | # 9 | 10 | # Generate buildsystem files for a new subdir 11 | 12 | unset CDPATH 13 | 14 | subdir=$1 15 | test -z "$subdir" && exit 1 16 | test -d "$subdir" || exit 2 17 | 18 | wsdlfiles=`cd $subdir ; ls -1 *.wsdl` 19 | cppfiles=`cd $subdir ; ls -1 *.cpp` 20 | 21 | # CMake 22 | 23 | cat > $subdir/CMakeLists.txt <> CMakeLists.txt 31 | -------------------------------------------------------------------------------- /unittests/basic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(basic) 9 | set(basic_SRCS test_basic.cpp) 10 | add_unittest(${basic_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/basic/test_basic.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDDateTime.h" 12 | #include "KDSoapValue.h" 13 | #include 14 | 15 | class Basic : public QObject 16 | { 17 | Q_OBJECT 18 | private Q_SLOTS: 19 | 20 | void testValueSwap() 21 | { 22 | static const QLatin1String hello("Hello, World!"); 23 | KDSoapValue v1(QLatin1String("v1"), 10); 24 | KDSoapValue v2(QLatin1String("v2"), hello); 25 | v1.swap(v2); 26 | QCOMPARE(v1.value().toString(), hello); 27 | QCOMPARE(v1.name(), QLatin1String("v2")); 28 | QCOMPARE(v2.value().toInt(), 10); 29 | QCOMPARE(v2.name(), QLatin1String("v1")); 30 | qSwap(v1, v2); 31 | QCOMPARE(v1.value().toInt(), 10); 32 | QCOMPARE(v2.value().toString(), hello); 33 | #ifndef QT_NO_STL 34 | using std::swap; 35 | swap(v2, v1); 36 | QCOMPARE(v1.value().toString(), hello); 37 | QCOMPARE(v2.value().toInt(), 10); 38 | #endif 39 | } 40 | 41 | void testDateTime() 42 | { 43 | QDateTime qdt(QDate(2010, 12, 31), QTime(0, 0, 0)); 44 | QVERIFY(qdt.isValid()); 45 | KDDateTime kdt(qdt); 46 | QVERIFY(kdt.isValid()); 47 | QCOMPARE(kdt.toDateString(), QString::fromLatin1("2010-12-31T00:00:00")); 48 | QVERIFY(kdt.timeZone().isEmpty()); 49 | kdt.setTimeZone(QString::fromLatin1("Z")); 50 | QCOMPARE(kdt.toDateString(), QString::fromLatin1("2010-12-31T00:00:00Z")); 51 | kdt = QDateTime(QDate(2011, 03, 15), QTime(23, 59, 59, 999)); 52 | kdt.setTimeZone(QString::fromLatin1("+01:00")); 53 | QCOMPARE(kdt.toDateString(), QString::fromLatin1("2011-03-15T23:59:59.999+01:00")); 54 | } 55 | }; 56 | 57 | QTEST_MAIN(Basic) 58 | 59 | #include "test_basic.moc" 60 | -------------------------------------------------------------------------------- /unittests/builtinhttp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(builtinhttp) 9 | set(builtinhttp_SRCS test_builtinhttp.cpp) 10 | set(EXTRA_LIBS kdsoap-server) 11 | add_unittest(${builtinhttp_SRCS}) 12 | -------------------------------------------------------------------------------- /unittests/clearbooks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(clearbooks_SRCS test_clearbooks.cpp) 9 | set(WSDL_FILES clearbooks.wsdl) 10 | set(KSWSDL2CPP_OPTION -server) 11 | set(EXTRA_LIBS kdsoap-server) 12 | add_unittest(${clearbooks_SRCS}) 13 | -------------------------------------------------------------------------------- /unittests/clearbooks/test_clearbooks.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | int main() 12 | { 13 | // TODO :-) 14 | // At least we check that the generated wsdl_*.cpp file compiles. 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /unittests/cribis/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(cribis_SRCS test_cribis.cpp) 9 | set(WSDL_FILES CribisSKWS.wsdl) 10 | add_unittest(${cribis_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/cribis/test_cribis.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "wsdl_CribisSKWS.h" 12 | 13 | int main() 14 | { 15 | // TODO :-) 16 | // At least we check that the generated wsdl_*.cpp file compiles. 17 | 18 | S10__GetGlobalVerificationInput input; 19 | input.setHistoricalData(true); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /unittests/date_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(date_example_SRCS test_date_example.cpp) 9 | set(WSDL_FILES date_example.wsdl) 10 | add_unittest(${date_example_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/date_example/date_example.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /unittests/date_example/test_date_example.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapClientInterface.h" 12 | #include "wsdl_date_example.h" 13 | #include 14 | #include 15 | #include 16 | 17 | class DateExampleWSDL : public QObject 18 | { 19 | Q_OBJECT 20 | public: 21 | private slots: 22 | void slotCheckCompilation() 23 | { 24 | DateExample service; 25 | StringToDateJob job(&service); 26 | QDate result = job.dateObject(); 27 | QCOMPARE(result, QDate()); 28 | } 29 | }; 30 | 31 | QTEST_MAIN(DateExampleWSDL) 32 | 33 | #include "test_date_example.moc" 34 | -------------------------------------------------------------------------------- /unittests/default_attribute_value_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(default_attribute_value_wsdl_SRCS test_default_attribute_value_wsdl.cpp) 9 | set(WSDL_FILES default_attribute_value.wsdl) 10 | set(KSWSDL2CPP_OPTION -optional-element-type boost-optional) 11 | add_unittest(${default_attribute_value_wsdl_SRCS}) 12 | -------------------------------------------------------------------------------- /unittests/dv_terminalauth/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(dv_terminalauth_SRCS test_dv_terminalauth.cpp) 9 | set(WSDL_FILES WS_DV_TerminalAuth.wsdl) 10 | add_unittest(${dv_terminalauth_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/dwservice_12_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(dwservice_12_wsdl) 9 | 10 | set(KSWSDL2CPP_OPTION -namespace KDAB) 11 | 12 | set(WSDL_FILES DWService_12.wsdl) 13 | set(dwservice_12_wsdl_SRCS test_dwservice_12_wsdl.cpp) 14 | 15 | add_unittest(${dwservice_12_wsdl_SRCS}) 16 | -------------------------------------------------------------------------------- /unittests/dwservice_combined_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(dwservice_combined_wsdl) 9 | set(KSWSDL2CPP_OPTION -namespace KDAB) 10 | 11 | set(WSDL_FILES DWServiceCombined.wsdl) 12 | set(dwservice_combined_wsdl_SRCS test_dwservice_combined_wsdl.cpp) 13 | 14 | add_unittest(${dwservice_combined_wsdl_SRCS}) 15 | -------------------------------------------------------------------------------- /unittests/dwservice_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(dwservice_wsdl) 9 | set(KSWSDL2CPP_OPTION -namespace KDAB) 10 | 11 | set(WSDL_FILES DWService.wsdl) 12 | set(dwservice_wsdl_SRCS test_dwservice_wsdl.cpp) 13 | 14 | add_unittest(${dwservice_wsdl_SRCS}) 15 | -------------------------------------------------------------------------------- /unittests/element_ns_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(element_ns_wsdl_SRCS test_element_ns_wsdl.cpp) 9 | set(WSDL_FILES test.wsdl) 10 | add_unittest(${element_ns_wsdl_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/element_ns_wsdl/test_element_ns_wsdl.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef TEST_ELEMENT_NS_WSDL_H 12 | #define TEST_ELEMENT_NS_WSDL_H 13 | 14 | #include "wsdl_test.h" 15 | #include 16 | 17 | class TestCall : public QObject 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit TestCall(); 22 | 23 | private slots: 24 | void test(); 25 | 26 | private: 27 | PREFIX test_client; 28 | }; 29 | 30 | #endif // TEST_ELEMENT_NS_WSDL_H 31 | -------------------------------------------------------------------------------- /unittests/empty_element_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2018 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(empty_element_wsdl_SRCS test_empty_element_wsdl.cpp) 9 | set(WSDL_FILES empty_element.wsdl) 10 | add_unittest(${empty_element_wsdl_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/empty_element_wsdl/test_empty_element_wsdl.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapValue.h" 12 | #include "wsdl_empty_element.h" 13 | 14 | #include 15 | 16 | class EmptyElementTest : public QObject 17 | { 18 | Q_OBJECT 19 | 20 | private Q_SLOTS: 21 | 22 | void testMustContainIdleState() 23 | { 24 | TNS__State state; 25 | TNS__IdleState idleState; 26 | state.setIdleState(idleState); 27 | 28 | const KDSoapValue &value = state.serialize("State"); 29 | const QByteArray &actualXml = value.toXml(); 30 | 31 | // Serialized XML must contain "idleState" 32 | QVERIFY(actualXml.contains("idleState")); 33 | } 34 | 35 | void testMustContainSeanceRemovingState() 36 | { 37 | TNS__State state; 38 | TNS__SeanceRemovingState seanceRemovingState; 39 | state.setSeanceRemovingState(seanceRemovingState); 40 | 41 | const KDSoapValue &value = state.serialize("State"); 42 | const QByteArray &actualXml = value.toXml(); 43 | 44 | // Serialized XML must contain "seanceRemovingState" 45 | QVERIFY(actualXml.contains("seanceRemovingState")); 46 | } 47 | }; 48 | 49 | QTEST_MAIN(EmptyElementTest) 50 | 51 | #include "test_empty_element_wsdl.moc" 52 | -------------------------------------------------------------------------------- /unittests/empty_list_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2018 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(empty_list_wsdl_SRCS test_empty_list_wsdl.cpp) 9 | set(WSDL_FILES empty_list.wsdl) 10 | add_unittest(${empty_list_wsdl_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/empty_list_wsdl/test_empty_list_wsdl.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "wsdl_empty_list.h" 12 | 13 | #include 14 | 15 | class EmptyListTest : public QObject 16 | { 17 | Q_OBJECT 18 | 19 | private Q_SLOTS: 20 | 21 | void testMustReturnEmptyListWhenXmlValueIsEmpty() 22 | { 23 | NS2__Orientation list; 24 | KDSoapValue soapValue; 25 | soapValue.setValue(QVariant::fromValue(QString(""))); 26 | list.deserialize(soapValue); 27 | QVERIFY(list.entries().empty()); 28 | } 29 | 30 | void testMustReturnEmptyListWhenQVariantIsNull() 31 | { 32 | NS2__Orientation list; 33 | QVariant null; 34 | KDSoapValue soapValue; 35 | soapValue.setValue(null); 36 | list.deserialize(soapValue); 37 | QVERIFY(list.entries().empty()); 38 | } 39 | 40 | void testMustReturnEmptyListWhenXmlContainsOnlySpaces() 41 | { 42 | NS2__Orientation list; 43 | KDSoapValue soapValue; 44 | soapValue.setValue(QVariant::fromValue(QString(" \t \t"))); 45 | list.deserialize(soapValue); 46 | QVERIFY(list.entries().empty()); 47 | } 48 | }; 49 | 50 | QTEST_MAIN(EmptyListTest) 51 | 52 | #include "test_empty_list_wsdl.moc" 53 | -------------------------------------------------------------------------------- /unittests/empty_response_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(empty_response_wsdl_SRCS test_issue1.cpp) 9 | set(WSDL_FILES test.wsdl) 10 | add_unittest(${empty_response_wsdl_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/empty_response_wsdl/test_issue1.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "httpserver_p.h" 12 | #include "wsdl_test.h" 13 | #include 14 | #include 15 | 16 | class TestIssue1 : public QObject 17 | { 18 | Q_OBJECT 19 | public: 20 | explicit TestIssue1(); 21 | 22 | private slots: 23 | void test(); 24 | }; 25 | 26 | using namespace KDSoapUnitTestHelpers; 27 | 28 | TestIssue1::TestIssue1() 29 | { 30 | } 31 | 32 | static QByteArray updateObjsResponse() 33 | { 34 | return QByteArray(xmlEnvBegin11()) 35 | + ">" 36 | "" 37 | "" 38 | "" 39 | + xmlEnvEnd(); 40 | } 41 | 42 | void TestIssue1::test() 43 | { 44 | HttpServerThread server(updateObjsResponse(), HttpServerThread::Public); 45 | TestapiService service; 46 | service.setEndPoint(server.endPoint()); 47 | 48 | service.createDirectory("t", 42, "user", "dir"); 49 | 50 | const QByteArray expectedData = QByteArray(xmlEnvBegin11()) 51 | + ">" 52 | "" 53 | "t" 54 | "42" 55 | "user" 56 | "dir" 57 | ""; 58 | 59 | QVERIFY(xmlBufferCompare(server.receivedData(), expectedData)); 60 | } 61 | 62 | QTEST_MAIN(TestIssue1) 63 | 64 | #include "test_issue1.moc" 65 | -------------------------------------------------------------------------------- /unittests/encapsecurity/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(encapsecurity_SRCS test_encapsecurity.cpp) 9 | set(WSDL_FILES authstateless.wsdl) 10 | set(KSWSDL2CPP_OPTION "-server") 11 | set(EXTRA_LIBS kdsoap-server) 12 | add_unittest(${encapsecurity_SRCS}) 13 | -------------------------------------------------------------------------------- /unittests/encapsecurity/authstateless.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /unittests/encapsecurity/test_encapsecurity.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapClientInterface.h" 12 | #include "KDSoapMessage.h" 13 | #include "KDSoapPendingCallWatcher.h" 14 | #include "KDSoapValue.h" 15 | #include "httpserver_p.h" 16 | #include "wsdl_authstateless.h" 17 | #include 18 | #include 19 | #include 20 | 21 | using namespace KDSoapUnitTestHelpers; 22 | 23 | class EncapSecurityTest : public QObject 24 | { 25 | Q_OBJECT 26 | 27 | private Q_SLOTS: 28 | void initTestCase() 29 | { 30 | } 31 | 32 | void minimalTest() 33 | { 34 | EncapAuthenticationStatelessPortImplService service; 35 | __AuthnRequestType request; 36 | __ContextResponseType response; 37 | 38 | Q_UNUSED(service); 39 | Q_UNUSED(request); 40 | Q_UNUSED(response); 41 | } 42 | }; 43 | 44 | QTEST_MAIN(EncapSecurityTest) 45 | 46 | #include "test_encapsecurity.moc" 47 | -------------------------------------------------------------------------------- /unittests/encapsecurity/xsdfiles/file2.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /unittests/encapsecurity/xsdfiles/schema.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /unittests/enum_escape/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(enum_escape_SRCS test_enum.cpp) 9 | set(WSDL_FILES test_enum.wsdl) 10 | add_unittest(${enum_escape_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/enum_escape/test_enum.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "httpserver_p.h" 12 | #include "wsdl_test_enum.h" 13 | #include 14 | 15 | class TestEnum : public QObject 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit TestEnum(); 20 | 21 | private slots: 22 | void test(); 23 | }; 24 | 25 | using namespace KDSoapUnitTestHelpers; 26 | 27 | TestEnum::TestEnum() 28 | { 29 | } 30 | 31 | void TestEnum::test() 32 | { 33 | // bunch of tests to prove numbers are well handled 34 | TNS__AudienceRating ar; 35 | ar.setType(TNS__AudienceRating::_12); 36 | ar.setType(TNS__AudienceRating::_6); 37 | ar.setType(TNS__AudienceRating::_18); 38 | ar.setType(TNS__AudienceRating::_16); 39 | ar.setType(TNS__AudienceRating::Http___f_q_d_n_ext_enum2); 40 | ar.setType(TNS__AudienceRating::_6Bis); 41 | 42 | KDSoapValue soapValue = ar.serialize(QString()); 43 | ar.deserialize(soapValue); 44 | 45 | QCOMPARE(ar.type(), TNS__AudienceRating::_6Bis); 46 | } 47 | 48 | QTEST_MAIN(TestEnum) 49 | 50 | #include "test_enum.moc" 51 | -------------------------------------------------------------------------------- /unittests/enum_with_length_restriction/AtelierBovinIPG.XSD: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Lait 11 | 12 | 13 | 14 | 15 | Allaitant 16 | 17 | 18 | 19 | 20 | Veaux de boucherie 21 | 22 | 23 | 24 | 25 | Engraissement autre 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /unittests/enum_with_length_restriction/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(enum_with_length_restriction_SRCS test_enum_length_restriction.cpp) 9 | set(WSDL_FILES test_enum.wsdl) 10 | add_unittest(${enum_with_length_restriction_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/enum_with_length_restriction/test_enum.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "httpserver_p.h" 12 | #include "wsdl_test_enum.h" 13 | #include 14 | 15 | class TestEnum : public QObject 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit TestEnum(); 20 | 21 | private slots: 22 | void test(); 23 | }; 24 | 25 | using namespace KDSoapUnitTestHelpers; 26 | 27 | TestEnum::TestEnum() 28 | { 29 | } 30 | 31 | void TestEnum::test() 32 | { 33 | // bunch of tests to prove numbers are well handled 34 | TNS__AudienceRating ar; 35 | ar.setType(TNS__AudienceRating::_12); 36 | ar.setType(TNS__AudienceRating::_6); 37 | ar.setType(TNS__AudienceRating::_18); 38 | ar.setType(TNS__AudienceRating::_16); 39 | ar.setType(TNS__AudienceRating::Http___f_q_d_n_ext_enum2); 40 | ar.setType(TNS__AudienceRating::_6Bis); 41 | 42 | KDSoapValue soapValue = ar.serialize(QString()); 43 | ar.deserialize(soapValue); 44 | 45 | QCOMPARE(ar.type(), TNS__AudienceRating::_6Bis); 46 | } 47 | 48 | QTEST_MAIN(TestEnum) 49 | 50 | #include "test_enum.moc" 51 | -------------------------------------------------------------------------------- /unittests/enum_with_length_restriction/test_enum_length_restriction.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "httpserver_p.h" 12 | #include "wsdl_test_enum.h" 13 | #include 14 | 15 | class TestEnum : public QObject 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit TestEnum(); 20 | 21 | private slots: 22 | void test(); 23 | }; 24 | 25 | using namespace KDSoapUnitTestHelpers; 26 | 27 | TestEnum::TestEnum() 28 | { 29 | } 30 | 31 | void TestEnum::test() 32 | { 33 | } 34 | 35 | QTEST_MAIN(TestEnum) 36 | 37 | #include "test_enum_length_restriction.moc" 38 | -------------------------------------------------------------------------------- /unittests/enzo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2018 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(enzo_SRCS test_enzo.cpp) 9 | set(WSDL_FILES EnzoService.wsdl) 10 | add_unittest(${enzo_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/enzo/xsd3.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /unittests/enzo/xsd4.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /unittests/fault_namespace/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2018 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(fault_namespace_SRCS test_fault_namespace.cpp) 9 | add_unittest(${fault_namespace_SRCS}) 10 | -------------------------------------------------------------------------------- /unittests/fault_namespace/test_fault_namespace.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapMessageWriter_p.h" 12 | #include 13 | 14 | class FaultNamespace : public QObject 15 | { 16 | Q_OBJECT 17 | private Q_SLOTS: 18 | 19 | void testFaultMessageNamespace() 20 | { 21 | KDSoapMessageWriter writer; 22 | KDSoapMessage faultMessage; 23 | faultMessage.setFault(true); 24 | faultMessage.addArgument("faultCode", "fooCode"); 25 | 26 | const QByteArray faultString("Fault"); 27 | const QByteArray startTag(""); 28 | const QByteArray endTag(""); 29 | 30 | const QByteArray result = writer.messageToXml(faultMessage, faultString, KDSoapHeaders(), QMap()); 31 | 32 | QVERIFY(result.contains(startTag)); 33 | QVERIFY(result.contains(endTag)); 34 | } 35 | }; 36 | 37 | QTEST_MAIN(FaultNamespace) 38 | 39 | #include "test_fault_namespace.moc" 40 | -------------------------------------------------------------------------------- /unittests/groupwise_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(groupwise_wsdl) 9 | 10 | set(WSDL_FILES groupwise.wsdl) 11 | set(groupwise_wsdl_SRCS test_groupwise_wsdl.cpp wsdl_groupwise.cpp) 12 | 13 | add_unittest(${groupwise_wsdl_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/ihc_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(ihc_wsdl_SRCS test_ihc.cpp) 9 | set(KSWSDL2CPP_OPTION "-server") 10 | set(EXTRA_LIBS kdsoap-server) 11 | set(WSDL_FILES resourceinteraction.wsdl) 12 | add_unittest(${ihc_wsdl_SRCS}) 13 | -------------------------------------------------------------------------------- /unittests/import_definition/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(import_definition_SRCS test_import_definition.cpp) 9 | set(WSDL_FILES import_definition.wsdl import_definition_wsdl.wsdl) 10 | add_unittest(${import_definition_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/import_definition/import_definition.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /unittests/import_definition/import_definition_schema.xsd: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /unittests/import_definition/import_definition_wsdl.wsdl: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /unittests/kddatetime/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(kddatetime_SRCS test_kddatetime.cpp) 9 | add_unittest(${kddatetime_SRCS}) 10 | -------------------------------------------------------------------------------- /unittests/kddatetime/test_kddatetime.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDDateTime.h" 12 | #include "KDSoapValue.h" 13 | #include 14 | 15 | class KDDateTimeTest : public QObject 16 | { 17 | Q_OBJECT 18 | private Q_SLOTS: 19 | 20 | void testQVariantArgConversion() 21 | { 22 | KDDateTime inputDateTime(QDateTime::currentDateTimeUtc()); 23 | inputDateTime.setTimeZone("Z"); 24 | 25 | // Add to the value list, which implicitly constructs a QVariant 26 | // from the KDDateTime... 27 | KDSoapValueList list; 28 | list.addArgument("Timestamp", inputDateTime); 29 | 30 | /// Retrieve the KDDateTime from QVariant 31 | KDDateTime outputDateTime = list.child("Timestamp").value().value(); 32 | 33 | QCOMPARE(inputDateTime, outputDateTime); 34 | 35 | QCOMPARE(inputDateTime.timeZone(), outputDateTime.timeZone()); 36 | QCOMPARE(inputDateTime.toDateString(), outputDateTime.toDateString()); 37 | } 38 | }; 39 | 40 | QTEST_MAIN(KDDateTimeTest) 41 | 42 | #include "test_kddatetime.moc" 43 | -------------------------------------------------------------------------------- /unittests/keep_unused_types/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(keep_unused_types) 9 | 10 | #this is the option given to KDWSDL2CPP when generating cpp from wsdl 11 | set(KSWSDL2CPP_OPTION "-keep-unused-types") 12 | 13 | set(WSDL_FILES keep_unused_types.wsdl) 14 | set(keep_unused_types_SRCS keep_unused_types.cpp) 15 | 16 | add_unittest(${keep_unused_types_SRCS}) 17 | -------------------------------------------------------------------------------- /unittests/keep_unused_types/keep_unused_types.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapClientInterface.h" 12 | #include "wsdl_keep_unused_types.h" 13 | 14 | #include 15 | #include 16 | 17 | class KeepUnusedTypesArgumentKDWSDL2CPP : public QObject 18 | { 19 | Q_OBJECT 20 | 21 | private slots: 22 | 23 | void testKeepUnusedTypesArgument() 24 | { 25 | // Unused type within WSDL, if this compiles, then -keep-unused-types works since 26 | // otherwise cleanupUnusedTypes function would have removed it from the cpp generation 27 | TNS__UnusedElement element; 28 | Q_UNUSED(element); 29 | } 30 | }; 31 | 32 | QTEST_MAIN(KeepUnusedTypesArgumentKDWSDL2CPP) 33 | 34 | #include "keep_unused_types.moc" 35 | -------------------------------------------------------------------------------- /unittests/literal_true_false/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(literal_true_false_SRCS test_literal.cpp) 9 | set(WSDL_FILES literal.wsdl) 10 | add_unittest(${literal_true_false_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/literal_true_false/test_literal.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "KDSoapClientInterface.h" 12 | #include "KDSoapMessage.h" 13 | #include "KDSoapPendingCallWatcher.h" 14 | #include "KDSoapValue.h" 15 | #include "httpserver_p.h" 16 | #include "wsdl_literal.h" 17 | #include 18 | #include 19 | #include 20 | 21 | using namespace KDSoapUnitTestHelpers; 22 | 23 | class LiteralTest : public QObject 24 | { 25 | Q_OBJECT 26 | 27 | private Q_SLOTS: 28 | void initTestCase() 29 | { 30 | } 31 | 32 | void testRequest() 33 | { 34 | // server down, just a compile check 35 | __BooleanResponseType resp; 36 | } 37 | }; 38 | 39 | QTEST_MAIN(LiteralTest) 40 | 41 | #include "test_literal.moc" 42 | -------------------------------------------------------------------------------- /unittests/logbook_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(logbook_wsdl) 9 | 10 | set(WSDL_FILES logbookifv3.wsdl) 11 | set(logbook_wsdl_SRCS test_logbook_wsdl.cpp wsdl_logbookifv3.cpp) 12 | 13 | add_unittest(${logbook_wsdl_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/messagereader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(messagereader) 9 | 10 | set(messagereader_SRCS test_messagereader.cpp) 11 | add_unittest(${messagereader_SRCS}) 12 | -------------------------------------------------------------------------------- /unittests/messagereader/request.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 2011 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /unittests/msexchange_noservice_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(msexchange_noservice_wsdl_SRCS test_msexchange_noservice_wsdl.cpp) 9 | set(WSDL_FILES Services_noservice.wsdl) 10 | add_unittest(${msexchange_noservice_wsdl_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/msexchange_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(msexchange_wsdl) 9 | 10 | set(WSDL_FILES Services.wsdl) 11 | set(msexchange_wsdl_SRCS test_msexchange_wsdl.cpp) 12 | 13 | add_unittest(${msexchange_wsdl_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/multiple_input_param/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(multiple_input_param_SRCS test_multiple_input_param.cpp) 9 | set(WSDL_FILES helloworldextended.wsdl) 10 | add_unittest(${multiple_input_param_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/optionaltype_boost_optional/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(optionaltype_boost_optional_SRCS test_boostapi.cpp) 9 | set(KSWSDL2CPP_OPTION -optional-element-type boost-optional) 10 | set(WSDL_FILES test.wsdl) 11 | add_unittest(${optionaltype_boost_optional_SRCS}) 12 | -------------------------------------------------------------------------------- /unittests/optionaltype_boost_optional/test_boostapi.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef TEST_BOOSTAPI_H 12 | #define TEST_BOOSTAPI_H 13 | 14 | #include "wsdl_test.h" 15 | #include 16 | 17 | class TestBoostApi : public QObject 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit TestBoostApi(); 22 | 23 | private slots: 24 | void test(); 25 | void testPolymorphic(); 26 | void testSerialize(); 27 | 28 | private: 29 | }; 30 | 31 | #endif // TEST_BOOSTAPI_H 32 | -------------------------------------------------------------------------------- /unittests/optionaltype_pointer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(optionaltype_pointer_SRCS test_optionaltype_pointer.cpp) 9 | set(KSWSDL2CPP_OPTION -optional-element-type raw-pointer) 10 | set(WSDL_FILES test.wsdl) 11 | add_unittest(${optionaltype_pointer_SRCS}) 12 | -------------------------------------------------------------------------------- /unittests/optionaltype_pointer/test_optionaltype_pointer.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef TEST_OPTIONALTYPE_POINTER_H 12 | #define TEST_OPTIONALTYPE_POINTER_H 13 | 14 | #include "wsdl_test.h" 15 | #include 16 | 17 | class TestPointerApi : public QObject 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit TestPointerApi(); 22 | 23 | private slots: 24 | void test(); 25 | void testOptionalArray(); 26 | void testPolymorphic(); 27 | void testSerialize(); 28 | 29 | private: 30 | }; 31 | 32 | #endif // TEST_OPTIONALTYPE_POINTER_H 33 | -------------------------------------------------------------------------------- /unittests/optionaltype_regular/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(optionaltype_regular_SRCS test_optionaltype_regular.cpp) 9 | set(WSDL_FILES test.wsdl) 10 | set(KSWSDL2CPP_OPTION -namespace KDAB) 11 | add_unittest(${optionaltype_regular_SRCS}) 12 | -------------------------------------------------------------------------------- /unittests/optionaltype_regular/test_optionaltype_regular.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #ifndef TEST_OPTIONALTYPE_REGULAR_H 12 | #define TEST_OPTIONALTYPE_REGULAR_H 13 | 14 | #include "wsdl_test.h" 15 | #include 16 | 17 | class TestRegularApi : public QObject 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit TestRegularApi(); 22 | 23 | private slots: 24 | void test(); 25 | void testPolymorphic(); 26 | void testSerialize(); 27 | void testRecursiveType(); 28 | 29 | private: 30 | }; 31 | 32 | #endif // TEST_OPTIONALTYPE_REGULAR_H 33 | -------------------------------------------------------------------------------- /unittests/pki.pca.dfn.de/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(pki.pca.dfn.de_SRCS test_pki.cpp) 9 | set(WSDL_FILES pki.pca.dfn.de.wsdl) 10 | add_unittest(${pki.pca.dfn.de_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/pki.pca.dfn.de/test_pki.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | int main() 12 | { 13 | // TODO :-) 14 | // At least we check that the generated wsdl_*.cpp file compiles. 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /unittests/prefix_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(KSWSDL2CPP_OPTION "-server") 9 | set(EXTRA_LIBS kdsoap-server) 10 | set(WSDL_FILES kdtest.wsdl) 11 | add_unittest(test_prefix.cpp) 12 | -------------------------------------------------------------------------------- /unittests/runTest.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cd %2 4 | set OLD_PATH=%PATH% 5 | set PATH=%1;%PATH% 6 | 7 | if (%3)==() ( 8 | set TEST_EXE=%2.exe 9 | ) else ( 10 | set TEST_EXE=%3\%2.exe 11 | ) 12 | 13 | echo Running %2 %CD%\%TEST_EXE% 14 | %TEST_EXE% 15 | 16 | set RETURNCODE=%ERRORLEVEL% 17 | echo Test returned with %RETURNCODE% 18 | 19 | set PATH=%OLD_PATH% 20 | cd .. 21 | 22 | exit /B %RETURNCODE% 23 | -------------------------------------------------------------------------------- /unittests/salesforce_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(salesforce_wsdl) 9 | 10 | set(WSDL_FILES salesforce-partner.wsdl) 11 | set(salesforce_wsdl_SRCS test_salesforce_wsdl.cpp) 12 | 13 | add_unittest(${salesforce_wsdl_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/serverlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(servertest) 9 | 10 | set(servertest_SRCS test_serverlib.cpp) 11 | set(EXTRA_LIBS kdsoap-server) 12 | add_unittest(${servertest_SRCS}) 13 | -------------------------------------------------------------------------------- /unittests/soap12/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(soap12_SRCS test_soap12.cpp) 9 | set(WSDL_FILES soap12.wsdl) 10 | set(KSWSDL2CPP_OPTION "-server") 11 | set(EXTRA_LIBS kdsoap-server) 12 | add_unittest(${soap12_SRCS}) 13 | -------------------------------------------------------------------------------- /unittests/soap_over_udp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(soap_over_udp) 9 | 10 | set(KSWSDL2CPP_OPTION -use-local-files-only) 11 | set(WSDL_FILES wsdd-discovery-200901.wsdl) 12 | set(soap_over_udp_SRCS test_soap_over_udp.cpp wsdl_wsdd-discovery-200901.cpp) 13 | 14 | add_unittest(${soap_over_udp_SRCS}) 15 | -------------------------------------------------------------------------------- /unittests/specialchars_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(specialchars_wsdl_SRCS test_specialchars_wsdl.cpp) 9 | set(WSDL_FILES test.wsdl) 10 | add_unittest(${specialchars_wsdl_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/specialchars_wsdl/test_specialchars_wsdl.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | #include "wsdl_test.h" 12 | #include 13 | #include 14 | 15 | class TestConversion : public QObject 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit TestConversion(); 20 | 21 | private slots: 22 | void test(); 23 | }; 24 | 25 | // using namespace KDSoapUnitTestHelpers; 26 | 27 | TestConversion::TestConversion() 28 | { 29 | } 30 | 31 | void TestConversion::test() 32 | { 33 | KDAB__Employee_Name name; 34 | Q_UNUSED(name); 35 | } 36 | 37 | QTEST_MAIN(TestConversion) 38 | 39 | #include "test_specialchars_wsdl.moc" 40 | -------------------------------------------------------------------------------- /unittests/sugar_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(sugar_wsdl) 9 | 10 | set(WSDL_FILES sugarcrm.wsdl) 11 | set(sugar_wsdl_SRCS test_sugar_wsdl.cpp) 12 | 13 | add_unittest(${sugar_wsdl_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/tech3356_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(tech3356_wsdl_SRCS test_tech3356.cpp) 9 | set(KSWSDL2CPP_OPTION "-server") 10 | set(EXTRA_LIBS kdsoap-server) 11 | set(WSDL_FILES transformMedia-V1_0_7.wsdl) 12 | add_unittest(${tech3356_wsdl_SRCS}) 13 | -------------------------------------------------------------------------------- /unittests/test_calc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(calc_SRCS test_calc.cpp) 9 | set(WSDL_FILES calc.wsdl) 10 | add_unittest(${calc_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/uitapi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(uitapi_SRCS test_uitapi.cpp) 9 | set(WSDL_FILES uitapi.wsdl) 10 | add_unittest(${uitapi_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/unqualified_formdefault/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(unqualified_formdefault_SRCS test_unqualified.cpp) 9 | set(WSDL_FILES unqualified.wsdl) 10 | add_unittest(${unqualified_formdefault_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/vidyo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(vidyo_SRCS test_vidyo.cpp) 9 | set(WSDL_FILES VidyoPortalGuestService.wsdl) 10 | add_unittest(${vidyo_SRCS}) 11 | -------------------------------------------------------------------------------- /unittests/vidyo/test_vidyo.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** This file is part of the KD Soap project. 4 | ** 5 | ** SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company 6 | ** 7 | ** SPDX-License-Identifier: MIT 8 | ** 9 | ****************************************************************************/ 10 | 11 | int main() 12 | { 13 | // TODO :-) 14 | // At least we check that the generated wsdl_*.cpp file compiles. 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /unittests/webcalls/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(webcalls) 9 | 10 | set(webcalls_SRCS test_webcalls.cpp) 11 | add_unittest(${webcalls_SRCS}) 12 | -------------------------------------------------------------------------------- /unittests/webcalls_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(webcalls_wsdl) 9 | 10 | set(WSDL_FILES BFGlobalService.wsdl BLZService.wsdl OrteLookup.wsdl) 11 | set(webcalls_wsdl_SRCS test_webcalls_wsdl.cpp) 12 | 13 | add_unittest(${webcalls_wsdl_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/ws_addressing_support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(ws_addressing_support) 9 | 10 | set(WSDL_FILES wsaddressing.wsdl) 11 | set(ws_addressing_support_SRCS test_wsaddressing.cpp) 12 | 13 | add_unittest(${ws_addressing_support_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/ws_discovery_wsdl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(ws_discovery_wsdl) 9 | 10 | set(KSWSDL2CPP_OPTION -use-local-files-only) 11 | set(WSDL_FILES ws_discovery200504.wsdl) 12 | set(ws_discovery_wsdl_SRCS test_ws_discovery_wsdl.cpp wsdl_ws_discovery200504.cpp) 13 | 14 | add_unittest(${ws_discovery_wsdl_SRCS}) 15 | -------------------------------------------------------------------------------- /unittests/ws_usernametoken_support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(ws_usernametoken_support) 9 | 10 | set(WSDL_FILES wsusernametoken.wsdl) 11 | set(ws_usernametoken_support_SRCS test_wsusernametoken.cpp) 12 | 13 | add_unittest(${ws_usernametoken_support_SRCS}) 14 | -------------------------------------------------------------------------------- /unittests/wsdl_document/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(wsdl_document) 9 | set(KSWSDL2CPP_OPTION -server) 10 | 11 | set(WSDL_FILES thomas-bayer.wsdl mywsdl_document.wsdl) 12 | set(wsdl_document_SRCS test_wsdl_document.cpp) 13 | set(EXTRA_LIBS kdsoap-server) 14 | 15 | add_unittest(${wsdl_document_SRCS}) 16 | -------------------------------------------------------------------------------- /unittests/wsdl_rpc-server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | set(WSDL_FILES rpcexample.wsdl sayhello.wsdl) 9 | set(wsdl_rpc_SRCS test_wsdl_rpc_server.cpp) 10 | 11 | set(EXTRA_LIBS kdsoap-server) 12 | set(KSWSDL2CPP_OPTION "-server") 13 | 14 | add_unittest(${wsdl_rpc_SRCS}) 15 | -------------------------------------------------------------------------------- /unittests/wsdl_rpc-server/sayhello.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 35 | 36 | 37 | 41 | 42 | 43 | 44 | 45 | 46 | WSDL File for HelloService 47 | 48 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /unittests/wsdl_rpc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file is part of the KD Soap project. 2 | # 3 | # SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company 4 | # 5 | # SPDX-License-Identifier: MIT 6 | # 7 | 8 | project(wsdl_rpc) 9 | 10 | set(WSDL_FILES mywsdl_rpc.wsdl) 11 | set(wsdl_rpc_SRCS test_wsdl_rpc.cpp) 12 | 13 | add_unittest(${wsdl_rpc_SRCS}) 14 | --------------------------------------------------------------------------------