the below code, generates the following xml.
as you may see the the smaller/greater signs are not showing as '<' or '>' and the server is not happy about this.
any hint/suggestions are appreciated. Thanks!
<env:Body>
<find>
<filter><and><equal name="foo" value="1"/></and></filter>
</find>
</env:Body>
def find
s_xml = Builder::XmlMarkup.new
s_xml.and do
s_xml.equal(:name => "foo", :value => 1)
end
body = {
:filter => [s_xml.target!],
}
_send_query :find, body
end
def _send_query method, body, server=@primary_server
client = Savon::client do
wsdl.endpoint = server
wsdl.namespace = server
end
client.config.pretty_print_xml = true
response = client.request method do
soap.body = body
end
return response.to_hash
end
the answer is put an exclamation mark, (not ampersand @rubiii) like: :filter! => [s_xml.target!]
<< after the filter!!