473,387 Members | 1,517 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 1706
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.