Using the documentation and the source I came up with the following solution:
class ServiceRequest
def to_s
builder = Builder::XmlMarkup.new
builder.tag! :sUsername, "my_username"
builder.tag! :sPassword, "my_password"
builder.tag! :sConsumerIdent, "DZ-Manager_Web-Service_Consumer"
builder
end
end
And then in the terminal:
client = Savon.client(
wsdl: 'https://online-tools.dz-manager.com/Services/DzM_WebService.asmx?WSDL',
soap_version: 2,
pretty_print_xml: true,
env_namespace: 'soap12',
namespace_identifier: nil,
log_level: :debug)
client.call(:cred_log_in,
message: ServiceRequest.new,
attributes: {
xmlns: 'http://webservice.dz-manager.com/'}
)