473,387 Members | 1,790 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,387 software developers and data experts.

webservice failure

Hi again,

I tried to declare the following function on my webservice

<WebMethod()> Public Sub mytestfunc() as Object()
return myarraylist.ToArray() 'myarraylist is of type ArrayList
End Sub

This compiles correctly, but when I try to call it in my web client, I
receive a SOAP error, that indicates that the type the arraylist really
consists of (e.g. MYSTRUCT) is not defined.
Now, how can I transfer an array of structures as a return value of a
webmethod?

Thanks
Peter
Nov 23 '05 #1
1 1705
Peter Schmitz <Pe**********@discussions.microsoft.com> wrote:
I tried to declare the following function on my webservice

<WebMethod()> Public Sub mytestfunc() as Object()
return myarraylist.ToArray() 'myarraylist is of type ArrayList
End Sub

This compiles correctly, but when I try to call it in my web client, I
receive a SOAP error, that indicates that the type the arraylist really
consists of (e.g. MYSTRUCT) is not defined.
Now, how can I transfer an array of structures as a return value of a
webmethod?


I *believe* that you need to use SoapIncludeAttribute. I haven't used
it myself, but I ran across it looking at the various Soap attributes.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 23 '05 #2

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

Similar topics

1
by: Peter Schmitz | last post by:
Hi again, I tried to declare the following function on my webservice <WebMethod()> Public Sub mytestfunc() as Object() return myarraylist.ToArray() 'myarraylist is of type ArrayList End Sub...
0
by: Hans Kesting | last post by:
Hi, I'm trying to create a client for some webservice. BUT I have only limited information: * no WSDL available ("expected Q1-06") (it seems to be written in Java) * I don't have access (yet)...
6
by: Davie | last post by:
I want to authorise a user of a web service by using the AuthHeaderValue for some reason I keep getting a null reference exception when I try to run the following code: It seems to work fine on a...
4
by: Tommy | last post by:
hello, i try´d to use an webservice like Global Weather http://www.webservicex.net/globalweather.asmx?WSDL i have add a reference to my asp.net-website and write the follwing...
0
by: Papp György | last post by:
Hi I have created a webservice with c# inVisual Studio 2003 by the ASP Web Service template. Then I created a client application to test the web service and the following error occurs : An...
0
by: David Haynes | last post by:
I am having an issue with using the Membership class in a SOAP WebService running in IIS. I have: 1. set <authentication mode=\"Windows\"/in web.config 2. verified that I can log onto the...
0
by: binder | last post by:
I have a Win 2003 server with IIS 6. I have a webservice that is trying to copy a file from one local directory to another local directory on the server. I'm getting this error when trying to...
2
by: Jay | last post by:
Hello, I have created a simple web service and I have deployeed it in IIS server. I have 2 versions of ASP.NET 1.1.4322 and 2.0. But when I access webservice I get error.. Server Application...
4
by: AliR \(VC++ MVP\) | last post by:
Hi everyone, I'm trying to write a webservice that would access data files that are on a network drive. But it is not working. When I try to open a file on the network drive this is the...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.