Hey man, I read your post on rails-br but I could not find it there. Give
me more details about what you are trying to do. I used Savon couple years
ago, and I think I can help you with that.

2015-12-16 15:59 GMT-02:00 Fernando Aureliano <m...@fernandoaureliano.com>:

> Hi guys!
>
> I'm trying to read and create data through SAVON with a SOAP API. I never
> worked with SOAP before, so I'm getting some problems here.
>
> This is the API I'm using:
> http://www.webmotors.com.br/IntegracaoRevendedor/wsEstoqueRevendedorWebMotors.asmx?WSDL
>
> And here the actions:
> http://www.webmotors.com.br/IntegracaoRevendedor/wsEstoqueRevendedorWebMotors.asmx
>
> The action 'IncluirCarro' is used to create a new data in api, and the
> method 'ObterModelo' read some data from APi.
>
> I'm not sure how to add data through SOAP. At the line:
> puts(webmotors.call :obter_estoque_atual) I can read the xml of some data,
> but dont know how to parse this data to load it in my view, or which
> parameter put in 'incluir_carro' method to create the register of my data
> in the APi.
>
> There is not so much tutorials or documentation from Savon website ou
> stackoverflow about how to work with it. I saw the Railscast 290, but the
> tutorial is old and it just read data.
>
> Someone have experience with Savon? I need some light here.
>
> Thanks!
>
> My model:
>
> class Webmotor < ActiveRecord::Base
> require 'savon'
>
> def initialize(car)
> wSDL = '
> http://www.webmotors.com.br/IntegracaoRevendedor/wsEstoqueRevendedorWebMotors.asmx?WSDL
> '
> webmotors = Savon.client(wsdl: wSDL,
> log: true,
> log_level: :debug,
> pretty_print_xml: true)
> puts('=========================')
> puts(webmotors.operations)
> puts(webmotors.call :obter_estoque_atual)
> #puts(webmotors.call :incluir_carro, message: {"IpvaPago"=> 'Não',
> 'RevisadoOficinaAgendaDoCarro' => 'nao'})
> puts('=========================')
>
> byebug
>
> end
> end
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/780cdb53-ee0f-494c-bbbb-8ae956211a1f%40googlegroups.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/780cdb53-ee0f-494c-bbbb-8ae956211a1f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
thiagocifani
http://about.me/thiagocifani <http://del.icio.us/thiagocifani>
<http://del.icio.us/thiagocifani>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAGNtUE_j%3Da8nUyp1ETvedOQ5-2XSYA-v_jc8Dx1_z6Ot%2Bgcy7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to