problem about savon-Collection of common programming errors


  • Boris
    ruby web-services savon
    I am trying to call a web service using Savon. The request I am trying to generate is this (this is a valid request that is working, generated with wizdler):<Envelope xmlns=”http://schemas.xmlsoap.org/soap/envelope/”><Body><FraudValidationRequest xmlns=”http://schemas.gid.gap.com/fraudvalidation/v3″><OrderHeader xmlns=””><EntryType>1</EntryType> …. more attributesBut I get something like this:<?xml version=”1.0″ encoding=”UTF-8″?> <env:Envelope xmln

  • Alex Peattie
    ruby soap savon
    How can I add an encoding attribute to the body tag using Savon?Some background: I am trying to use savon to connect to a SOAP resource. I can get the WSDL file and browse through the methods.@client = Savon::Client.new(“http://some.domain.com/v2messaging/service?WSDL”)when I try to use the login methodresponse = @client.request :service, :login dosoap.body = { “String_1” => “username”,”String_2″ => “password”} endI get this error:Failure/Error: response = @client.request :service, :login

  • Artem Zankovich
    ruby-on-rails-3 soap soapui savon
    I always use SoapUI before moving on with Savon to see if my URL is correct. Now this time I was given a URL that (probably from a project developed and hosted on a Windows machine), let’s say it is this one:www.myservice.com/login/eeu.aspx?WSDLNow when I try this, I get this:Error loading [www.myservice.com/login/eeu.aspx?WSDL]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 3): ‘&’SoapUI will also do HTTP requests righ

  • Amin Y
    ruby-on-rails soap wsdl savon
    I want to use a webservice with a method “verifyTransaction” that get two strings as input and return a double as output. I used the code below for that:client = Savon::Client.new do |wsdl|wsdl.document = “https://www.myserver.com/ReferencePayment?WSDL” endresponse = client.request :wsdl, “verifyTransaction” dosoap.body ={“RefNum” => “121312”, “MerchantID” => “02233763”} endbut the I got this error:Savon::SOAP::Fault ((env:Client) caught exception while handling request: unexpected encodin

  • franklin stine
    ruby-on-rails-3.2 axis2 savon
    I’m trying to call a simple operation with Savon, but it keeps throwingSavon::SOAPFault ((soapenv:Server) org.apache.axis2.databinding.ADBException: Unexpected subelement OperationRequest):Here’s my two lines that are throwing this:client = Savon.client(wsdl: ‘http://wsdl_location’) response = client.call(:operation, message: { id: id })

  • Envek
    ruby web-services soap bing-api savon
    I’m trying to use Bing Translator SOAP API (due to in HTTP API I’m getting 414 “Request too long” for not so big requests due to UTF-8 serialization).So, I’m playing with bing_translator gem source trying to switch it from HTTP inerface to SOAP one using Savon SOAP toolkit.My workflow as follows (access token getting function not shown):WSDL_URI = ‘http://api.microsofttranslator.com/V2/soap.svc?wsdl’get_access_token client = Savon.client(wsdl: WSDL_URI, headers: {‘Authorization’ => “Bearer #{

  • Phrogz
    ruby block instance-variables savon
    Forgive me, guys. I am at best a novice when it comes to Ruby. I’m just curious to know the explanation for what seems like pretty odd behavior to me.I’m using the Savon library to interact with a SOAP service in my Ruby app. What I noticed is that the following code (in a class I’ve written to handle this interaction) seems to pass empty values where I expect the values of member fields to go:create_session_response = client.request “createSession” dosoap.body = {:user => @user, # This ends

  • Pravin Mali
    ruby soap savon
    I currently working on new project and I am pretty much new to savon. I am currently using ruby-1.8.7 and savon-1.0.0 and I have below SOAP XML request<soapenv:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:web=”http://webservices”> <soapenv:Header/> <soapenv:Body> <web:InvokeComponent1 soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”

  • rubiii
    ruby soap savon
    I am having trouble parsing a SOAP response.Here is my code:require ‘rubygems’ require ‘savon’client = Savon::Client.new “http://1.2.3.4/xyz/abcd/fsds.wsdl”res = client.query_unpaid_assesments do |soap,wsse|soap.namespaces[“xmlns:SOAP-ENV”] = “http://schemas.xmlsoap.org/soap/envelope/”soap.namespaces[“xmlns:xsi”] = “http://www.w3.org/2001/XMLSchema-instance”soap.namespaces[“xmlns:xsd”] = “http://www.w3.org/2001/XMLSchema”wsse.username=”xyz”wsse.password=”123″soap.body = {:orderNumber => 11122

  • Ya.
    ruby-on-rails soap savon
    I’m using savon 2.2 for making SOAP calls.Initialize:client = Savon.client(wsdl: SOAP_WSDL,endpoint: SOAP_URL)I can make a SOAP call like this and it works fine:resp = client.call(:login, message: { username: SOAP_USER, password: SOAP_PASSWORD })Now I need to make another call which requires setting some parameters in the SOAP header. From the documentation on savorb.com I found I should use the request method:response = client.request :get_user_info dosoap.header = { :session_id => sid }end

  • Erik Landerholm
    ruby soap wsdl savon
    I admit I’m new to both SOAP and Savon, but I got it working with another service, but this one is stumping me.The WSDL is here: http://stg-wholesale.carsdirect.com/ws/services/Ping?WSDLThe Document when done should look like this:<?xml version=”1.0″ encoding=”utf-8″?> <soap:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”xmlns:xsd=”http://www.w3.org/2001/XMLSchema”xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”><soap:Body><dealerPing xmlns=”http://whole

  • coreyward
    ruby-on-rails ruby-on-rails-3 soap savon
    I created a data model, I am using mysql database. I use savon for handling SOAP requests. On the console I can see SOAP controller debug creating data. Most of the part of part of is working, expect saving the created information.How do I bring in the save method? I want to save the successfully received response from a soap request. The actual code is big, so trying skip posting it here. I will post if required. rails g model ticket ticket_num:string t_status:string priority:string solution:s

  • Detlef
    ruby-on-rails rspec savon
    For automated tests I try to mock a savon-created soap request (to JIRA API).@client = Savon::Client.new(JIRA_URL) @client.http.auth.ssl.verify_mode = :nonesavon.expects(:login).with(“in0″ => JIRA_USER,”in1” => JIRA_PW)login = @client.request :soap, :login dosoap.body = {“in0” => JIRA_USER, “in1” => JIRA_PW}The Soap request itself works fine, but using savon.expects… always leads to this not really explaining error message:Failures:1) issues.all should be successful to return a

  • rorra
    ruby savon
    I’m having an exception when trying to build custom headers with Savon 2.1.0 for Authentication, here is the sample code to reproduce the issue, I’ll appreciate any help on this subject.require ‘open-uri’ require ‘savon’headers = {‘IvansWSAuthentication’ => {‘User’ => ‘my_user’,’Password’ => ‘my_pass’,’ClientId’ => ‘my_client_id’} }x12 = ‘test’client = Savon.client(wsdl: ‘https://limeservices.ivans.com/EligibilityOne.asmx?WSDL’,headers: headers )request_params = {form270: x12 }respon

  • Eric Hu
    ruby gem savon
    I’m getting the above error in a gem with this code snippetSavon.configure do |config|config.log = falseconfig.log_level = :errorHTTPI.log = false endThis code used to pass in past runs on Travis, so I’m not sure why this changed when I altered the Readme.

  • Bobby B
    ruby web-services soap savon
    I’m attempting to utilize the ruby gem Savon to connect to a web service provided by propertyware (http://propertyware.com/apidocs/Getting-Started). I’ve successfully connected to the service via SoapUI and executed an echoString request. When I try to do the same via Ruby I get a null user authentication error.Here’s what I’ve tried in Ruby…require ‘rubygems’ require ‘savon’client = Savon::Client.new dowsdl.document = ‘http://propertyware.com/pw/services/PWServices?wsdl’wsse.credentials ‘us

  • hso
    soap ruby-on-rails-3.1 savon
    I am trying to configure my rails app to talk to a soap webservice using this code:client = Savon::Client.new dowsdl.document = “http://services.carsolize.com/BookingServices/dynamicdataservice.svc?wsdl” endresponse = client.request “ServiceRequest”, “xmlns” => “http://tempuri.org/” do |soap, wsdl|client.http.headers[“SOAPAction”] = ‘”http://tempuri.org/IDynamicDataService/ServiceRequest”‘soap.body = {“rqst” => {“Credentials” => {“UserName” => ‘user’,”Password” => ‘pass’},”Reques

Web site is in building

I discovery a place to host code、demo、 blog and websites.
Site access is fast but not money