Hey chaps
I am using classes I generated from wsdl2ruby, and they work like a
charm when running somthing like:
ruby -d path/to/file.rb
and i get the result I expect. However, when I use them within rails,
the actual xml it puts together is different. Using wire dump i see that
(and this is a key part of the web service) looks like:
<n1:inRecipientIDs xsi:type="n1:ArrayOfString">
<n1:string>badger2005</n1:string>
</n1:inRecipientIDs>
But when using in rails it looks like:
n1:inRecipientIDsbadger2005</n1:inRecipientIDs>
So my question is how can the same class generate differing output? Is
it somehow not using soap4r? Is there anyway to explicitally load it and
make it not use the stdlib ones?
Cheers for any help
Tim
Hi Tim,
The first thing I would check is to see if the libraries that are being
loaded are different in one instance over another. I’ve seen several
instances where SOAP gets messed up by an instance of htaccess2 being
loaded. The libraries are written to use htaccess2 if they find it but
otherwise fall back on htaccess. This will give you different behavior,
and
could be loaded by all kinds or extensions (the most assinign being Hoe,
which your probably not even using at all but gets loaded because
someone
used to to package their gem). The best way I know of to do this is to
use
$LOADED_FEATURES in irb and then again in script/console. It takes some
going through, but it may lead you to an answer.
Good Luck,
Rob
Cheers for the tip Rob, much apprecited
It seems the problem was to do with the SOAP implementation in stdlib
messing things up! It was actually a simple fix to be honest, i just
needed to do “gem soap4r” in boot.rb - for some reason, loading it any
other way - like in RAILS_ROOT/vendor for example - just doesnt cut the
mustard!!
Cheers
Tim