Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert Call Web service...

Replytotopic

Call Web service

Posted in Forums : Ask a Rails expert

 
Profile

Authority 0
Posting Rating 0
Sign in to rate this post

Hello

In my rails application I am trying to call a web service wich is on
other machine and other network.
Here is the code: begin factory_chgst = SOAP::WSDLDriverFactory.new(“http://148.110.139.26/
mywebservice/services/Message?wsdl”) ... rescue puts e.message end

An error occurs on the SOAP::WSDLDriverFactory.new line. The error
message is: “no element found”.
When a type the URL on IE, I can see the wsdl, so the URL is correct
(we have a VPN configured to the communication between the 2
machines).

When, with the same code I try to call the same web service but on a
machine of the same network, there is no problem:

begin
  factory_chgst = SOAP::WSDLDriverFactory.new("http://mymachine:8080/
mywebservice/services/Message?wsdl") ... rescue puts e.message end

Anyone can help me about this problem?

Thanks

 
Profile

Authority 12
Posting Rating 96
Sign in to rate this post

Try loading http://148.110.139.26/mywebservice/services/Message?wsdl and look at what content you get returned. Compare it to http://mymachine:8080/mywebservice/services/Message?wsdl

I suspect the problem is in the web server configuration on 148.110.139.26.

Maybe try http://148.110.139.26:8080/mywebservice/services/Message?wsdl

Another possibility, you say you are using a VPN. Maybe IE is set up to use a proxy server, and your VPN lets the proxy server address connect to port 80, but when you try from ruby you are making a direct connection to port 80 from your machine and the VPN disallows it.

 
20064666954644d813e6326

Authority 0
Posting Rating 77
Sign in to rate this post

oh man… I ran into this same issue, but now can’t remember what I did to solve it.

I seem to remember it had something to do with bad data being cached from the previous attempt…

Try adding .create_rpc_driver on the end of the remote call…

driver = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver

Replytotopic

Other Recent Topics

Ask a Rails expert : Tracking down an issue

Ask a Rails expert : Thread Vs Transaction

Ask a Rails expert : implementing whitelist plugin

Ask a Rails expert : Validation helper

Ask a Rails expert : FILE EDIT/DELETE

Ask a Rails expert : decrypting the password

Ask a Rails expert : Static Objects in Rails

Ask a Rails expert : Newbie - Rake Cant Execute Test

Ask a Rails expert : Call Web service

Ask a Rails expert : RMagick issues

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel