Who use class variables in SOAP calls with Savon?

Posted by Steffen Roller on Stack Overflow See other posts from Stack Overflow or by Steffen Roller
Published on 2011-02-06T07:15:30Z Indexed on 2011/02/06 7:25 UTC
Read the original article Hit count: 243

Filed under:
|

I'm writing a little client using Ruby and Savon. The interface changed significantly from version 0.7 to 0.8.x. All my calls don't work anymore :-(. How can I pass on a local member variable. Please see the example, @userName and @userPassword are not defined within the block.


begin
    @response = @authentication_svc.request :wsdl, "AuthenticateUser" do  
        http.headers["SOAPAction"] = "AuthenticateUser"  
        soap.body = "#{@userName}#{@passwd}"  
    end  
rescue Savon::SOAP::Fault => e  
    @last_soap_error = e.message  
end  

© Stack Overflow or respective owner

Related posts about ruby

Related posts about savon