savon

How to write path to location in XML/WSDL doc in Rails?

落爺英雄遲暮 提交于 2019-12-11 01:33:52
问题 I have a WSDL doc with XSD import. <xsd:import namespace="http://site.com" schemaLocation="schema.xsd"/> WSDL tool assumes that schema is in the same directory, but load fails in rails with error <RuntimeError: Unable to find schema for "http://site.com"> I've tried write path from rails root and from system root, but with no success. I use Savon 3 to deal with WSDL in rails. SoapUI works with this schemas normally. So, what is the right way to write this path? 来源: https://stackoverflow.com

SOAP call in Ruby on Rails using Savon gets weird around the envelope and main operation

若如初见. 提交于 2019-12-10 15:19:54
问题 In a rails project using Savon.rb I am trying to make a very complex SOAP call. At least complex to the extend that Savon builders are to much trouble so I decided to manipulate the :xml directly. First of I initiate the client: @client = Savon.client( :endpoint => 'https://testservice.postnl.com/CIF_SB/BarcodeWebService/1_1/BarcodeWebService.svc', :wsdl => 'https://testservice.postnl.com/CIF_SB/BarcodeWebService/1_1/?wsdl') Then I make the call in the shape of: @request = @client.build

ruby savon and wsdl namespacing

那年仲夏 提交于 2019-12-10 15:10:45
问题 I have an issue that I believe is in regards to namespaces. The WSDL can be downloaded from here: http://promostandards.org/content/wsdl/Order%20Shipment%20NotificationService/1.0.0/OSN-1-0-0.zip When the request is generated it looks like this: <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.promostandards.org/WSDL/OrderShipmentNotificationService/1.0.0/" xmlns:soapenv="http://schemas.xmlsoap.org/soap

Cucumber / Savon omit or remove logging output

社会主义新天地 提交于 2019-12-10 14:32:42
问题 While running a cucumber test I am getting (in addition to the test results) a lot of debug/log related output in the form: D, [2013-03-06T12:21:38.911829 #49031] DEBUG -- : SOAP request: D, [2013-03-06T12:21:38.911919 #49031] DEBUG -- : Pragma: no-cache, SOAPAction: "", Content-Type: text/xml;charset=UTF-8, Content-Length: 1592 W, [2013-03-06T12:21:38.912360 #49031] WARN -- : HTTPI executes HTTP POST using the httpclient adapter D, [2013-03-06T12:21:39.410335 #49031] DEBUG -- : <?xml version

rails pass soap basic auth with savon

*爱你&永不变心* 提交于 2019-12-10 11:54:18
问题 I'm trying to send soap request with basic authentication with savon gem My soap server is set up with wash_out gem class OrdersController < ApplicationController soap_service namespace: 'sir:WashOut', wsse_username: SIRA[:auth][:username], wsse_password: SIRA[:auth][:password] .... When i make a request to soap server via savon i get an error: @client = Savon.client( wsdl: "http://localhost:3000/orders/wsdl", soap_header: { 'Username' =>SIRA[:auth][:username], 'Password' => SIRA[:auth][

how to set savon default timeout value

倖福魔咒の 提交于 2019-12-10 02:54:24
问题 I am using savon to make some api calls but its taking long time to respond because of that i am getting time out errors.so is there any way to change the default value of timeout. I am using savon 0.7.9 ruby 1.8.7 and rails -v 2.3.2. 回答1: Savon uses the gem HTTPI as interface to the transport layer. Therefore you need to change the timeout for the http calls. here an example (Savon 1.x) jira = Savon::Client.new do wsdl.document = 'http://jira.my-domain.com/rpc/soap/jirasoapservice-v2?wsdl'

Does SAVON support client side certificates authentication

一曲冷凌霜 提交于 2019-12-09 17:18:04
问题 I'm evaluating savon for consuming webservices... but I dont find any information if I can use a SSL client side certificate to authenticate against the server that provides the SOAP webservices. I read the documentation but didn't find anything about it. Does anyone know if SAVON supports client side certificate authentication? Regards Fak 回答1: the latest stable version of Savon (2.2.0 at this moment) supports SSL client certificates via global options. Please refer to the SSL section in the

invalid SOAP request needs experienced eye

吃可爱长大的小学妹 提交于 2019-12-08 11:15:09
问题 TLDR: the solution can be found here I'm using savon to make requests against a SOAP service. I know... Gross. Regardless, I'm having trouble making Savon behave. The SOAP provider has this validator, which takes the following inputs: Web Service: ProductData Version: 1.0.0 Operation: getProductSellable Endpoint: https://psproductdata100-stg.pcna.online When I use the validator, I enter this xml: <GetProductSellableRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http:/

Savon, Wasabi Error when connecting a Ruby script to a SOAP url

一个人想着一个人 提交于 2019-12-08 07:34:06
问题 Im trying to connect to a SOAP URL with a Ruby script. I am following this Railscasts episode. I installed the savon gem(savon (2.4.0)). Then in my ruby file I have this code: require 'savon' client = Savon.client(wsdl:"https://api.comscore.com/KeyMeasures.asmx?WSDL") response = client.call(:authenticate , message: { username:"xxxxx", password:"xxxxx"}) puts "#{response.inspect}" I know there is no issue with the url because I used SOAPUI and placed the WSDL URL there and I got back a

NTLM support for Savon

拜拜、爱过 提交于 2019-12-07 08:17:03
问题 I'm using Savon to communicate with SharePoint using web services. Everything is working fine if SharePoint web application supports basic authentication, but if I change it to NTLM it fails. It fails at line newclient.http.auth.ntlm(username, password) and the error message is Install the httpi-ntlm gem for experimental NTLM support . FYI I have allready installed the specified gem and am using it. 来源: https://stackoverflow.com/questions/14050567/ntlm-support-for-savon