Array params in VB Script w/Soap Toolkit 3.0
Harris Stein <[email protected]> Fri, 24 Jan 2003 07:12:22 -0800
| Newsgroups | gmane.comp.windows.devel.soap.general |
|---|---|
| Message-ID | <SOAP%[email protected]> |
Hi, I have a web service written in C#, which has some string[] parameters.
I can successfully create web references to this using C# or VB.NET and
call the service. However, using Microsoft's Soap Toolkit 3.0, I am having
trouble. Here's the code I am trying:
Option Explicit
Dim Report
Dim appLinkService
Dim Answer
Dim WsdlFile
Dim FSO
Dim periods
'Dim Request
Set FSO = CreateObject("Scripting.FileSystemObject")
WsdlFile = FSO.BuildPath(FSO.GetParentFolderName
(WScript.ScriptFullName), "AppLinkFinancials.wsdl")
Set appLinkService = CreateObject("MSSOAP.SoapClient30")
WsdlFile, "", "Reports", "ReportsSoap", "http://api.onesource.com/AppLink"
appLinkService.MSSoapInit WsdlFile, "", "", ""
periods = Array("A0")
Set Report = appLinkService.GetFinancialReportByProduct
("19147","BalanceSheet",periods,"usfr","USD","USBBAPPLINK")
For Each node in Report
WScript.Echo "Report:" & Report
Next
In the WSDL, the periods param is defined as:
<xs:simpleType name="PeriodType">
<xs:restriction base="xs:string">
<xs:pattern value="([0-9]{4}(Q[1-
4])?)|((A|Q)(0|[-][1-5]))"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ArrayOfPeriod">
<xs:sequence>
<xs:element name="Period"
type="t:PeriodType" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
So, my thoughts are either the WSDL definition is wrong, the VB code is
wrong, or both. Any ideas? Thanks!
Harris Stein
You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.