943,712 Members | Top Members by Rank

Ad:
  • Ruby Discussion Thread
  • Unsolved
  • Views: 5218
  • Ruby RSS
Feb 25th, 2009
0

WSDL and ruby

Expand Post »
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

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

ruby Syntax (Toggle Plain Text)
  1. begin
  2. class MyServer < SOAP::RPC::StandaloneServer
  3.  
  4. # Handler methods
  5. def add(a, b)
  6. return a + b
  7. end
  8. def div(a, b)
  9. return a / b
  10. end
  11.  
  12. # Expose our services
  13. def initialize(*args)
  14. add_method(self, 'add', 'a', 'b')
  15. add_method(self, 'div', 'a', 'b')
  16. end
  17.  
  18.  
  19. end
  20. server = MyServer.new("MyServer",
  21. 'urn:ruby:calculation', 'localhost', 8080)
  22. trap('INT'){
  23. server.shutdown
  24. }
  25. server.start
  26. rescue => err
  27. puts err.message
  28. end
Last edited by peter_budo; Feb 25th, 2009 at 11:09 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gadys is offline Offline
1 posts
since Feb 2009
May 11th, 2009
0

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.
Last edited by unleashbf; May 11th, 2009 at 2:55 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
unleashbf is offline Offline
1 posts
since May 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Ruby Forum Timeline: hi
Next Thread in Ruby Forum Timeline: Ruby: Count to 1 Billion, basing from a C++ Code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC