No Such File to Load -- Soap4R -- Why

no such file to load -- soap4r -- why?

Try to load it as

require 'soap4r' in your code

And make sure you installed soap4r with all the dependencies

here is a link for how to install it - http://www.tutorialspoint.com/ruby/ruby_web_services.htm

cheers

sameera

no such file to load -- soap4r -- why?

Try to load it as

require 'soap4r' in your code

And make sure you installed soap4r with all the dependencies

here is a link for how to install it - http://www.tutorialspoint.com/ruby/ruby_web_services.htm

cheers

sameera

ruby - require & cannot load such file

Get this https://github.com/spox/soap4r-spox and patch your ruby with it, its the default soap module for ruby but was pulled out of 1.9 versions

soap4r - uninitialized constant REXML::Element

fixed by adding

require 'rexml/document'

soap4r custom headers

soap4r is not very pretty. I poked around the rdocs abit and it looks like the simplest way to fix your problem would be to have on_simple_outbound return the string representation of the element you want to create.

so instead of

return {"Identities" => {"Username" => username, "Password" => password, "Docbase" => docbase}}

try

%Q(<Identities xsi:type="RepositoryIdentity" userName="#{user}" password="#{password}" repositoryName="#{docbase}" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>)

using something like builder, you could make it look more rubyish, but try that.

The other option would be to investigate newer soap libraries. handsoap looks interesting.

Passing a blank XSD::QName using soap4r

Looks like you need to make some changes to soap4r: http://dev.ctor.org/soap4r/browser/branches/1_5/lib/soap/header/handler.rb

If the service isn't all that complicated you could try Handsoap
https://github.com/unwire/handsoap/wiki/authentication#WS-Security



Related Topics



Leave a reply



Submit