# Webservice problem?

**URL:** <https://www.ruby-forum.com/t/webservice-problem/196683>\
**Category:** Rails\
**Created:** [May 19, 2008, 1:58pm UTC](https://www.ruby-forum.com/t/webservice-problem/196683 "2008-05-19T13:58:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [May 19, 2008, 1:58pm UTC](https://www.ruby-forum.com/t/webservice-problem/196683/1 "2008-05-19T13:58:49Z")

</div>

Hi All,  
I am creating one web service in ror.It’s working fine but now i  
wanna make a method in webservice in which i want to pass hash as  
parameter.

But i don’t have any idea how to do this.

like  
api\_method :get\_value,:expects =\> [hash],:returns =\> [:string]

but i don’t know how to pass means syntax to pass hash as  
parameter.Please help me out.

Thanks  
Varun

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [May 19, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/webservice-problem/196683/2 "2008-05-19T15:03:22Z")

</div>

On 19 May 2008, at 12:58, Varun G. wrote:

> 

AFAIK, you can’t have an arbitrary hash. Have a look at  
ActionWebService::Struct

Fred
