0

I'd like to do some debugging on a SOAP xml response that I received from a server.

Is there a way to tell SOAP to load that response directly since I cannot replay this answer on the original server?

Thank you very much

Julien P.
  • 79
  • 1
  • 10

1 Answers1

0

I wonder if the following may help: Sending raw XML using Savon 2 ?

Community
  • 1
  • 1
Drew
  • 2,583
  • 5
  • 36
  • 54
  • Hi, thank you for your reply. Unfortunately this is not what I meant! What I'd like to do is reinject a file that I saved on my computer (SOAP XML) into savon to do some debugging. – Julien P. Aug 12 '14 at 15:16
  • I got the file using SoapUi and now, I need to find a way to process it with Savon – Julien P. Aug 12 '14 at 15:17
  • Ahhh, so you have a request built on your computer and you would like to have savon call the client with the request? – Drew Aug 12 '14 at 17:42
  • Not exactly ... I have the result of a request and I'd like to inject it into savon to process it in the exact same condition as in my future production environement. Does that make sense? – Julien P. Aug 12 '14 at 18:00
  • Yes. So are you just wanting to have savon generate a hash from the xml for you or in what way would you like for savon to process the xml? – Drew Aug 13 '14 at 15:13
  • Hello Drew, Yes, beceause if I build the hash by hand, I'm not 100% sure that it will have the same output as with Savon – Julien P. Aug 13 '14 at 18:36
  • Hey Julian, gotcha. Did the link I referenced help at all in terms of how to build a request from raw xml with savon? – Drew Aug 14 '14 at 12:43
  • Hey Drew, the link you provided is for sending xml not building from xml :( – Julien P. Aug 14 '14 at 16:10
  • @JulienP., so I do believe that if you configured savon to use whatever WSDL you're using and then use that call, then whatever raw xml you pass in would be wrapped by the `:some_op` parameter which is essentially converted to `` with the header information and what not being built around that via the values you entered when configuring the client. Does that help? – Drew Aug 15 '14 at 04:54
  • Interesting, this is exactly the point, I cannot find a way to tell savon to load my xml. What's the way to accomplish "whatever raw xml you pass in" ? – Julien P. Aug 15 '14 at 16:54
  • Hmm so what I'm thinking is that you could just use client.call(:some_op, xml: ""), setup whatever config you need to with savon, find out the name of the op in the request, place that where parameter one is, and pass the children of the node that declares the op in your raw xml as the second parameter? – Drew Aug 15 '14 at 16:57
  • Hello, sorry for the **very** late reply. It doesn't work, I tried to inject the xml into savon but could find a way to get it working ... Do you maybe have a working example ? – Julien P. Aug 31 '14 at 20:35