milewise/node-soap — pull request #23 by ennui2342 (2012-02-23 12:57:55+00:00)
Title: Adding namespaces to Envelope

Hi,

I made this change as I am using node-soap to access Exchange web services. In my case each element in the message needs to be namespaced and there is no overall wrapping element. ie this is for setting the out of office message by calling SetUserOofSettings:

{
"t:Mailbox": {
"t:Address": "me@example.com"
},
"t:UserOofSettings": {
"t:OofState": "Disabled",
"t:ExternalAudience": "All",
"t:InternalReply": {
"t:Message": "I have left the building"
},
"t:ExternalReply": {
"t:Message": "How may I help you?"
}
}
}

As you can see I have added support for indicating the namespace in the element name which is then pulled from the wsdl into the Envelope. I'm not sure if this is the right way to do this, I'm no expert on SOAP, but you or others might find this useful.

-Mark