I am trying out Soap4R, and I’ve discovered (as usual) a few hangups along the way. I played with the self-generating WSDL, but it was difficult to see what was going on, so I used wsdl2ruby.rb to build my classes.
First – I started with a test, that’s one of the ways I like to learn a new service. I ran into the following problem:
OpenSSL::SSL::SSLError: certificate verify failed
To get around that, in my environment.rb (near the top), and also in my test class I add:
require "rubygems"
gem "soap4r"
require "soap/mapping"
I continue to have certificate errors, but I’m not surprised, because I’m using HTTPS against an unsigned certificate. So after I create my driver, I do:
driver = IDStore.new
driver.options["protocol.http.ssl_config.verify_mode"] = "OpenSSL::SSL::VERIFY_NONE"
And now the errors I get seem to be more-or-less related to the task at hand
Let’s say you have two domain objects/models – Feet and Toes.
Obviously, in general a Foot hasMany toes
and obviously (at least we hope) a toe belongsTo a foot.
So given this, if you, say, changed the color of the toenail on a toe, you would expect to then do a toe.save(), right?
WRONG! You get this crazy _backRef exception and you’re dead in the water.
Instead, what you have to do is save the Foot, and it cascades down and saves the toe.
*boggle*
http://jira.codehaus.org/browse/GRAILS-3783
Never ever use @template to refer to a model or object in your project !!!!!
Rails uses this name internally to track the ERb &| HAML templates, and it gets horribly confused. You get errors like:
undefined method `view_paths' for #
and
undefined method `render' for #
Save yourself some time and listen to me
If you’re trying to set up pdf-writer as a config.gem instruction, the obvious approach doesn’t work, at all. instead, do this
config.gem "pdf-writer", :lib => "pdf/writer", :version => "1.1.8"
hat tip