lib/lolsoap/envelope.rb in lolsoap-0.1.4 vs lib/lolsoap/envelope.rb in lolsoap-0.2.0

- old
+ new

@@ -4,14 +4,14 @@ module LolSoap class Envelope attr_reader :wsdl, :operation, :doc # @private - SOAP_PREFIX = 'soap' + SOAP_1_1 = 'http://schemas.xmlsoap.org/soap/envelope/' # @private - SOAP_NAMESPACE = 'http://www.w3.org/2003/05/soap-envelope' + SOAP_1_2 = 'http://www.w3.org/2003/05/soap-envelope' def initialize(wsdl, operation, doc = Nokogiri::XML::Document.new) @wsdl = wsdl @operation = operation @doc = doc @@ -52,19 +52,23 @@ def output_type operation.output end - def to_xml - doc.to_xml + def to_xml(options = {}) + doc.to_xml(options) end def soap_prefix - SOAP_PREFIX + 'soap' end def soap_namespace - SOAP_NAMESPACE + soap_version == '1.2' ? SOAP_1_2 : SOAP_1_1 + end + + def soap_version + wsdl.soap_version end private # @private