ISOAPNodes::ItemByName Property (read-only)

[propget] HRESULT ItemByName([in] BSTR Name, [in, defaultvalue(L"")] BSTR Namespace, [out, retval] ISOAPNode ** node);

This returns the first node in the collection with a matching Name & Namespace URI.


Return Values

The first node with a matching Name & Namespace URI, or if one is not found the E_INVALIDARG error is returned.


Sample Code

dim e,t,n
set e = CreateObject("pocketSOAP.Envelope.2")
set t = CreateObject("pocketSOAP.HTTPTransport.2")
' call the echoString method
e.setMethod "echoString", ""
e.Parameters.Create "InputString" , "hello world"
' but use an intermediary to log the request/response
' the intermediary acts in the role of ''
const LOG_NS = ""
set n = e.Headers.Create ("Log", "", LOG_NS) = LOG_NS
n.root = true
' create a new node as a child of the header node.
n.nodes.create "NextHop", "", LOG_NS
t.send "", e.serialize
e.parse t

wscript.echo e.Headers.ItemByName("LogInfo", LOG_NS).Value


See Also

The ISOAPNodes Interface | 




Copyright © Simon Fell, 2000-2004. All rights reserved.