473,382 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Using a ComplexType

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
Nov 23 '05 #1
0 1218

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Zandy Marantal | last post by:
Hello everyone, I'm having trouble using Xerces2(2.4, 2.5) when validating against an XML schema if a general entity reference is defined within the XML file. The error I'm getting is this:...
4
by: Binesh Bannerjee | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi. In another thread, Martin Honnen <mahotrash@yahoo.de> wrote: > XHTML is XML so there is no problem to use it inside of an XML document e.g. > ...
0
by: Pete | last post by:
I am trying to load a DataSet from an xml file that has 2 tables in it. Any help would be great. Here is the C# code snipit on how I load it. Instead of geting a dataset with 2 table I am...
0
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
3
by: David Elliott | last post by:
I wrote an application to scrape a database and create an XSD file which will be annotated by a map file in order to create a Typed DataSet. I was wondering if I could do the annotation using...
2
by: Ian Griffiths | last post by:
I have been given a schema, instances of which I'm required to be able to consume and generate. I'd like to be able to manipulate these instances as DataSets internally in my application. The...
0
by: XSD-optimist | last post by:
I am trying to generate the classes for an XSD schema using the Microsoft XSD Object Code Generator (XSDObjGen). I am having a schema that contains the definition of the following: 1. a complex...
3
by: C.W.Holeman II | last post by:
I am new to using XML. I am using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1. In my test I am attempting to have the style sheet:...
1
by: Mikus Sleiners | last post by:
I have a task to create xml document from c# code. I have example of that document should look like and also a xml schema. I wonder if i can use this xml schema somehow ? This is schema: ...
1
by: Chris White | last post by:
Here's my XML <?xml version="1.0" encoding="UTF-8"?> <results> <status code="ok"/> <report-bulk-users> <row principal-id="23859115" type="user"> <login>muser@domain.com</login> <name>My...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.