title: Converting raw XML query to Savon 2 Format
body: <p>I'm forced to enter the world of soap and having a bit of an issue, using Savon. </p>
  
  <p>The wsdl is: <a href="http://evernet.nwmls.com/evernetqueryservice/evernetquery.asmx?wsdl" rel="nofollow">http://evernet.nwmls.com/evernetqueryservice/evernetquery.asmx?wsdl</a>
  And if I use the test form for this data provider, I'm able to receive data without error using the following format:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="no"?&gt;
  &lt;EverNetQuerySpecification xmlns="urn:www.nwmls.com/Schemas/General/EverNetQueryXML.xsd"&gt;
    &lt;Message&gt;
  &lt;Head&gt;
    &lt;UserId&gt;my_username_here&lt;/UserId&gt;
    &lt;Password&gt;my_password_here&lt;/Password&gt;
    &lt;SchemaName&gt;StandardXML1_2&lt;/SchemaName&gt;
  &lt;/Head&gt;
  &lt;Body&gt;
    &lt;Query&gt;
      &lt;MLS&gt;nwmls&lt;/MLS&gt;
      &lt;PropertyType&gt;RESI&lt;/PropertyType&gt;
      &lt;BeginDate&gt;2014-04-20T00:25:00&lt;/BeginDate&gt;
      &lt;EndDate&gt;2014-04-22T00:25:00&lt;/EndDate&gt;
    &lt;/Query&gt;
    &lt;Filter /&gt;
  &lt;/Body&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>What I'm trying to do with Savon 2.2 to replicate this in my rails app is:</p>
  
  <pre><code>client = Savon.client(:wsdl =&gt; "http://evernet.nwmls.com/evernetqueryservice/evernetquery.asmx?wsdl")
  
  response = client.call(:retrieve_listing_data) do |locals|
      locals.message "Query" =&gt; {"Head" =&gt; {"UserId" =&gt; "my_username_here", "Password" =&gt; "my_password_here", "SchemaName" =&gt; "StandardXML1_2"}, "Body" =&gt; {"MLS" =&gt; "nwmls", "PropertyType" =&gt; "RESI", "BeginDate" =&gt; "2014-04-17T00:25:00", "EndDate" =&gt; "2014-04-22T00:25:00"}}
  end
  </code></pre>
  
  <p>But I'm getting an error saying:</p>
  
  <pre><code>Value cannot be null. Parameter name: s
  </code></pre>
  
  <p>I'm a little bit lost in anything soap, but especially lost here because it seems that I'm including everything in my Savon syntax but must be missing something... </p>
  
  <p>Edit: here's the full xml response with debugging on:</p>
  
  <pre><code>D, [2014-04-22T16:55:52.806716 #77213] DEBUG -- : HTTPI GET request to evernet.nwmls.com (net_http)
  I, [2014-04-22T16:55:54.340990 #77213]  INFO -- : SOAP request: http://evernet.nwmls.com/evernetqueryservice/evernetquery.asmx
  I, [2014-04-22T16:55:54.341077 #77213]  INFO -- : SOAPAction: "http://www.nwmls.com/EverNetServices/RetrieveListingData", Content-Type: text/xml;charset=UTF-8, Content-Length: 682
  D, [2014-04-22T16:55:54.341120 #77213] DEBUG -- : &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.nwmls.com/EverNetServices" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;env:Body&gt;&lt;tns:RetrieveListingData&gt;&lt;tns:Query&gt;&lt;tns:Head&gt;&lt;tns:Head&gt;hoverboard&lt;/tns:Head&gt;&lt;tns:Password&gt;cP6cHias&lt;/tns:Password&gt;&lt;tns:SchemaName&gt;StandardXML1_2&lt;/tns:SchemaName&gt;&lt;/tns:Head&gt;&lt;tns:Body&gt;&lt;tns:MLS&gt;nwmls&lt;/tns:MLS&gt;&lt;tns:PropertyType&gt;RESI&lt;/tns:PropertyType&gt;&lt;tns:BeginDate&gt;2014-04-17T00:25:00&lt;/tns:BeginDate&gt;&lt;tns:EndDate&gt;2014-04-22T00:25:00&lt;/tns:EndDate&gt;&lt;/tns:Body&gt;&lt;/tns:Query&gt;&lt;/tns:RetrieveListingData&gt;&lt;/env:Body&gt;&lt;/env:Envelope&gt;
  D, [2014-04-22T16:55:54.341255 #77213] DEBUG -- : HTTPI POST request to evernet.nwmls.com (net_http)
  I, [2014-04-22T16:55:54.678125 #77213]  INFO -- : SOAP response (status 200)
  D, [2014-04-22T16:55:54.678292 #77213] DEBUG -- : &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;soap:Body&gt;&lt;RetrieveListingDataResponse xmlns="http://www.nwmls.com/EverNetServices"&gt;&lt;RetrieveListingDataResult&gt;&amp;lt;Listings&amp;gt;
    &amp;lt;ResponseMessages&amp;gt;
      &amp;lt;Message&amp;gt;Value cannot be null.
  Parameter name: s&amp;lt;/Message&amp;gt;
    &amp;lt;/ResponseMessages&amp;gt;
  &amp;lt;/Listings&amp;gt;&lt;/RetrieveListingDataResult&gt;&lt;/RetrieveListingDataResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
   =&gt; #&lt;Savon::Response:0x007f844230e4e0 @http=#&lt;HTTPI::Response:0x007f844230fc00 @code=200, @headers={"cache-control"=&gt;"private, max-age=0", "content-type"=&gt;"text/xml; charset=utf-8", "server"=&gt;"Microsoft-IIS/7.5", "x-aspnet-version"=&gt;"4.0.30319", "x-powered-by"=&gt;"ASP.NET", "date"=&gt;"Tue, 22 Apr 2014 23:55:54 GMT", "content-length"=&gt;"574"}, @raw_body="&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&gt;&lt;soap:Body&gt;&lt;RetrieveListingDataResponse xmlns=\"http://www.nwmls.com/EverNetServices\"&gt;&lt;RetrieveListingDataResult&gt;&amp;lt;Listings&amp;gt;\r\n  &amp;lt;ResponseMessages&amp;gt;\r\n    &amp;lt;Message&amp;gt;Value cannot be null.\r\nParameter name: s&amp;lt;/Message&amp;gt;\r\n  &amp;lt;/ResponseMessages&amp;gt;\r\n&amp;lt;/Listings&amp;gt;&lt;/RetrieveListingDataResult&gt;&lt;/RetrieveListingDataResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;", @body="&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&gt;&lt;soap:Body&gt;&lt;RetrieveListingDataResponse xmlns=\"http://www.nwmls.com/EverNetServices\"&gt;&lt;RetrieveListingDataResult&gt;&amp;lt;Listings&amp;gt;\r\n  &amp;lt;ResponseMessages&amp;gt;\r\n    &amp;lt;Message&amp;gt;Value cannot be null.\r\nParameter name: s&amp;lt;/Message&amp;gt;\r\n  &amp;lt;/ResponseMessages&amp;gt;\r\n&amp;lt;/Listings&amp;gt;&lt;/RetrieveListingDataResult&gt;&lt;/RetrieveListingDataResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;"&gt;, @globals=#&lt;Savon::GlobalOptions:0x007f8447489a40 @option_type=:global, @options={:encoding=&gt;"UTF-8", :soap_version=&gt;1, :namespaces=&gt;{}, :logger=&gt;#&lt;Logger:0x007f84474899c8 @progname=nil, @level=0, @default_formatter=#&lt;Logger::Formatter:0x007f84474899a0 @datetime_format=nil&gt;, @formatter=nil, @logdev=#&lt;Logger::LogDevice:0x007f8447489950 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#&lt;IO:&lt;STDOUT&gt;&gt;, @mutex=#&lt;Logger::LogDevice::LogDeviceMutex:0x007f8447489928 @mon_owner=nil, @mon_count=0, @mon_mutex=#&lt;Mutex:0x007f84474898d8&gt;&gt;&gt;&gt;, :log=&gt;true, :filters=&gt;[], :pretty_print_xml=&gt;false, :raise_errors=&gt;true, :strip_namespaces=&gt;true, :convert_response_tags_to=&gt;#&lt;Proc:0x007f8447489860@/Users/seth/.rvm/gems/ruby-2.0.0-p195/gems/savon-2.4.0/lib/savon/options.rb:56 (lambda)&gt;, :multipart=&gt;false, :wsdl=&gt;"http://evernet.nwmls.com/evernetqueryservice/evernetquery.asmx?wsdl"}&gt;, @locals=#&lt;Savon::LocalOptions:0x007f84443732a8 @option_type=:local, @options={:advanced_typecasting=&gt;true, :response_parser=&gt;:nokogiri, :multipart=&gt;false, :message=&gt;{"Query"=&gt;{"Head"=&gt;{"Head"=&gt;"my_username", "Password"=&gt;"my_password", "SchemaName"=&gt;"StandardXML1_2"}, "Body"=&gt;{"MLS"=&gt;"nwmls", "PropertyType"=&gt;"RESI", "BeginDate"=&gt;"2014-04-17T00:25:00", "EndDate"=&gt;"2014-04-22T00:25:00"}}}}&gt;&gt; 
  </code></pre>