Hi all. I have a need to build a SOAP client using Ruby and Rails. I''m accessing a document/literal style SOAP service. I''ve been poring over documentation (well, there really doesn''t seem to be any, so that''s a little misleading), blog posts, and outdated tutorials all day, and I still don''t really have anywhere to begin. Every tutorial seems to have a vastly different idea of how to do this, and most of them call for the use of classes or methods which seem to no longer exist. The SOAP4R rdocs as well as the docs for the SOAP stuff built into Ruby are almost completely empty. They list methods that the classes define, but remain frustratingly silent on what they''re for or how to use them. I need a foothold here. Does anyone have any pointers to decent, not- outdated documents on getting started with SOAP as a client? Also, does anyone know if the SOAP stuff in Ruby does document/literal, or is it RPC only? I''ve read that SOAP4R can do it, but of course it''s not documented, so I have no clue how to begin. I could really use a lifeline here if someone has one to toss me. Thanks, -Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ESPNDev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-May-22 22:45 UTC
Re: SOAP client in Ruby/Rails
I just had the most unfortunate experience of writing a SOAP client in Ruby require ''soap/wsdlDriver'' class VideosController < ApplicationController def send_soap XSD::Charset.encoding = ''UTF8'' wsdlfile = "http://dev.espn.go.com:3004/test/test.xml" driver = SOAP::WSDLDriverFactory.new(wsdlfile).create_rpc_driver driver.addAsset(false,"siteId", "contentUploaderId", "contentUploaderUsername", "contentUploaderIp", "#{@video.class.name}- #{@video.id}", "fileTitle", "filePath", "contentType", "contentSubtype", "publicUri") end end Where addAsset is the name of the method you want to call. SOAP is a terrible thing -- that''s why you don''t find much documentation on it. On May 22, 3:35 pm, Bill Kocik <bko...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all. I have a need to build a SOAP client using Ruby and Rails. I''m > accessing a document/literal style SOAP service. I''ve been poring over > documentation (well, there really doesn''t seem to be any, so that''s a > little misleading), blog posts, and outdated tutorials all day, and I > still don''t really have anywhere to begin. Every tutorial seems to > have a vastly different idea of how to do this, and most of them call > for the use of classes or methods which seem to no longer exist. The > SOAP4R rdocs as well as the docs for the SOAP stuff built into Ruby > are almost completely empty. They list methods that the classes > define, but remain frustratingly silent on what they''re for or how to > use them. > > I need a foothold here. Does anyone have any pointers to decent, not- > outdated documents on getting started with SOAP as a client? Also, > does anyone know if the SOAP stuff in Ruby does document/literal, or > is it RPC only? I''ve read that SOAP4R can do it, but of course it''s > not documented, so I have no clue how to begin. > > I could really use a lifeline here if someone has one to toss me. > > Thanks, > -Bill--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the code sample. Does that WSDLDriver to support document/ literal, do you know? And I agree with your take on SOAP. Unfortunately my hands are tied, I''m integrating with Google''s AdSense API, and it''s all SOAPy. :( -Bill On May 22, 6:45 pm, "ESPN...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <ESPN3.DL- Community...-xX8xgfAcNKEAvxtiuMwx3w@public.gmane.org> wrote:> I just had the most unfortunate experience of writing a SOAP client in > Ruby > > require ''soap/wsdlDriver'' > class VideosController < ApplicationController > def send_soap > XSD::Charset.encoding = ''UTF8'' > wsdlfile = "http://dev.espn.go.com:3004/test/test.xml" > driver = SOAP::WSDLDriverFactory.new(wsdlfile).create_rpc_driver > driver.addAsset(false,"siteId", "contentUploaderId", > "contentUploaderUsername", "contentUploaderIp", "#...@video.class.name}- > #...@video.id}", "fileTitle", "filePath", "contentType", > "contentSubtype", "publicUri") > end > end > > Where addAsset is the name of the method you want to call. > > SOAP is a terrible thing -- that''s why you don''t find much > documentation on it.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
So have you gotten anywhere with this? I want to make a google adsense checker, so that on my admin page I can show current adsense earnings, etc. Any code help would be great. On May 23, 4:54 am, Bill Kocik <bko...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for the code sample. Does that WSDLDriver to support document/ > literal, do you know? > > And I agree with your take on SOAP. Unfortunately my hands are tied, > I''m integrating with Google''s AdSense API, and it''s all SOAPy. :( > > -Bill > > On May 22, 6:45 pm, "ESPN...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <ESPN3.DL- > > Community...-xX8xgfAcNKEAvxtiuMwx3w@public.gmane.org> wrote: > > I just had the most unfortunate experience of writing a SOAP client in > > Ruby > > > require ''soap/wsdlDriver'' > > class VideosController < ApplicationController > > def send_soap > > XSD::Charset.encoding = ''UTF8'' > > wsdlfile = "http://dev.espn.go.com:3004/test/test.xml" > > driver = SOAP::WSDLDriverFactory.new(wsdlfile).create_rpc_driver > > driver.addAsset(false,"siteId", "contentUploaderId", > > "contentUploaderUsername", "contentUploaderIp", "#...@video.class.name}- > > #...@video.id}", "fileTitle", "filePath", "contentType", > > "contentSubtype", "publicUri") > > end > > end > > > Where addAsset is the name of the method you want to call. > > > SOAP is a terrible thing -- that''s why you don''t find much > > documentation on it.--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---