# Not able to send request to radiotime webservice

**URL:** <https://www.ruby-forum.com/t/not-able-to-send-request-to-radiotime-webservice/138651>\
**Category:** Ruby\
**Created:** [May 26, 2008, 11:50am UTC](https://www.ruby-forum.com/t/not-able-to-send-request-to-radiotime-webservice/138651 "2008-05-26T11:50:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![frnd4gan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/47e85d/32.png) [@frnd4gan](https://www.ruby-forum.com/u/frnd4gan)\
**Post date:** [May 26, 2008, 11:50am UTC](https://www.ruby-forum.com/t/not-able-to-send-request-to-radiotime-webservice/138651/1 "2008-05-26T11:50:22Z")

</div>

Hello All,

am new to RoR,I want to convert one of my PHP application to RoR.  
I want to sent request search\_ByQuery method of radiotime webservice (  
[http://wiki.radiotime.com/doku.php?id=dev:doc:webservice:guide:start](http://wiki.radiotime.com/doku.php?id=dev:doc:webservice:guide:start)  
)  
can anyone help me for the same?

search\_ByQuery

The code for it is  
require “soap/wsdlDriver”  
wsdl = “[http://services.radiotime.com/RadioTime.asmx?WSDL](http://services.radiotime.com/RadioTime.asmx?WSDL)”  
driver = SOAP::WSDLDriverFactory.new(wsdl).create\_rpc\_driver

param = {“request”=\>{“Query”=\>“sport”}}—This is the line which is  
causing the problem currently

lists = driver.search\_ByQuery( param )  
lists.each { |list| puts list.listName }

In PHP its workin properly.

---

<div class="post-metadata">

**Author:** ![frnd4gan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/47e85d/32.png) [@frnd4gan](https://www.ruby-forum.com/u/frnd4gan)\
**Post date:** [May 26, 2008, 12:10pm UTC](https://www.ruby-forum.com/t/not-able-to-send-request-to-radiotime-webservice/138651/2 "2008-05-26T12:10:13Z")

</div>

ignored element: {[http://schemas.xmlsoap.org/wsdl/soap12/](http://schemas.xmlsoap.org/wsdl/soap12/)}address  
#SOAP::Mapping::Object:0x34000f8:  
System.Web.Services.Protocols.SoapException:  
One or more request fields failed validation —\>  
RadioTime.Exception.Validatio  
nException: No query fields populated for search (SOAP::FaultError)  
at RadioTime.Service.Search.SearchService.Validate(SearchQuery query)  
in e:\p  
rojects\RadioTime\Library\Service\Search\SearchService.cs:line 185  
at RadioTime.Service.Search.SearchService.Search(SearchQuery query,  
ListenFil  
ter listenFilter, ListenFilter recordFilter) in  
e:\projects\RadioTime\Library\Se  
rvice\Search\SearchService.cs:line 61  
at RadioTime.WebService.RadioTimeWebService.Search(SearchQuery query,  
ListenF  
ilter filter) in  
e:\projects\RadioTime\Web\Services\UI\RadioTime.asmx.cs:line 16  
67  
at  
RadioTime.WebService.RadioTimeWebService.Search\_ByQuery(SearchByQueryReque  
st request) in  
e:\projects\RadioTime\Web\Services\UI\RadioTime.asmx.cs:line 1654

---

<div class="post-metadata">

**Author:** ![frnd4gan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/47e85d/32.png) [@frnd4gan](https://www.ruby-forum.com/u/frnd4gan)\
**Post date:** [May 26, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/not-able-to-send-request-to-radiotime-webservice/138651/3 "2008-05-26T12:27:42Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Ganesh Pawar wrote:  
| ignored element: {[http://schemas.xmlsoap.org/wsdl/soap12/](http://schemas.xmlsoap.org/wsdl/soap12/)}address  
| #SOAP::Mapping::Object:0x34000f8:  
| System.Web.Services.Protocols.SoapException:  
| One or more request fields failed validation —\>  
| RadioTime.Exception.Validatio  
| nException: No query fields populated for search (SOAP::FaultError)  
| at RadioTime.Service.Search.SearchService.Validate(SearchQuery query)  
| in e:\p

The error seems to be in the query. Either the provider isn’t responding  
to the query, or this is their way of telling that nothing matched your  
query.

Also: Please quote relevant parts of a message you are responding to.  
[ruby-forum.com](http://ruby-forum.com) is a mirror to Usenet and the ruby-talk mailing list.

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)

Program defensively.  
~ - The Elements of Programming Style (Kernighan & Plaugher)  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkg6kF4ACgkQbtAgaoJTgL+pbQCcC5App0PIDUl/bu/DwIyV1Hd/  
OokAn1N1VSuKi/EZW1Zjk2SFlFghxsqD  
=3CUo  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![frnd4gan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/47e85d/32.png) [@frnd4gan](https://www.ruby-forum.com/u/frnd4gan)\
**Post date:** [May 26, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/not-able-to-send-request-to-radiotime-webservice/138651/4 "2008-05-26T12:05:11Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Ganesh Pawar wrote:  
| Hello All,  
|  
| am new to RoR,I want to convert one of my PHP application to RoR.

A tip for the future, once you have Rails specific questions: The Rails  
community is active elsewhere: [Ruby on Rails — Community](http://rubyonrails.com/community)

| param = {“request”=\>{“Query”=\>“sport”}}—This is the line which is  
| causing the problem currently

And what is the error message you get?

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)

~ Why should I have to work for everything? It’s like saying that I  
don’t deserve it. – Calvin  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkg6izYACgkQbtAgaoJTgL89wACfTPfWEH/H1eACcBzxgngOCfZx  
NzsAoKNx2fio6l9jW6+aLEbyPO5OYR2K  
=SyLH  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![frnd4gan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/47e85d/32.png) [@frnd4gan](https://www.ruby-forum.com/u/frnd4gan)\
**Post date:** [May 26, 2008, 12:36pm UTC](https://www.ruby-forum.com/t/not-able-to-send-request-to-radiotime-webservice/138651/5 "2008-05-26T12:36:06Z")

</div>

Hello Phillip,  
I know the error is in the parameter which am sending and am here to get  
soem help from others,so that am able to send the request in proper  
format.

Basically the "lists = driver.search\_ByQuery(:request, :Query =\>  
[:sports]) "  
this is not exactly what the webserver expect …

The API detail you can find at  
[http://wiki.radiotime.com/doku.php?id=dev:doc:webservice:guide:start](http://wiki.radiotime.com/doku.php?id=dev:doc:webservice:guide:start)

Regards,  
Ganesh Pawar
