Hi there
I want to connect to a web service on-the-fly programmatically like so:
WS.mssoapinit(http://paul/stddemo/ws/service.asmx?wsdl)
which is successful. I can access the web service
RetVal = WS.LogIn("B", "B", "StdDemo", "MyApp", ID, Message)
Now one of the methods of the web service uses a complex type
- <s:complexType name="FieldCollection">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Items"
type="tns:ArrayOfField" />
</s:sequence>
</s:complexType>
- <s:complexType name="ArrayOfField">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Field"
nillable="true" type="tns:Field" />
</s:sequence>
</s:complexType>
- <s:complexType name="Field">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Key" type="s:string"
/>
<s:element minOccurs="0" maxOccurs="1" name="Value" />
</s:sequence>
</s:complexType>
How can I define a variable to have a type of FieldCollection to pass to a
method?
I've tried this which doesn't work:
Public Class Field
Public Key As String
Public Value
End Class
Public Class FieldCollection
Public Items() As Field
End Class
dim oParams as FieldCollection.
When trying to use a method with oParams I get the error
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in microsoft.visualbasic.dll
Additional information: Client:Type conversion failure for element Params
HRESULT=0x80020005: Type mismatch.
- Client:Unspecified client error. HRESULT=0x80020005: Type mismatch.
Please could someone help me?
p