├── rails ├── .keep ├── log │ └── .keep ├── app │ ├── mailers │ │ └── .keep │ ├── models │ │ ├── .keep │ │ └── concerns │ │ │ └── .keep │ ├── assets │ │ ├── images │ │ │ ├── .keep │ │ │ └── testpicture.jpeg │ │ ├── stylesheets │ │ │ ├── ones_soap.scss │ │ │ └── application.css │ │ └── javascripts │ │ │ ├── ones_soap.coffee │ │ │ └── application.js │ ├── controllers │ │ ├── concerns │ │ │ └── .keep │ │ ├── ones_soap_controller.rb │ │ └── application_controller.rb │ ├── helpers │ │ ├── ones_soap_helper.rb │ │ └── application_helper.rb │ └── views │ │ ├── ones_soap │ │ ├── testFiles.html.erb │ │ ├── testText.html.erb │ │ ├── testNumbers.html.erb │ │ └── testObjects.html.erb │ │ └── layouts │ │ └── application.html.erb ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ └── .keep ├── test │ ├── models │ │ └── .keep │ ├── controllers │ │ ├── .keep │ │ └── ones_soap_controller_test.rb │ ├── fixtures │ │ └── .keep │ ├── helpers │ │ └── .keep │ ├── integration │ │ └── .keep │ ├── mailers │ │ └── .keep │ └── test_helper.rb ├── public │ ├── favicon.ico │ ├── testpicture.jpeg │ ├── robots.txt │ ├── 500.html │ ├── 422.html │ └── 404.html ├── vendor │ └── assets │ │ ├── javascripts │ │ └── .keep │ │ └── stylesheets │ │ └── .keep ├── bin │ ├── bundle │ ├── rake │ ├── rails │ ├── spring │ └── setup ├── config │ ├── boot.rb │ ├── initializers │ │ ├── cookies_serializer.rb │ │ ├── session_store.rb │ │ ├── mime_types.rb │ │ ├── filter_parameter_logging.rb │ │ ├── backtrace_silencers.rb │ │ ├── assets.rb │ │ ├── wrap_parameters.rb │ │ └── inflections.rb │ ├── environment.rb │ ├── database.yml │ ├── locales │ │ └── en.yml │ ├── secrets.yml │ ├── application.rb │ ├── environments │ │ ├── development.rb │ │ ├── test.rb │ │ └── production.rb │ └── routes.rb ├── config.ru ├── Rakefile ├── db │ └── seeds.rb ├── README.rdoc ├── Gemfile └── Gemfile.lock ├── .gitignore ├── 1c8 ├── OnecSoapClient.epf └── OnecDownloadFileByHttpGET.epf ├── _vendors ├── SOAPЗагрузкаКурсовВалютЦБР │ ├── README.txt │ ├── SOAPЗагрузкаКурсовВалютЦБР.epf │ └── article.htm ├── OnesSendReceiveFileWithREST.epf ├── OnecSoapRssAggregator │ └── RSSАгрегатор.epf └── onec_trash_code.txt ├── _screenshots ├── rais_server.png ├── chrome_wsdl_url.png ├── onec_settings.png ├── onec_file_upload.png └── onec_file_download.png └── README.md /rails/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rails/app/helpers/ones_soap_helper.rb: -------------------------------------------------------------------------------- 1 | module OnesSoapHelper 2 | end 3 | -------------------------------------------------------------------------------- /rails/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | !1c8/db/.keep 3 | 1c8/db/* 4 | rails/tmp/ 5 | rails/db/*.sqlite3 6 | rails/log/* -------------------------------------------------------------------------------- /1c8/OnecSoapClient.epf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/1c8/OnecSoapClient.epf -------------------------------------------------------------------------------- /_vendors/SOAPЗагрузкаКурсовВалютЦБР/README.txt: -------------------------------------------------------------------------------- 1 | Статья взята отсюда: 2 | http://habrahabr.ru/post/148658/ -------------------------------------------------------------------------------- /_screenshots/rais_server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_screenshots/rais_server.png -------------------------------------------------------------------------------- /rails/public/testpicture.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/rails/public/testpicture.jpeg -------------------------------------------------------------------------------- /_screenshots/chrome_wsdl_url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_screenshots/chrome_wsdl_url.png -------------------------------------------------------------------------------- /_screenshots/onec_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_screenshots/onec_settings.png -------------------------------------------------------------------------------- /1c8/OnecDownloadFileByHttpGET.epf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/1c8/OnecDownloadFileByHttpGET.epf -------------------------------------------------------------------------------- /_screenshots/onec_file_upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_screenshots/onec_file_upload.png -------------------------------------------------------------------------------- /_screenshots/onec_file_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_screenshots/onec_file_download.png -------------------------------------------------------------------------------- /rails/app/views/ones_soap/testFiles.html.erb: -------------------------------------------------------------------------------- 1 |
Find me in app/views/ones_soap/testFiles.html.erb
3 | -------------------------------------------------------------------------------- /rails/app/views/ones_soap/testText.html.erb: -------------------------------------------------------------------------------- 1 |Find me in app/views/ones_soap/testText.html.erb
3 | -------------------------------------------------------------------------------- /rails/app/views/ones_soap/testNumbers.html.erb: -------------------------------------------------------------------------------- 1 |Find me in app/views/ones_soap/testNumbers.html.erb
3 | -------------------------------------------------------------------------------- /rails/app/views/ones_soap/testObjects.html.erb: -------------------------------------------------------------------------------- 1 |Find me in app/views/ones_soap/testObjects.html.erb
3 | -------------------------------------------------------------------------------- /_vendors/OnesSendReceiveFileWithREST.epf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_vendors/OnesSendReceiveFileWithREST.epf -------------------------------------------------------------------------------- /rails/app/assets/images/testpicture.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/rails/app/assets/images/testpicture.jpeg -------------------------------------------------------------------------------- /_vendors/OnecSoapRssAggregator/RSSАгрегатор.epf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_vendors/OnecSoapRssAggregator/RSSАгрегатор.epf -------------------------------------------------------------------------------- /rails/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /rails/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /rails/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /rails/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /rails/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_soapws_session' 4 | -------------------------------------------------------------------------------- /_vendors/SOAPЗагрузкаКурсовВалютЦБР/SOAPЗагрузкаКурсовВалютЦБР.epf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexKalinin/ws-soap-rails-1c/HEAD/_vendors/SOAPЗагрузкаКурсовВалютЦБР/SOAPЗагрузкаКурсовВалютЦБР.epf -------------------------------------------------------------------------------- /rails/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /rails/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError 5 | end 6 | require_relative '../config/boot' 7 | require 'rake' 8 | Rake.application.run 9 | -------------------------------------------------------------------------------- /rails/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /rails/app/assets/stylesheets/ones_soap.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the OnesSoap controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /rails/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /rails/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /rails/app/assets/javascripts/ones_soap.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /rails/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError 5 | end 6 | APP_PATH = File.expand_path('../../config/application', __FILE__) 7 | require_relative '../config/boot' 8 | require 'rails/commands' 9 | -------------------------------------------------------------------------------- /rails/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /rails/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /rails/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 7 | fixtures :all 8 | 9 | # Add more helper methods to be used by all tests here... 10 | end 11 | -------------------------------------------------------------------------------- /rails/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |If you are the application owner check the logs for more information.
64 |Maybe you tried to change something you didn't have access to.
63 |If you are the application owner check the logs for more information.
65 |You may have mistyped the address or the page may have moved.
63 |If you are the application owner check the logs for more information.
65 |



&НаКлиенте
385 | Процедура ЗагрузитьВалюты(Команда)
386 |
387 | Если НЕ ЗначениеЗаполнено(ДатаЗагрузки) Тогда
388 | Сообщить("Не выбрана дата загрузки!", СтатусСообщения.Важное);
389 | Возврат;
390 | КонецЕсли;
391 |
392 | ТаблицаКурсовВалют.Очистить();
393 | ЗагрузитьКурсыВалют(ДатаЗагрузки);
394 |
395 | КонецПроцедуры
396 | Процедура ЗагрузитьКурсыВалют(фДатаЗагрузки)
402 |
403 | //Создаем прокси для обращения к внешнему веб-сервису,
404 | // передаем в функцию URI пространства имен, имя сервиса, имя порта.
405 | Прокси = WSСсылки.CBR_DailyInfoWebServ.СоздатьWSПрокси(
406 | "http://web.cbr.ru/", "DailyInfo", "DailyInfoSoap");
407 |
408 | //Получаем тип параметра, который передается в метод GetCursOnDate.
409 | ТипWSПараметра = Прокси.ФабрикаXDTO.Пакеты.Получить(
410 | "http://web.cbr.ru/").Получить("GetCursOnDate");
411 | //Создаем параметр на основе типа и заполняем значение параметра On_Date.
412 | WSПараметр = Прокси.ФабрикаXDTO.Создать(ТипWSПараметра);
413 | WSПараметр.On_Date = фДатаЗагрузки;
414 |
415 | //Вызываем метод веб-сервиса, записываем результат в переменную КурсыВалют.
416 | КурсыВалют = Прокси.GetCursOnDate(WSПараметр);
417 |
418 | //Перебираем таблицу ValuteCursOnDate, каждое значение таблицы
419 | // добавляем в таблицу на форме (колонки заполняем соответствующими значениями).
420 | Для Каждого Элемент Из КурсыВалют.GetCursOnDateResult.diffgram.ValuteData.ValuteCursOnDate Цикл
421 | НоваяСтрокаТЗ = ТаблицаКурсовВалют.Добавить();
422 | НоваяСтрокаТЗ.НазваниеВалюты = Элемент.Vname;
423 | НоваяСтрокаТЗ.Номинал = Элемент.Vnom;
424 | НоваяСтрокаТЗ.ЦифровойКодВалюты = Элемент.Vcode;
425 | НоваяСтрокаТЗ.СимвольныйКодВалюты = Элемент.VChCode;
426 | НоваяСтрокаТЗ.КурсВалюты = Элемент.Vcurs;
427 | КонецЦикла;
428 |
429 | КонецПроцедуры
430 | 

Прокси = WSСсылки.CBR_DailyInfoWebServ.СоздатьWSПрокси("http://web.cbr.ru/", "DailyInfo", "DailyInfoSoap");
444 | Определения = Новый WSОпределения("http://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx?WSDL");
448 | Прокси = Новый WSПрокси(Определения, "http://web.cbr.ru/", "DailyInfo", "DailyInfoSoap");
449 | Только зарегистрированные пользователи могут оставлять комментарии. Войдите, пожалуйста.
1679 | 1680 | 1681 | 1682 | 1683 | 1692 | 1693 |
Комментарии (13) 979 | 980 | 981 |
982 | 983 | 984 | 985 |