# Customizing generated type names with ActionWebService

**URL:** <https://www.ruby-forum.com/t/customizing-generated-type-names-with-actionwebservice/166801>\
**Category:** Rails\
**Created:** [April 29, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/customizing-generated-type-names-with-actionwebservice/166801 "2009-04-29T17:39:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandante](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@dandante](https://www.ruby-forum.com/u/dandante)\
**Post date:** [April 29, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/customizing-generated-type-names-with-actionwebservice/166801/1 "2009-04-29T17:39:02Z")

</div>

I need a way I can create two different ruby struct classes (MyStructV1,  
MyStructV2) and have them map to a type which is referred to in the xml  
as simply ‘MyStruct’. V1 and V2 have different fields, and would be  
served by different controllers.

Can this be done? I have tried valiantly to patch actionwebservice and  
the underlying soap code (soap4r) to this end, but to no avail. Is there  
a way to set an explicit xmlname \<–\> ruby class name mapping for a  
particular controller/wsdl namespace?

Any hints?

Thanks,  
nerdytenor
