Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #198 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

define basic_auth with property file

Reported by: nahi Assigned to: nahi
Priority: high Milestone: 1.5.6
Component: soap4r Version: 1.5
Keywords: Cc:

Description (Last modified by nahi)

(from ruby-talk ML)

I am trying to use SOAP::WSDLDriverFactory but the server requires
basic authentication.

I've tried using something like:

WSDL_URI = 'http://user:password@server:80/TestService?wsdl';
factory = SOAP::WSDLDriverFactory.new(WSDL_URI)

But I keep getting parse errors:

/usr/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:112:in `decode_tag': Unknown
element {}html. (WSDL::XMLSchema::Parser::UnknownElementError)

Which I am rather sure is due to the need for basic authentication,
since other SOAP services that don't require authentication work just
fine.  I can also get the raw WSDL just fine using something like:

require 'net/http'
Net::HTTP.start('server') { |http|
        req = Net::HTTP::Get.new("/TestService?wsdl")
        req.basic_auth( 'user', 'password' )
        response = http.request(req)
        puts response.body
}

Any tips on how to use basic authentication with WSDLDriverFactory, or
how else can I work around this?

Thanks in advance!

Change History

02/05/06 23:33:31 changed by nahi

  • description changed.

05/05/07 00:08:36 changed by nahi

  • priority changed from normal to high.

05/11/07 14:53:31 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1760]) * allow to set basic_auth definition in soap/property file. closes #198.

  • do not do pretty-printing when a SOAPElement does not have any elements. closes #336.