{"id":45212032,"url":"https://github.com/mhekkel/libzeep","last_synced_at":"2026-02-20T16:35:11.487Z","repository":{"id":56331630,"uuid":"44161414","full_name":"mhekkel/libzeep","owner":"mhekkel","description":"C++ library for reading and writing XML and creating web, REST and SOAP servers","archived":false,"fork":false,"pushed_at":"2026-02-06T08:30:43.000Z","size":9261,"stargazers_count":11,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"trunk","last_synced_at":"2026-02-06T16:35:07.467Z","etag":null,"topics":["json","rest","soap","web-application","xml","xml-library"],"latest_commit_sha":null,"homepage":"http://mhekkel.github.io/libzeep/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhekkel.png","metadata":{"files":{"readme":"README.md","changelog":"changelog","contributing":null,"funding":null,"license":"LICENSE_1_0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-10-13T08:05:36.000Z","updated_at":"2026-02-06T08:30:38.000Z","dependencies_parsed_at":"2023-09-27T14:39:34.959Z","dependency_job_id":"daa1a8b2-0bc3-4c88-a583-677d1f34d570","html_url":"https://github.com/mhekkel/libzeep","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/mhekkel/libzeep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhekkel%2Flibzeep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhekkel%2Flibzeep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhekkel%2Flibzeep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhekkel%2Flibzeep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhekkel","download_url":"https://codeload.github.com/mhekkel/libzeep/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhekkel%2Flibzeep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29657045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T16:33:43.953Z","status":"ssl_error","status_checked_at":"2026-02-20T16:33:43.598Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","rest","soap","web-application","xml","xml-library"],"created_at":"2026-02-20T16:35:10.959Z","updated_at":"2026-02-20T16:35:11.481Z","avatar_url":"https://github.com/mhekkel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"libzeep\n=======\n\n[![DOI](https://zenodo.org/badge/44161414.svg)](https://zenodo.org/badge/latestdoi/44161414)\n\n[![github CI](https://github.com/mhekkel/libzeep/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/mhekkel/libzeep/actions)\n[![github CI](https://github.com/mhekkel/libzeep/actions/workflows/build-documentation.yml/badge.svg)](https://github.com/mhekkel/libzeep/actions)\n\nTL;DR\n-----\n\nLibzeep is a web application framework written in C++. To see a starter project\nvisit the [libzeep-webapp-starter](https://github.com/mhekkel/libzeep-webapp-starter.git)\npage.\n\nAbout\n-----\n\nLibzeep was originally developed to make it easy to create SOAP servers. And since\nworking with SOAP means working with XML and no decent C++ XML library\nexisted on my radar at that time I created a full XML library as well.\n\nUnfortunately (well, considering the work I did), REST proved to be more\npopular than SOAP, and so I added a better JSON implementation to version\n4 of libzeep as well as a way to create REST servers more easily.\n\nBut then I had to use Spring for some time and was impressed by the simplicity\nof building interactive web applications and thought I should bring that\nsimplicity to the C++ world. After all, my applications need raw speed and\nno, Java is not fast.\n\nVersion 6.0.0 of libzeep was a completely refactored set of libraries. One\nfor manipulating XML, one for handling JSON and one for building web applications.\n\nBut then I decided it would be better to have the xml code in a separate library\nand so version 7 now comes without an XML library but uses zeem instead.\n\nWhat remains is a web application library. This one makes it very easy to build\na HTTP server that serves HTML but also speaks REST and SOAP. The current\nimplementation consists of a HTTP server class to which you can add controllers.\nEach controller has a path prefix and handles requests for some entries in this\nuri path. The base class zeep::http::controller can be used as a base class for\na REST controller.\n\nThe HTML controller can be used as a base class so you can add methods that\nwill be called for certain URI paths. In combination with the available tag\nprocessors you can then create and return dynamic XHTML pages.\n\nFull documentation can be found at:\n\n[mhekkel.github.io/libzeep/](https://mhekkel.github.io/libzeep/)\n\nBuilding libzeep\n----------------\n\nTo build libzeep you have to have [cmake](https://cmake.org/) installed.\n\nAnd, unless you are using macOS, it is recommended to install\n[mrc](https://github.com/mhekkel/mrc) in order to have resources support in libzeep.\n\nThe commands to build libzeep from the command line are e.g.:\n\n```bash\n    git clone https://github.com/mhekkel/libzeep\n    cd libzeep\n    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release\n    cmake --build build\n    ctest --test-dir build\n    cmake --install build\n```\n\nCreating a simple web application\n---------------------------------\n\nCreate a template in xhtml first, store this as `hello.xhtml` in a directory called `docroot`:\n\n```xml\n\u003c!DOCTYPE html SYSTEM \"about:legacy-compat\"\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\"\n  xmlns:z=\"http://www.hekkelman.com/libzeep/m2\"\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eHello\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cp\u003eHello, \u003cspan z:text=\"${name ?: 'world'}\"/\u003e!\u003c/p\u003e\n\u003c/html\u003e\n```\n\nThen create a source file called `http-server.cpp` with the following content:\n\n```cpp\n#define WEBAPP_USES_RESOURCES 0\n\n#include \u003czeep/http/server.hpp\u003e\n#include \u003czeep/http/html-controller.hpp\u003e\n#include \u003czeep/http/template-processor.hpp\u003e\n\nclass hello_controller : public zeep::http::html_controller\n{\n  public:\n    hello_controller()\n    {\n        map_get(\"\", \u0026hello_controller::handle_index, \"name\");\n        map_get(\"index.html\", \u0026hello_controller::handle_index, \"name\");\n        map_get(\"hello/{name}\", \u0026hello_controller::handle_index, \"name\");\n    }\n\n    zeep::http::reply handle_index(const zeep::http::scope\u0026 scope,\n        std::optional\u003cstd::string\u003e user)\n    {\n        zeep::http::scope sub(scope);\n        sub.put(\"name\", user.value_or(\"world\"));\n\n        return get_template_processor().create_reply_from_template(\"hello.xhtml\", sub);\n    }\n};\n\nint main()\n{\n    zeep::http::server srv(std::filesystem::canonical(\"docroot\"));\n\n    srv.add_controller(new hello_controller());\n\n    srv.bind(\"::\", 8080);\n    srv.run(2);\n\n    return 0;\n}\n```\n\nCreate a `CMakeLists.txt` file:\n\n```cmake\ncmake_minimum_required(VERSION 3.16)\n\nproject(http-server LANGUAGES CXX)\n\nset(CXX_EXTENSIONS OFF)\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\n\nfind_package(zeep REQUIRED)\n\nadd_executable(http-server http-server.cpp)\ntarget_link_libraries(http-server zeep::zeep)\n```\n\nAnd configure and build the app:\n\n```bash\ncmake .\ncmake --build .\n```\n\nAnd then run it:\n\n```bash\n./http-server\n```\n\nNow you can access the result using the following URL's:\n\n* \u003chttp://localhost:8080/\u003e\n* \u003chttp://localhost:8080/index.html?name=maarten\u003e\n* \u003chttp://localhost:8080/hello/maarten\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhekkel%2Flibzeep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhekkel%2Flibzeep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhekkel%2Flibzeep/lists"}