media-scientific - IT Blog

the backend developers blog

Rails-SOAP: NameError (uninitialized constant SOAP::XSDNamespaceTag):

Vorlesen mit webReader

Laut: http://www.datanoise.com/articles/2008/7/2/actionwebservice-is-back sollte man den ActionWebService nutzen können.

Leider kann beim Aufruf von WSDL folgendes passieren:

NameError (uninitialized constant SOAP::XSDNamespaceTag):
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/protocol/soap_protocol/marshaler.rb:160:in `qualified_type_name'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:222:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:220:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:219:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:218:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:215:in `each'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:215:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:214:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:213:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:203:in `to_wsdl'
  /Library/Ruby/Gems/1.8/gems/datanoise-actionwebservice-2.3.2/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:156:in `wsdl'

ActionView::MissingTemplate (Missing template caller/wsdl.erb in view path app/views):

Das Problem besteht schon einige Zeit, wie das folgende Ticket zeigt: http://dev.ctor.org/soap4r/ticket/476

Die Lösung unter diesem Ticket ist von Simon. Da er leider nicht “unterschrieben” hat, hier nochmal einen “herzlichen Dank” dafür.

In der Datei environment.rb einfach folgendes eintragen:

module SOAP
 SOAPNamespaceTag = 'env'
 XSDNamespaceTag = 'xsd'
 XSINamespaceTag = 'xsi'
end

Leave a Reply

You must be logged in to post a comment.