Last active
June 2, 2017 17:17
-
-
Save JosiahSiegel/1e1d90210726322031b3 to your computer and use it in GitHub Desktop.
#Rails Use Savon to make SOAP request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.soap_method(input) | |
c = Savon.client(wsdl: 'http://0.0.0.0/path_of_wsdl.wsdl', ssl_verify_mode: :none) | |
r = c.call(:soap_method, xml: | |
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:com='http://www.company.com'> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<com:SoapMethod> | |
<com:input> | |
<!--Soap Body--> | |
</com:input> | |
</com:SoapMethod> | |
</soapenv:Body> | |
</soapenv:Envelope>") | |
r.body[:response] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment