I'm using the Savon
gem to interact with a WSDL
. For some reason, Savon
is using env
as a namespace instead of soapenv
.
How do I make Savon
generate requests with the soapenv
namespace, rather than the env
namespace?
I'm using the Savon
gem to interact with a WSDL
. For some reason, Savon
is using env
as a namespace instead of soapenv
.
How do I make Savon
generate requests with the soapenv
namespace, rather than the env
namespace?
There is a special property for this:
Savon.env_namespace = :soapenv
With this property set Savon will generate requests like this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://www.examples.com/wsdl/HelloService.wsdl"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<wsdl:sayHello></wsdl:sayHello>
</soapenv:Body>
</soapenv:Envelope>