SOAP WSDL Question (ignored element)

Hi folks,

I'm writing a tool in Ruby that need to talk to an ASP.NET SOAP web service.

All's well and the code works fine but when creating the wdsl driver like so...

wsdl_driver = SOAP::WSDLDriverFactory.new("http://someurl/blah.asmx?WSDL")

I get the following warnings on stderr...

ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}binding
ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}operation
ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}body
ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}address

I'm pretty new too Ruby so sorry if this is a daft question but how do I supress those messages? (aside from wrapping the whole thing in bash and redirecting stderr! :slight_smile:

Thanks in advance,
Jim

j i m c r o f t y a t g o o g l e m a i l . c o m

Hi,

Jim wrote:

wsdl_driver = SOAP::WSDLDriverFactory.new("http://someurl/blah.asmx?WSDL"\)

I get the following warnings on stderr...

ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}binding
ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}operation
ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}body
ignored element: {http://schemas.xmlsoap.org/wsdl/soap12/}address

I'm pretty new too Ruby so sorry if this is a daft question but how do I
supress those messages? (aside from wrapping the whole thing in bash and
redirecting stderr! :slight_smile:

Those messages are dumped with 'warn' method. You can change $VERBOSE
to control it.

  def suppress_warning
    back = $VERBOSE
    $VERBOSE = nil
    begin
      yield
    ensure
      $VERBOSE = back
    end
  end

  wsdl_driver = suppress_warning {
    SOAP::WSDLDriverFactory.new("http://someurl/blah.asmx?WSDL"\)
  }

Regards,
// NaHi