can you not use the Office Web services toolkit?
or,
Just use VBA code that depends on MSXML like so
''''''''''''''''''''''''''''''''''''''''''''''
url= "
http://dinoch.dyndns.org:7070/axis/services/StockQuote"
dim request
'' example only!
'' you need to replace this with your SOAP request
''
request= _
"<soap:Envelope" &_
" xmlns:soap='
http://schemas.xmlsoap.org/soap/envelope/'" &_
" xmlns:soapenc='
http://schemas.xmlsoap.org/soap/encoding/'" &_
" xmlns:tns='
http://localhost:7070/axis/services/StockQuote'" &_
"
xmlns:types='
http://localhost:7070/axis/services/StockQuote/encodedTypes'"
&_
" xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance'" &_
" xmlns:xsd='
http://www.w3.org/2001/XMLSchema'>" &_
"<soap:Body" &_
" soap:encodingStyle='
http://schemas.xmlsoap.org/soap/encoding/'>" &_
" <q1:getInfo xmlns:q1='
http://service'>" &_
" <symbol xsi:type='xsd:string'>IBM</symbol>" &_
" </q1:getInfo>" &_
"</soap:Body>" &_
"</soap:Envelope>"
WScript.Echo vbcrlf & "Posting request to: " & url & vbcrlf
dim xmlhttp
' must change this line to embed in MS-Excel or MS-Word
set xmlhttp = WScript.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", url, False
'xmlhttp.setRequestHeader "SOAPAction", "oof" ''required for Apache
AXIS, but could be anything?
xmlhttp.send request
' must use MEssageBox for debugging in MS-Exce;
WScript.Echo vbcrlf & "Raw XML response:" & vbcrlf
WSCript.Echo xmlhttp.responseXML.xml
dim response
set response= xmlhttp.responseXML ''this is an MSXML2.DOMDocument
response.setProperty "SelectionNamespaces",
"xmlns:soapenv='
http://schemas.xmlsoap.org/soap/envelope/'"
dim oneNode
set oneNode=
response.selectSingleNode("//soapenv:Envelope/soapenv:Body/soapenv:Fault")
if (oneNode is nothing) then
'set oneNode=
response.selectSingleNode("//soapenv:Envelope/soapenv:Body")
'WSCript.Echo "SOAP BODY:"
'WSCript.Echo oneNode.xml
dim price
set price=
response.selectSingleNode("//soapenv:Envelope/soapenv:Body/multiRef/lastSale
Price")
dim symbollastSalePrice
set symbol=
response.selectSingleNode("//soapenv:Envelope/soapenv:Body/multiRef/symbol")
' must replace these for embedding in MS-Excel/Word
WSCript.Echo vbcrlf & "Last sale price:"
WSCript.Echo symbol.text & ": " & price.text
else
dim faultcode
set faultcode=
response.selectSingleNode("//soapenv:Envelope/soapenv:Body/soapenv:Fault/fau
ltcode")
dim faultstring
set faultstring=
response.selectSingleNode("//soapenv:Envelope/soapenv:Body/soapenv:Fault/fau
ltstring")
dim detail
set detail=
response.selectSingleNode("//soapenv:Envelope/soapenv:Body/soapenv:Fault/det
ail")
dim detailtext
if (detail is nothing) then
detailtext = "(none)"
else
detailtext = detail.text
end if
' must replace these for embedding in MS-Excel/Word
WSCript.Echo "SOAP FAULT: " & faultcode.text & vbcrlf & " " &
faultstring.text & vbcrlf & detailtext
end if