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:inRecipientIDs>badger2005</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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On 8/14/07, Tim Perrett <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > 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:inRecipientIDs>badger2005</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 > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---