1

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?

Lahiru Jayaratne
  • 1,684
  • 4
  • 31
  • 35
Michael
  • 552
  • 1
  • 6
  • 19

2 Answers2

1
Savon.config.env_namespace = :soapenv
edtsech
  • 1,167
  • 2
  • 11
  • 17
0

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>
Aliaksei Kliuchnikau
  • 13,589
  • 4
  • 59
  • 72