{"id":13463481,"url":"https://github.com/raileurope/lolsoap","last_synced_at":"2025-03-25T06:32:15.304Z","repository":{"id":422559,"uuid":"3103929","full_name":"raileurope/lolsoap","owner":"raileurope","description":"A library for dealing with SOAP requests and responses. We tear our hair out so you don't have to.","archived":false,"fork":false,"pushed_at":"2024-01-23T14:25:22.000Z","size":220,"stargazers_count":88,"open_issues_count":3,"forks_count":15,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-05-20T20:47:16.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raileurope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2012-01-04T17:44:35.000Z","updated_at":"2024-04-24T13:44:44.000Z","dependencies_parsed_at":"2024-01-28T03:43:51.194Z","dependency_job_id":"39d8416e-28a3-4512-ae89-e61eb51462f5","html_url":"https://github.com/raileurope/lolsoap","commit_stats":{"total_commits":131,"total_committers":8,"mean_commits":16.375,"dds":"0.30534351145038163","last_synced_commit":"6dcfe35206829fb3f35d19d7b158f4f9cb14281d"},"previous_names":["raileurope/lolsoap","loco2/lolsoap"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raileurope%2Flolsoap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raileurope%2Flolsoap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raileurope%2Flolsoap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raileurope%2Flolsoap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raileurope","download_url":"https://codeload.github.com/raileurope/lolsoap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222045615,"owners_count":16921984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T13:00:54.198Z","updated_at":"2024-10-29T12:31:28.084Z","avatar_url":"https://github.com/raileurope.png","language":"Ruby","funding_links":[],"categories":["Web Apps, Services \u0026 Interaction"],"sub_categories":["SOAP Clients"],"readme":"# LolSoap #\n\nA library for dealing with SOAP requests and responses. We tear our hair\nout so you don't have to.\n\n* Code: https://github.com/loco2/lolsoap\n* Gem: http://rubygems.org/gems/lolsoap\n* Docs: http://rubydoc.info/gems/lolsoap/frames\n\n[![Build Status](https://secure.travis-ci.org/loco2/lolsoap.png)](http://travis-ci.org/loco2/lolsoap)\n\n## Aims ##\n\n* A collection of classes to make dealing with SOAP requests and\n  responses, and WSDL documents, easier.\n* The classes are intended to be loosely coupled and non-prescriptive\n  about how they are used.\n* LolSoap does not know anything about what HTTP library you want to\n  use, and does not care whether you're doing the IO in a synchronous or\n  asynchronous fashion. This does mean you have to provide a little bit\n  of glue code, but the benefit is flexibility.\n* No monkey-patching.\n* Runs without warnings.\n\n## Synopsis ##\n\n``` ruby\n# You will need your own HTTP client\nhttp = MyHttpClient.new\n\n# LolSoap::Client is just a thin wrapper object that handles creating\n# other objects for you, with a given WSDL file\nclient = LolSoap::Client.new(File.read('lolapi.wsdl'))\n\n# Create a request object\nrequest = client.request('getLols')\n\n# Populate the request with some data. Namespacing is taken care of\n# using the type data from the WSDL. The WSDL also tells us whether\n# a given name (e.g. lolFactor below) should be treated as an\n# attribute or a sub-element.\nrequest.body do |b|\n  b.lolFactor '11'\n  b.lolDuration 'lolever'\n  ...\nend\n\n# Request header can be built in a similar way:\nrequest.header do |h|\n  h.username 'zomg'\n  ...\nend\n\n# See the full request XML\nputs request.content\n\n# Send that request!\nraw_response = http.post(request.url, request.headers, request.content)\n\n# Create a response object\nresponse = client.response(request, raw_response)\n\n# Get access to the XML structure (a Nokogiri::XML::Document)\np response.doc\n\n# Get access to the first node inside the Body\np response.body\n\n# Turn the body into a hash. The WSDL schema is used to work out which\n# elements are supposed to be collections and which are just singular.\np response.body_hash\n```\n\n## Bugs/Features ##\n\n* Assumes that you are able to supply a WSDL document for the service.\n* Some of the finer details of namespace handling may be glossed over.\n  This is just pragmatism; patches to improve namespace handling are\n  welcome.\n\n## Overview ##\n\nThese are some of the key classes. If you want, you can require them\ndirectly (e.g. `require 'lolsoap/request'` rather than having to\n`require 'lolsoap'`).\n\nThe main ones:\n\n* `LolSoap::Request` - A HTTP request to be sent\n* `LolSoap::Envelope` - The SOAP envelope in the body of a request\n* `LolSoap::Response` - The API's response\n* `LolSoap::WSDL` - A WSDL document\n\nThe others:\n\n* `LolSoap::WSDLParser` - Lower level representation of the WSDL\n  document\n* `LolSoap::Builder` - XML builder object that knows about types, and\n  therefore how elements should be namespaced.\n* `LolSoap::Fault` - A SOAP 'fault' (error)\n* `LolSoap::HashBuilder` - Builds hashes from the API response, using\n  the WSDL type data to determine which elements are collection\n  elements.\n\n## WSSE ##\n\nTo append a WSSE node to the header using the `akami` gem:\n\n```ruby\nwsse = Akami.wsse\nwsse.credentials(username, password)\nrequest.header.__node__ \u003c\u003c wsse.to_xml\n```\n\n## Authors ##\n\n* [Jon Leighton](http://jonathanleighton.com/)\n\nDevelopment sponsored by [Loco2](http://loco2.com/).\n\n## Changelog ##\n\n### 0.11 ###\n\n* Use `frozen_string_literal` to improve speed/memory usage\n\n### 0.10 ###\n\n* Added support for using WSDL with abstract types in operation definitions\n\n### 0.9 ###\n\n* Support unqualified form for elements in a schema\n\n### 0.8 ###\n\n* Use namespaces when looking up definitions\n* Added support for referenced attribute groups\n\n### 0.7 ###\n\n* Added support for element references in type definitions\n* Added support for operations with multipart header/body\n* Added support for multipart messages in WSDL\n\n### 0.6 ###\n\n* Support SOAP Header types\n\n### 0.5 ###\n\n* Generate our own namespace prefixes rather than using ones from the\n  WSDL document. This fixes issues with WSDLs that use the same prefix\n  to denote different namespaces in different places.\n\n### 0.4 ###\n\n* Don't raise an exception on when a SOAP fault is detected. Whether or\n  not this is an exceptional situation should be up to the user, as APIs\n  may use SOAP faults to implement business logic errors.\n* Ruby 1.8 support dropped\n\n### 0.3 ###\n\n* Support for WSDL inline type definitions and type extensions\n\n### 0.2 ###\n\n* SOAP 1.1 support\n* Better handling of namespaces in the XML schema. You should now be\n  able to have two types a:foo and b:foo and it will Just Work. This\n  introduces some API incompatibilities with version 1.1. Specifically,\n  `LolSoap::WSDL#types` is now keyed based on a prefixed type name\n  rather than an unprefixed type name. This shouldn't affect you if\n  you're not using `LolSoap::WSDL#types` directly.\n* Add support for building attributes with `LolSoap::Builder` based on\n  the XML Schema information.\n\n### 0.1 ###\n\nInitial release\n\n## License ##\n\n(The MIT License)\n\nCopyright (c) 2012 Loco2 Ltd.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraileurope%2Flolsoap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraileurope%2Flolsoap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraileurope%2Flolsoap/lists"}