Hi,
last week I encountered the same problem.
I modified a sample program in the soap4r distribution.
Hope i helps.
Roland
···
###file: service.rb
require "soap/rpc/driver"
require "RechnerServiceModule"
include RechnerServiceModule
server = ‘http://localhost:8080/WSSE_Service/RechnerService.asmx’
wiredump_dev=STDERR
service = SOAP::RPC::Driver.new(server, RechnerServiceModule::InterfaceNS)
service.wiredump_dev=wiredump_dev
service.default_encodingstyle = SOAP::EncodingStyle::ASPDotNetHandler::Namespace
RechnerServiceModule::add_method(service)
result = service.mul(2,2)
print("Result: ", result)
###file:servicemodule.rb
module RechnerServiceModule
InterfaceNS = 'http://schemas.t-systems.com/wse/RechnerService’
Methods=[[‘mul’, ‘a’,‘b’],[‘minus’, ‘a’,‘b’],[‘plus’, ‘a’,‘b’],[‘hello’]]
def RechnerServiceModule.add_method(drv)
Methods.each do |method, *param|
drv.add_method_with_soapaction(method, InterfaceNS+"/#{ method }", *param)
end
end
end
Hi,
From: SchmittR@t-systems.com
Sent: Tuesday, November 18, 2003 11:48 PM
last week I encountered the same problem.
I modified a sample program in the soap4r distribution.
Hope i helps.
[snip]
This is far better than my answer. Thanks.
Regards,
// NaHi
Roland,
thanks for replying. I have eventually read your message sufficiently
carefully to clear up a few items. I now have a test program
apparently identical in all important respects to yours. It generates
the following message
<?xml version="1.0" encoding="us-ascii" ?>
<env:Envelope xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:env=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
env:Body
<n1:mul xmlns:n1=“http://dlogic.com/dmwebservices”>
n1:a2</n1:a>
n1:b2</n1:b>
</n1:mul>
</env:Body>
</env:Envelope>
However when the parameters of this function hit the ASP.NET web
service function they are changed to 0. Can you help me to find a
reason for this?
David Moore
SchmittR@t-systems.com wrote in message news:7858A15CC1C78E4CAC0E2373DE423AD90126BB60@G8PJ4.blf01.telekom.de…
···
Hi,
last week I encountered the same problem.
I modified a sample program in the soap4r distribution.
Hope i helps.
Roland
###file: service.rb
require “soap/rpc/driver”
require “RechnerServiceModule”
include RechnerServiceModule
server = ‘http://localhost:8080/WSSE_Service/RechnerService.asmx’
wiredump_dev=STDERR
service = SOAP::RPC::Driver.new(server, RechnerServiceModule::InterfaceNS)
service.wiredump_dev=wiredump_dev
service.default_encodingstyle = SOAP::EncodingStyle::ASPDotNetHandler::Namespace
RechnerServiceModule::add_method(service)
result = service.mul(2,2)
print("Result: ", result)
###file:servicemodule.rb
module RechnerServiceModule
InterfaceNS = ‘http://schemas.t-systems.com/wse/RechnerService’
Methods=[[‘mul’, ‘a’,‘b’],[‘minus’, ‘a’,‘b’],[‘plus’, ‘a’,‘b’],[‘hello’]]
def RechnerServiceModule.add_method(drv)
Methods.each do |method, *param|
drv.add_method_with_soapaction(method, InterfaceNS+“/#{ method }”, *param)
end
end
end