SOAP4R and ActionWebServices Conflicts and the FIX
SOAP4R and ActionWebServices doesn’t get along very well – due to conflicts in their naming convention.
SOAP4R is used to connect to any Web Services based third party clients – may or may not be based on rails. SOAP4R works fine when its used independently.
If you have to offer your own Web Services using ActionWebServices – independently it works fine without SOAP4R being used.
When used together – the following exception is thrown – when wsdl URL is accessed related to your ActionWebServices!
NameError (uninitialized constant SOAP::XSDNamespaceTag):
/vendor/rails/activesupport/lib/active_support/dependencies.rb:442:in `load_missing_constant’
/vendor/rails/activesupport/lib/active_support/dependencies.rb:77:in `const_missing’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/protocol/soap
protocol/marshaler.rb:160:in `qualified_type_name’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/dispatcher/ac
ion_controller_dispatcher.rb:231:in `to_wsdl’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/support/signa
ure_types.rb:205:in `each_member’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/support/signa
ure_types.rb:204:in `each’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/support/signa
ure_types.rb:204:in `each_member’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/dispatcher/ac
ion_controller_dispatcher.rb:229:in `to_wsdl’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/dispatcher/ac
ion_controller_dispatcher.rb:228:in `to_wsdl’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing’
D:/s/InstantRails/ruby/lib/ruby/gems/1.8/gems/datanoise-actionwebservice-2.2.2/lib/action_web_service/dispatcher/ac
ion_controller_dispatcher.rb:227:in `to_wsdl’
You must have already included gem ’soap4r’ to make your WebServices Client code working.
To fix this problem … add the following code to your environment.rb file and restart your server. Now both should be working.
module SOAP
SOAPNamespaceTag = ‘env’
XSDNamespaceTag = ‘xsd’
XSINamespaceTag = ‘xsi’
end
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.



Comments
No comments yet.
Leave a comment