Dispatching requests in SOAP

Discussion in 'Ruby' started by Rickard Sjostrom, Aug 7, 2006.

  1. Hi!
    1. I have built a small SOAP server and wonders and have a few
    questions. I included the code below if it is of interest!

    1. What is the best trick to get these requests spawned into new
    threads/processes so that the server will always be available? (if
    running as standalone server)

    2. Is the trick to have it to run in the web server?
    3. Is the web server thing accomplished by letting the script run as a
    CGI script?

    This how I have done my SOAP server test:

    ------------
    require 'server_dispatcher'
    require 'soap/rpc/standaloneServer'

    class DeliveryService < SOAP::RPC::StandaloneServer
    #will be run when an instance of this class is created
    def on_init
    obj = MyClass.new
    add_method(obj, "find", "array")
    end
    end

    class MyClass
    def find(array)
    return array.push("extra")
    end
    end
    -------------------


    main prog:
    -------------------
    require 'delivery_service'

    server = DeliveryService.new("Test",
    "http://rickthemick.com/DeliveryService", "0.0.0.0", 9090)
    trap('INT') {
    server.shutdown
    }

    puts "Service started..."
    server.start
    -------------------

    --
    Posted via http://www.ruby-forum.com/.
     
    Rickard Sjostrom, Aug 7, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cory
    Replies:
    2
    Views:
    1,635
    Eric Lawrence [MSFT]
    Feb 20, 2004
  2. Fernando Arámburu

    web requests and mobile requests

    Fernando Arámburu, Apr 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    638
    Joerg Jooss
    Apr 8, 2005
  3. Robert M. Gary

    SOAP finance requests?

    Robert M. Gary, Nov 11, 2005, in forum: Java
    Replies:
    11
    Views:
    5,169
    Roedy Green
    Nov 14, 2005
  4. Ron Eggler

    SOAP-requests?

    Ron Eggler, Jan 3, 2006, in forum: HTML
    Replies:
    6
    Views:
    905
    Andy Dingley
    Jan 5, 2006
  5. Chiara Popalopa

    SOAP requests

    Chiara Popalopa, Mar 30, 2005, in forum: XML
    Replies:
    3
    Views:
    1,125
    Martin Honnen
    Mar 30, 2005
  6. Jay

    SOAP requests

    Jay, Apr 10, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    464
    bruce barker
    Apr 11, 2007
  7. aaa

    Tool for intercepting SOAP requests

    aaa, Mar 7, 2005, in forum: ASP .Net Web Services
    Replies:
    7
    Views:
    775
    Pete Wood
    May 9, 2005
  8. Peter Kron

    How to diagnose bad SOAP requests to ASP.NET Web Service

    Peter Kron, Aug 23, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    332
    Stephen Ahn
    Aug 24, 2005
Loading...