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

Do you try Ruby's SOAP WSDL Driver ? it can parse a WSDL file and make the appropriate methods available automatically.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.