As I am calling a web service, I got error message complaining the .each
method
in following code, please help...
wsdl = "http://localhost:81/services/meterServiceGlue.wsdl"
serv = SOAP::WSDLDriverFactory.new(wsdl).createDriver
serv.generate_explicit_type = true
@meters = Array.new
results = serv.loadMeters()
i=0
results.each {
result>
meters[i] = Meter.new(result.openTime,result.closeTime)
meters[i].closeRead = result.closeRead
i=i+1
}
Error Message: undefined method `each' for
#<SOAP::Mapping::Object:0x5e10e78>
Hi,
Theresa Shen wrote:
As I am calling a web service, I got error message complaining the .each
method
in following code, please help...
wsdl = "http://localhost:81/services/meterServiceGlue.wsdl"
serv = SOAP::WSDLDriverFactory.new(wsdl).createDriver
OT: please call "create_rpc_driver" instead of "createDriver" here.
serv.generate_explicit_type = true
@meters = Array.new
results = serv.loadMeters()
Add the following line to dump methods it has.
p((results.methods - Kernel.methods).sort)
i=0
results.each {
>result>
meters[i] = Meter.new(result.openTime,result.closeTime)
meters[i].closeRead = result.closeRead
i=i+1
}
Error Message: undefined method `each' for
#<SOAP::Mapping::Object:0x5e10e78>
Methods defined for return value depends your meterServiceGlue.wsdl .
Regards,
// NaHi