I'm trying to use an xml web service soap client in node and I'm not sure how to add the soap header for my example.
Looking at strong-soap, there is a method addSoapHeader(value, qname, options) but I'm not sure what I need to pass in as qname and options in this case.
My request that I need to send
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://schemas.foo.com/webservices/authentication" xmlns:hot="http://foo.com/webservices/hotelv3" xmlns:hot1="http://schemas.foo.com/webservices/hotelv3"> <soapenv:Header> <aut:AuthenticationHeader> <aut:LoginName>foo</aut:LoginName> <aut:Password>secret</aut:Password> <aut:Culture>en_US</aut:Culture> <aut:Version>7.123</aut:Version> </aut:AuthenticationHeader> </soapenv:Header> <soapenv:Body> <hot:BookHotelV3> <!--Optional:--> <hot:request> <hot1:RecordLocatorId>0</hot1:RecordLocatorId> <!--Optional:--> <hot1:RoomsInfo> <!--Zero or more repetitions:--> <hot1:RoomReserveInfo> <hot1:RoomId>123</hot1:RoomId> <hot1:ContactPassenger> <hot1:FirstName>Joe</hot1:FirstName> <hot1:LastName>Doe</hot1:LastName> </hot1:ContactPassenger> <hot1:AdultNum>2</hot1:AdultNum> <hot1:ChildNum>0</hot1:ChildNum> </hot1:RoomReserveInfo> </hot1:RoomsInfo> <hot1:PaymentType>Obligo</hot1:PaymentType> </hot:request> </hot:BookHotelV3> </soapenv:Body> </soapenv:Envelope> Should value be:
value = { LoginName:'foo', Password:'secret', Culture:'en_US', Version:7.123 } Then what should qname be? auth:AuthenticationHeader? Where do I specify the namespace?
Is there an easier example with node-soap? Should I use strong-soap or node-soap?