{"id":38615321,"url":"https://github.com/cabify/foam","last_synced_at":"2026-01-17T08:49:12.674Z","repository":{"id":57504571,"uuid":"194051843","full_name":"cabify/foam","owner":"cabify","description":"A SOAP 1.1 client [managed by soy-programador]","archived":false,"fork":false,"pushed_at":"2019-10-15T08:46:55.000Z","size":22,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":92,"default_branch":"master","last_synced_at":"2025-02-25T13:56:08.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cabify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-27T08:10:39.000Z","updated_at":"2023-12-18T01:56:56.000Z","dependencies_parsed_at":"2022-08-30T03:41:48.964Z","dependency_job_id":null,"html_url":"https://github.com/cabify/foam","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cabify/foam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Ffoam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Ffoam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Ffoam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Ffoam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cabify","download_url":"https://codeload.github.com/cabify/foam/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Ffoam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: 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":[],"created_at":"2026-01-17T08:49:11.915Z","updated_at":"2026-01-17T08:49:12.664Z","avatar_url":"https://github.com/cabify.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foam: SOAP's best friend \n\n[![Build Status](https://travis-ci.com/cabify/foam.svg?token=seG66JiMjNYXrKzButB4\u0026branch=master)](https://travis-ci.com/cabify/foam)\n[![GoDoc](https://godoc.org/github.com/cabify/foam?status.svg)](https://godoc.org/github.com/cabify/foam)\n\nFoam is a SOAP 1.1 client for Go which implements the [WSS BinarySecurityToken](https://www.oasis-open.org/committees/download.php/16790/wss-v1.1-spec-os-SOAPMessageSecurity.pdf)\nand [XML Signature](https://www.w3.org/TR/xmldsig-core1/) standards.\n\nIt supports signing with X.509 certificates using the [`rsa-sha1`](https://www.w3.org/TR/xmldsig-core1/#sec-PKCS1)\nalgorithm.\n\n#### Dependencies\n\nThis package uses `cgo` and has an hard-dependency on [XMLSec](https://www.aleksey.com/xmlsec/)\nand [LibXML2](http://xmlsoft.org/), so don't skimp on the installation instructions.\n\nDue to this dependency, this library is not recommended for simpler use-cases\nwhere XML Digital Signature is not a requirement.\n\n## Usage\n\n```go\npackage foam_test\n\nimport (\n    \"context\"\n    \"encoding/xml\"\n    \"io/ioutil\"\n    \"log\"\n    \"net/http\"\n    \"time\"\n\n    \"github.com/cabify/foam\"\n)\n\ntype foo struct {\n    XMLName xml.Name `xml:\"foo\"`\n    ID      string   `xml:\"id,attr\"`\n}\n\ntype baz struct {\n    XMLName xml.Name `xml:\"baz\"`\n    Value   string   `xml:\"value,attr\"`\n}\n\nfunc main() {\n    // Read the RSA certificate and private key\n    cert, err := ioutil.ReadFile(\"my_server.crt\")\n    if err != nil {\n        log.Fatalf(\"read certificate: %v\", err)\n    }\n    key, err := ioutil.ReadFile(\"my_server.key\")\n    if err != nil {\n        log.Fatalf(\"read key: %v\", err)\n    }\n\n    // Create an HTTP client with a timeout\n    httpClient := \u0026http.Client{\n        Timeout: 3 * time.Second,\n    }\n\n    client, err := foam.NewClient(\"https://example.com/MyServer?wsdl\",\n        foam.WithBinarySecurityToken(cert, key),\n        foam.WithHTTPClient(httpClient))\n    if err != nil {\n        log.Fatalf(\"read key: %v\", err)\n    }\n\n    var res baz\n    if err := client.Call(context.Background(), \"MyEndpoint\", \u0026foo{ID: \"1\"}, \u0026res); err != nil {\n        log.Fatalf(\"make request: %v\", err)\n    }\n}\n```\n\n## Installation\n\n### macOS\n\nThe easiest way to install all the required dependencies is with Homebrew:\n\n```shell\nbrew install libxmlsec1 libxml2 pkg-config\n```\n\n**Make sure to follow the post-install instructions** printed by homebrew,\notherwise the Go compiler won't be able to find the libraries on your machine.\n\n### Linux\n\n#### Debian\n\n```\napt-get install -y libxml2-dev libxmlsec1-dev pkg-config\n```\n\n## Build\n\nWhen building the package, you must have CGO enabled and set the `CGO_CFLAGS_ALLOW`\nto `-w|-UXMLSEC_CRYPTO_DYNAMIC_LOADING`.\nFor example:\n\n```\nCGO_CFLAGS_ALLOW=\"-w|-UXMLSEC_CRYPTO_DYNAMIC_LOADING\" go build\n```\n\n## License\n\nFoam is copyright (c) 2019 Maxi Mobility Spain.\n\nLicensed under the Apache License, Version 2.0.\n\nCheck [LICENSE](./LICENSE) for more information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcabify%2Ffoam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcabify%2Ffoam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcabify%2Ffoam/lists"}