# Help problem SOAP4R with xsd:any

**URL:** <https://www.ruby-forum.com/t/help-problem-soap4r-with-xsd-any/84345>\
**Category:** Ruby\
**Created:** [February 3, 2007, 11:53am UTC](https://www.ruby-forum.com/t/help-problem-soap4r-with-xsd-any/84345 "2007-02-03T11:53:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jima](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jima](https://www.ruby-forum.com/u/jima)\
**Post date:** [February 3, 2007, 11:53am UTC](https://www.ruby-forum.com/t/help-problem-soap4r-with-xsd-any/84345/1 "2007-02-03T11:53:25Z")

</div>

Apologies in advance for cross-posting but I have been trying to resolve  
this problem for several days…without much success. I have looked on  
the mailing list and the web but have yet to find a resolution to this  
problem. So I was wondering whether someone of this mailing list could  
help me out

I am using the the SOAP library to call an operation, where the message  
element has an xsd:any defined.

This is the XML Schema for the message

\<xsd:element name=“setOutputAndCompleteRequest”\>  
xsd:complexType  
xsd:sequence  
\<xsd:element name=“taskId” type=“xsd:string”/\>  
\<xsd:element name=“data”\>  
xsd:complexType  
xsd:sequence  
\<xsd:any maxOccurs=“unbounded” minOccurs=“0” /\>  
\</xsd:sequence\>  
\</xsd:complexType\>  
\</xsd:element\>  
\<xsd:element name=“participantToken” type=“xsd:string”\>  
\</xsd:element\>  
\</xsd:sequence\>  
\</xsd:complexType\>  
\</xsd:element\>

and this is the operation that I am calling

\<wsdl:operation name=“setOutputAndComplete”\>  
\<wsdl:input message=“tns:setOutputAndCompleteRequest”/\>  
\<wsdl:output message=“tns:okResponse”/\>  
\</wsdl:operation\>

and this is the Ruby code I am using

```
 data = {
   :data => {
     :assessmentInfo => {
       :accept => '1',
       :comments => 'Good one',
       :fee => '100' }
     }
   };

```

service…setOutputAndComplete(  
:participantToken =\> @participant\_token,  
:taskId =\> task\_id,  
:data =\> data);

when i execute it i get the following exception

NoMethodError: undefined method `name' for #<WSDL::XMLSchema::Any: 0x19bb1f2> C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/mapping.rb:280:in`get\_attributes\_for\_any’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/xsd/namedelements.rb:58:in `each' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/xsd/namedelements.rb:57:in`each’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/mapping.rb:278:in `get_attributes_for_any' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/wsdlliteralregistry.rb:140:in`complexobj2seq  
uencesoap’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/wsdlliteralregistry.rb:132:in `complexobj2soa p' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/wsdlliteralregistry.rb:107:in`obj2typesoap’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/wsdlliteralregistry.rb:89:in `obj2elesoap' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/wsdlliteralregistry.rb:227:in`complexobj2soa  
pchildren\_single’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/wsdlliteralregistry.rb:180:in `complexobj2soa pchildren' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/wsdlliteralregistry.rb:151:in`complexobj2seq  
uencesoap’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/xsd/namedelements.rb:58:in `each' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/xsd/namedelements.rb:57:in`each’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/wsdlliteralregistry.rb:142:in `complexobj2seq uencesoap' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/wsdlliteralregistry.rb:132:in`complexobj2soa  
p’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/wsdlliteralregistry.rb:107:in `obj2typesoap' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/wsdlliteralregistry.rb:89:in`obj2elesoap’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/wsdlliteralregistry.rb:37:in `obj2soap' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/mapping.rb:113:in`\_obj2soap’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/mapping.rb:42:in `obj2soap' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/mapping.rb:531:in`protect\_mapping’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/mapping.rb:541:in `protect_threadvars' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/mapping/mapping.rb:525:in`protect\_mapping’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/mapping/mapping.rb:41:in `obj2soap' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/rpc/proxy.rb:490:in`request\_doc\_lit’  
C:/applications/ruby/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:27:in `collect' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/rpc/proxy.rb:489:in`each’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/rpc/proxy.rb:489:in `collect' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/rpc/proxy.rb:489:in`request\_doc\_lit’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/rpc/proxy.rb:451:in `request_doc' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/rpc/proxy.rb:399:in`request\_body’  
C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/  
lib/soap/rpc/proxy.rb:126:in `call' C:/applications/ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.5.20061022/ lib/soap/rpc/driver.rb:179:in`call’  
(eval):6:in `setOutputAndComplete' ./../../lib/task_list.rb:113:in`complete\_task\_with\_description’  
lodge\_proposal\_test.rb:43:in `test\_init\_lodge\_proposal\_process’

Do i need to do something special to set the xsd:any

cheers
