From 54ad12584795929f214200d7c29e274e0689d9b6 Mon Sep 17 00:00:00 2001 From: Sebastian Fiedlschuster Date: Sat, 5 Feb 2022 21:13:13 +0100 Subject: [PATCH] README: Add example on how to provide the wsdl document as a string (#968) as requested in https://github.com/savonrb/savon/issues/720#issuecomment-1030046685 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 80cf189f..062e5d89 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,12 @@ require 'savon' # create a client for the service client = Savon.client(wsdl: 'http://service.example.com?wsdl') +# or: create a client with a wsdl provided as a string +client = Savon.client do |config| + wsdl_content = File.read("/path/to/wsdl") + config.wsdl wsdl_content +end + client.operations # => [:find_user, :list_users]