1 hour spent and I can''t got explanation why I have "execution
expired"
when I trying to test this web service:
Pointed to: http://localhost:3000/news/list
class NewsService < ActionWebService::Base
web_service_api NewsApi
def list
[NewsTopic.new, NewsTopic.new]
end
end
class NewsController < ApplicationController
wsdl_service_name ''news''
web_service_dispatching_mode :delegated
web_service :news, NewsService.new
def list
news = ActionWebService::Client::Soap.new(
NewsApi, "http://localhost:3000/news/news")
rsp = news.list
render_text rsp.to_s
end
end
Strange, but I have successful log message:
Web Service Response (0.024314): => [#<NewsTopic:0xb7612328
@attributes={"last_modified"=>nil, "title"=>nil,
"id"=>nil,
"contents"=>nil, "preview"=>nil,
"sticky"=>nil}, @new_record=true>,
#<NewsTopic:0xb7612314 @attributes={"last_modified"=>nil,
"title"=>nil,
"id"=>nil, "contents"=>nil,
"preview"=>nil, "sticky"=>nil},
@new_record=true>]
<?xml version="1.0" encoding="UTF-8" ?>
<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:ListResponse xmlns:n1="urn:ActionWebService"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return n2:arrayType="n1:NewsTopic[2]"
xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="n2:Array">
<item>
<id xsi:nil="true"></id>
<title xsi:nil="true"></title>
<preview xsi:nil="true"></preview>
<contents xsi:nil="true"></contents>
<sticky xsi:nil="true"></sticky>
<last_modified xsi:nil="true"></last_modified>
</item>
<item>
<id xsi:nil="true"></id>
<title xsi:nil="true"></title>
<preview xsi:nil="true"></preview>
<contents xsi:nil="true"></contents>
<sticky xsi:nil="true"></sticky>
<last_modified xsi:nil="true"></last_modified>
</item>
</return>
</n1:ListResponse>
</env:Body>
</env:Envelope>
Sending data
Completed in 0.03303 (30 reqs/sec) | Rendering: 0.00013 (0%) | DB:
0.00762 (23%) | 200 OK [http://localhost/news/news]