PROTECTED FUNCTION IHeaderHandler_readHeader(toReader As MSSOAPLib30.ISoapReader,; toHeaderNode As MSXML2.IXMLDOMNode,toObject As Object) AS Boolean * ... * Get a reference to the DOMDocument object LOCAL loDOM as MSXML2.DOMDocucument.4.0 loDOM = This.GetXMLDOM() loDOM.SetProperty('SelectionNamespaces',"xmlns:x='http://tempuri.org/MyHeader'") * ... ENDFUNCIf you don't have access to the rest of the class, you can try to load the XML fragment of the SOAP header into a new temporary DOMDocument instance:
PROTECTED FUNCTION IHeaderHandler_readHeader(toReader As MSSOAPLib30.ISoapReader,; toHeaderNode As MSXML2.IXMLDOMNode,toObject As Object) AS Boolean * ... * Create a temporary DOMDocument Instance and load the XML header into it LOCAL loDOM as MSXML2.DOMDocucument.4.0 loDOM = CREATEOBJECT("MSXML2.DOMDocument.4.0") loDOM.LoadXML( toHeaderNode.Xml ) loDOM.SetProperty('SelectionNamespaces',"xmlns:x='http://tempuri.org/MyHeader'") loDOM.SelectSingleNode('/x:EnteteHere/x:FirstNode').Text * ... loDOM = null ENDFUNCMaybe it would be easier to use a DOMDocument version different than 4.0, which won't require that you use Namespace prefixes in your XPath expression when the elements are in the default Namespace:
PROTECTED FUNCTION IHeaderHandler_readHeader(toReader As MSSOAPLib30.ISoapReader,; toHeaderNode As MSXML2.IXMLDOMNode,toObject As Object) AS Boolean * ... * Create a temporary DOMDocument Instance and load the XML header into it LOCAL loDOM as MSXML2.DOMDocucument.3.0 loDOM = CREATEOBJECT("MSXML2.DOMDocument.3.0") loDOM.LoadXML( toHeaderNode.Xml ) loDOM.SelectSingleNode('/EnteteHere/FirstNode').Text * ... loDOM = null ENDFUNCHTH.