# Errornous WSDL output for complex type

**URL:** <https://www.ruby-forum.com/t/errornous-wsdl-output-for-complex-type/178312>\
**Category:** Rails\
**Created:** [November 2, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/errornous-wsdl-output-for-complex-type/178312 "2009-11-02T18:12:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalpesh13131](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c57346/32.png) [@kalpesh13131](https://www.ruby-forum.com/u/kalpesh13131)\
**Post date:** [November 2, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/errornous-wsdl-output-for-complex-type/178312/1 "2009-11-02T18:12:09Z")

</div>

I tried to create WSDL with rails 1.2.6 but when I tried to return a  
custom data type rather than built in data type in my web API, I got  
this kind of WSDL data(I have not put entire WSDL file here but just few  
parts of it). I tried to compile it in java but could not compile it.  
Looks like rails is not returning proper WSDL file which can be used  
directly for other clients. When we have custom data type(complex data  
type) as parameters or return values,rails generates this kind of  
errornous WSDL. Does anybody has any solution??? Did I miss anything  
very obvious??

* * *

\<xsd:complexType name=“RESOURCECODEArray”\>  
xsd:complexContent  
\<xsd:restriction base=“soapenc:Array”\>  
\<xsd:attribute wsdl:arrayType=“typens:RESOURCECODE[]”  
ref=“soapenc:arrayType”/\>  
\</xsd:restriction\>  
\</xsd:complexContent\>  
\</xsd:complexType\>

 \*\*\*\*\*\*\*\*

Thanks,  
-Kalpesh

---

<div class="post-metadata">

**Author:** ![kalpesh13131](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c57346/32.png) [@kalpesh13131](https://www.ruby-forum.com/u/kalpesh13131)\
**Post date:** [November 3, 2009, 9:17pm UTC](https://www.ruby-forum.com/t/errornous-wsdl-output-for-complex-type/178312/2 "2009-11-03T21:17:45Z")

</div>

Not sure if you’ll get much help on this; 1.2.6 is over 2 years old  
now, and there’s been a pretty big move away from the whole WSDL/SOAP  
system.

You may want to take a look at this project, which brings  
ActionWebService into Rails 2.3-land:

> **[GitHub - datanoise/actionwebservice: This project is discontinued](https://github.com/datanoise/actionwebservice)**
>
> This project is discontinued. Contribute to datanoise/actionwebservice development by creating an account on GitHub.

–Matt J.

On Nov 2, 12:12 pm, Kalpesh1 Patel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![kalpesh13131](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c57346/32.png) [@kalpesh13131](https://www.ruby-forum.com/u/kalpesh13131)\
**Post date:** [November 4, 2009, 11:52am UTC](https://www.ruby-forum.com/t/errornous-wsdl-output-for-complex-type/178312/3 "2009-11-04T11:52:56Z")

</div>

Thanks Matt for the response. I thought nobody is going to reply!  
Initially I started with Rails 2.3.3 only but even the basic web  
service was not working. The error was “Uninitialized constant  
actionwebservice”. I have tried all the options but could not get  
around. I have tried with datanoise(as mentioned in your mail) as well  
but different error. Probably you can help. Here is my API class.

* * *

require ‘action\_service’  
class PersonAPI \< ActionService::Base  
export :add, :expects =\> [Integer], :returns =\> [Integer]  
end

* * *

I get “uninitialized constant  
ActionService::Exporting::ClassMethods::Inflector” error. Can you tell  
me what could be the problem?

So FINALLY I downgraded to Rails 1.2.6 and it worked smoothly  
thereafter. It doesn’t throw such weird errors. I am still looking for  
the solution with Rails 2.3. Do you have any “working” tutorial or  
something? That would be very helpful.

And for the problem I mentioned in my initial mail, I got the solution  
myself. Actually I have to add XML Namespaces inside tag  
like this,

* * *

* * *

it worked after that.

Best Regards,  
-Kalpesh

---

<div class="post-metadata">

**Author:** ![kalpesh13131](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c57346/32.png) [@kalpesh13131](https://www.ruby-forum.com/u/kalpesh13131)\
**Post date:** [November 5, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/errornous-wsdl-output-for-complex-type/178312/4 "2009-11-05T18:13:23Z")

</div>

On Nov 4, 4:20 am, Kalpesh P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> export :add, :expects => [Integer], :returns => [Integer]
> 
> ```
> 
> end
> 
> * * *
> 
> I get “uninitialized constant  
> ActionService::Exporting::ClassMethods::Inflector” error. Can you tell  
> me what could be the problem?

No idea - I’ve never actually done much with the SOAP stuff. I can’t  
even find a reference in the datanoise/actionwebservice code that  
would _generate_ an error like that. Do you have a recent version?

> So FINALLY I downgraded to Rails 1.2.6 and it worked smoothly  
> thereafter. It doesn’t throw such weird errors. I am still looking for  
> the solution with Rails 2.3. Do you have any “working” tutorial or  
> something? That would be very helpful.

Google couldn’t find any that looked useful; you may want to see if  
the examples in the datanoise repo are helpful.

–Matt J.
