[Rails] Calling a SOAP service from within a Rails controller

Dean Holdren
Thu, 26 Jan 2006 20:32:38 -0000

On 1/26/06, Adam Keys <adam@therealadam.com>
wrote:
> On Jan 26, 2006, at 10:49 AM, Dean Holdren wrote:
> >
> > SOAP::HTTPStreamError in Weather_map#data
> >
> >  502: Bad Gateway
>
> Did you try grabbing this file with a web browser, wget, curl, open-
> uri, etc.?  Sounds like there could be a problem with the remote server.

Yes I did, works fine within both a web browser, or as I stated
before, within a standalone ruby program.

The error occurs within the SOAP call, only when a rails controller is
the client.

>
> Also, it looks like you''re going to be downloading the WSDL every
> time your controller runs.  I''d download the WSDL and put it
> somewhere in your app so that you aren''t having to wait for that
file
> every time.

OK, thanks, I will do that. but I''m more concerned with the error with
SOAP call, here is the stack trace:

SOAP::HTTPStreamError in Weather_map#data
502: Bad Gateway
RAILS_ROOT: ./script/../config/..

Application Trace | Framework Trace | Full Trace
c:/ruby-1.8.4/lib/ruby/1.8/soap/streamHandler.rb:200:in `send_post''
c:/ruby-1.8.4/lib/ruby/1.8/soap/streamHandler.rb:109:in `send''
c:/ruby-1.8.4/lib/ruby/1.8/soap/rpc/proxy.rb:170:in `route''
c:/ruby-1.8.4/lib/ruby/1.8/soap/rpc/proxy.rb:141:in `call''
c:/ruby-1.8.4/lib/ruby/1.8/soap/rpc/driver.rb:178:in `call''
c:/ruby-1.8.4/lib/ruby/1.8/soap/rpc/driver.rb:232:in `nDFDgen''
c:/ruby-1.8.4/lib/ruby/1.8/soap/wsdlDriver.rb:117:in `NDFDgen''


>
> --
> ~akk
> http://therealadam.com
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>