Set svc = Server.CreateObject("MSSOAP.SoapClient30")
svc.MSSoapInit( ...... )
results = svc.getRelatedDocuments(docId)
Response.Write "Numbers of elements in array: " & UBound(results) + 1 '
causes Subscript out of range error
How should I handle this in ASP/VB Script which supports only variants?
Is there a problem in receiving complex types (array of strings in my case)
through SOAP in VB Script client program?
--- Snipet from WSDL: ----
<wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ArrayOf_xsd_string">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]" />
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
- <wsdl:message name="getRelatedDocumentsRequest">
<wsdl:part name="in0" type="xsd:string" />
</wsdl:message>
- <wsdl:message name="getRelatedDocumentsResponse">
<wsdl:part name="getRelatedDocumentsReturn" type="intf:ArrayOf_xsd_string"
/>
</wsdl:message>
--- end snipet ---
Thanks,
Lena
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 24/04/03
"Lena Razov" <lra...@nospam.flexsoft.com.au> wrote in message
news:10517693...@shorty.flexsoft.com.au...
svc.MSSoapInit ("http://localhost:4804/services/InfoWrangler?wsdl")
Am I doing anything wrong? I'm a newbie to SOAP TK 3.0.
Thanks,
Lena
"Jason" <ja...@nospam.com> wrote in message
news:ennJl$CEDHA...@TK2MSFTNGP11.phx.gbl...
Here is an example:
*********************************************
<%@ LANGUAGE=VBScript %>
<%
Option Explicit
'On Error Resume Next
Dim i ' Loop counter
Dim lngReturn
dim intDone
dim doEvent ' Call a small DLL whose entire purpose is to return
control to
' the OS mementarily using a VB DoEvents method.
Dim xNodeList ' IXMLDOMNodeList
Dim xNode ' IXMLDOMNode
Dim xDom ' DomDocument
' Any of the next five set statements will work. I have the latest DOM
4.0
' installed on my server.
' Set xDom = CreateObject("Microsoft.XMLDom") ' Version 1.0
' Set xDom = CreateObject("Msxml2.DOMDocument") ' Version 2.0
' Set xDom = CreateObject("Msxml2.DOMDocument.2.6") ' Version 2.6
Set xDom = CreateObject("Msxml2.DOMDocument.3.0") ' Version 3.0
' Set xDom = CreateObject("Msxml2.DOMDocument.4.0") ' Version 4.0
xDom.async = False
Set doEvent = CreateObject("prjDoEvents.basDoEvents")
intDone = 0
' This will return information for three companies, Microsoft, Intel,
and Apple.
lngReturn =
xDom.Load("http://www.xignite.com/xsecurity.asmx/LookupStock?Name=msft
intc aapl")
If lngReturn = True Then
Do Until xDom.readystate = 4
lngReturn = doEvent.DoEvents_Now ' << Calls DoEvents in a DLL
Loop
End If
' This should grab all child elements of the ArrayOfLookupItem
parent element
' Version 4.0 of the XML parser gave me some grief with this XPath
statement
' in VBScript. The same statement worked fine in Visual Basic.
With that said
' I switched back to using version 3.0 of the parser. Version 4.0
does work, just
' not with this particular XPath statement.
Set xNodeList = xDom.selectNodes("/ArrayOfLookupItem/*")
For Each xNode In xNodeList
' Write you HTML output here for parent nodes
Response.write "NodeName: " & xNode.nodeName & "<br>"
If xNode.hasChildNodes Then
For i = 0 To xNode.childNodes.length - 1
' Write your HTML output here for child nodes
Response.write "--ChildNode: " & xNode.childNodes(i).nodeName &
"=" & xNode.childNodes(i).Text & "<br>"
Next ' Node
End If
Next ' NodeList
%>
***************************************************
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"Lena Razov" <lra...@nospam.flexsoft.com.au> wrote in message
news:10518290...@shorty.flexsoft.com.au...