Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 10th, 2006, 11:38 AM
Registered User
Join Date: Apr 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing an argument to a web service from a client

Hi Guys,

I am working with visual studio 2005 and I have created a website
project. In that I have created and added a new web service and C# is the language I am using to code. I then created a reference to the webservice (add a web reference) called 'localhost'. There are no build errors in the web service and I am able to run it by itself.

My web service takes an array of type double[][] and returns an array of a custom type, Student, which I have defined as a separate class.

Here is some of the relevant code from the default.aspx page:

localhost.WebService ws = new localhost.WebService(); //get reference
to web service

double [][] myArray = new double[3][]; //declare an array to pass to web service method
myArray[0] = new double[3] {2.9, 1200, 0};
myArray[1] = new double[3] {3.7, 1400, 1};
myArray[2] = new double[3] {3.5, 1250, 0};

studentArray = ws.StudentResults(myArray); //call a method on the webservice

I get an error when I try to run this code.

I noticed that if I defined the myArray within the web service then it ran fine. But in this case I need to collect the data from the front-end (aspx page) and pass it as a parameter to the web service.

Can any one please provide any information that would help resolve this.

Thanks in advance.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Axis web service from .NET client Koushik .NET Web Services 4 April 2nd, 2010 09:16 PM
C# client for SOAP::Lite web service wirespring C# 0 December 8th, 2006 07:14 PM
passing a page into a web service as a byref param jonny75904 ASP.NET 1.0 and 1.1 Professional 0 August 15th, 2006 04:08 PM
Web Service Client VandanaD J2EE 0 February 13th, 2006 09:45 PM
Web Service Vs. Client/Server gabrielboys .NET Web Services 10 January 10th, 2006 06:48 AM

All times are GMT -4. The time now is 08:20 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.