DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Ruby (http://www.daniweb.com/forums/forum73.html)
-   -   WSDL and ruby (http://www.daniweb.com/forums/thread178282.html)

gadys Feb 25th, 2009 8:54 am
WSDL and ruby
 
Hi
I starting to work with ruby and soap and had a question :

1. how do I generate a WSDL file for the service I created ?
will it be compatible with an .NET client ?

Thanks,
Gady

----------------------------------------------------------------

begin
  class MyServer < SOAP::RPC::StandaloneServer

        # Handler methods
      def add(a, b)
        return a + b
      end
      def div(a, b)
        return a / b
      end

      # Expose our services
      def initialize(*args)
        add_method(self, 'add', 'a', 'b')
        add_method(self, 'div', 'a', 'b')
      end


  end
  server = MyServer.new("MyServer",
            'urn:ruby:calculation', 'localhost', 8080)
  trap('INT'){
    server.shutdown
  }
  server.start
rescue => err
  puts err.message
end

unleashbf May 11th, 2009 2:52 am
Re: WSDL and ruby
 
Do you try Ruby's SOAP WSDL Driver ? it can parse a WSDL file and make the appropriate methods available automatically.


All times are GMT -4. The time now is 4:41 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC