Class: Savon::SOAP
Constant Summary collapse
- SOAPNamespace =
SOAP namespaces by SOAP version.
{ 1 => "http://schemas.xmlsoap.org/soap/envelope/", 2 => "http://www.w3.org/2003/05/soap-envelope" }
- ContentType =
Content-Types by SOAP version.
{ 1 => "text/xml", 2 => "application/soap+xml" }
Constants included from WSSE
WSSE::WSENamespace, WSSE::WSUNamespace
Class Attribute Summary collapse
-
.version ⇒ Object
Accessor for the default SOAP version.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the SOAP action.
-
#options ⇒ Object
readonly
Returns the SOAP options.
Instance Method Summary collapse
-
#body ⇒ Object
Returns the XML for a SOAP request.
-
#initialize(action, body, options, namespace_uri) ⇒ SOAP
constructor
Expects a SOAP
action
,body
,options
and thenamespace_uri
. -
#version ⇒ Object
Returns the SOAP version to use.
Methods included from WSSE
Constructor Details
#initialize(action, body, options, namespace_uri) ⇒ SOAP
Expects a SOAP action
, body
, options
and the namespace_uri
.
25 26 27 28 |
# File 'lib/savon/soap.rb', line 25 def initialize(action, body, , namespace_uri) @action, @body = action, body @options, @namespace_uri = , namespace_uri end |
Class Attribute Details
.version ⇒ Object
Accessor for the default SOAP version.
20 21 22 |
# File 'lib/savon/soap.rb', line 20 def version @version end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the SOAP action.
31 32 33 |
# File 'lib/savon/soap.rb', line 31 def action @action end |
#options ⇒ Object (readonly)
Returns the SOAP options.
34 35 36 |
# File 'lib/savon/soap.rb', line 34 def @options end |
Instance Method Details
#body ⇒ Object
Returns the XML for a SOAP request.
37 38 39 40 41 42 43 44 |
# File 'lib/savon/soap.rb', line 37 def body builder = Builder::XmlMarkup.new @xml_body ||= builder.env :Envelope, envelope_namespaces do |xml| xml.env(:Header) { envelope_header xml } xml.env(:Body) { envelope_body xml } end end |
#version ⇒ Object
Returns the SOAP version to use.
47 48 49 |
# File 'lib/savon/soap.rb', line 47 def version @options[:soap_version] || self.class.version end |