Soap4r

can anyone give me a simple code how to use soap4r with a mongrel
server. a client and server code.
I wanna use this concept in my application. this is new to me…

i have used this with webrick and its working fine.
i wan to go for mongrel.
sample code of my application is this

server:

require ‘soap/rpc/standaloneServer’

class SymptomCheckerServer < SOAP::RPC::StandaloneServer

def on_init
@log.level = Logger::Severity::DEBUG
suggest_diagnoses= SuggestDiagnosesController.new
add_method(suggest_diagnoses, ‘main_diagnoses’, ‘params’)
end
end

server = SymptomCheckerServer.new(‘hws’, ‘urn:hws’, ‘192.168.1.52’,
6565)
trap(:INT) do
server.shutdown
end
server.start

client code:

   s = SOAP::RPC::Driver.new('http://192.168.1.52:6565/',

‘urn:hws’) #make connection with server
s.add_method(“main_diagnoses”,“institution_id”) #adding method
@all_system_ids= s.main_diagnoses(institution_id)

thanks in advance

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs