SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    wsdl to ruby problem

    I am trying to discover the methods and their interfaces defined by a soap web service by parsing the wsdl. I have tried using soap4r to create an rpc driver.

    driver = SOAP::WSDLDriverFactory.new(WSDL_URL).create_rpc_driver

    I can query the driver for its methods like :
    methods = driver.methods

    This returns all methods in any SOAP::RPC:RIVER object plus those defined in the wsdl. How do I get just the methods in the wsdl? Again, how do I determine the interfaces of the methods I am interested in.

    Any help will be most welcome.

    makaks
    Last edited by makaks; Jul 18, 2008 at 09:35.

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a look at this thread:
    http://www.sitepoint.com/forums/showthread.php?t=558523

    That might help.

    Also if you browse to the WSDL address with your web browser, you should get a listing of methods I believe.

  3. #3
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! but the browser option is not what I need as I need to get these programmatically. Using SOAPpy I can achieve what I want in python easily but my knowledge of ruby is rather limited...

  4. #4
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    The problem as I have stated before is a ruby introspection problem. After digging around for a little while, I have settled on the code below, though I am not sure it is the best solution. It does solve one part of my problem
    Code:
    driver     = SOAP::WSDLDriverFactory.new(WSDL_URL).create_rpc_driver
    methods =  driver.methods - driver.class.public_instance_methods
    Thanks for the help


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •