473,396 Members | 2,013 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,396 software developers and data experts.

Object WebServices

jjm
Hi,

How can i transfer an object to a webservice.

I have a class with attributes in the asp.net

And a class in the webservice.
The user enters data from a asp.net webform.

I insert the objects into the object.
And call the method which accepts object as parameter.

The gets and sets and data types are identical in both objects in
webservice and asp.net.

The error is:

cannot convert from Member to localhost.Member.

Thanks in advance

Jun 14 '06 #1
2 1125
as far as I understood you created TWO declarations for your object,
right?
for .NET they are TWO different types and it doesn't matter that they
have same name and members.

you must have one declaration(in WebService) and just reffer it in (web
app)

hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com

jjm wrote:
Hi,

How can i transfer an object to a webservice.

I have a class with attributes in the asp.net

And a class in the webservice.
The user enters data from a asp.net webform.

I insert the objects into the object.
And call the method which accepts object as parameter.

The gets and sets and data types are identical in both objects in
webservice and asp.net.

The error is:

cannot convert from Member to localhost.Member.

Thanks in advance


Jun 14 '06 #2
jjm,
Your class needs to be included in the WebService project, and marked as
Serializable.

When you get the WSDL contract from the service for your app to build it's
proxy class to talk to the webservice, a proxy version of your class will be
included in it.
That is the one you need to use.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"jjm" wrote:
Hi,

How can i transfer an object to a webservice.

I have a class with attributes in the asp.net

And a class in the webservice.
The user enters data from a asp.net webform.

I insert the objects into the object.
And call the method which accepts object as parameter.

The gets and sets and data types are identical in both objects in
webservice and asp.net.

The error is:

cannot convert from Member to localhost.Member.

Thanks in advance

Jun 14 '06 #3

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

Similar topics

9
by: gulu man | last post by:
Hi, What is the substitute for COM objects in .NET? How can I create something similar to com in .net? Is it still possible? Thank you
5
by: SMG | last post by:
Hi All, I have a Web Service, which returns a DataSet and I am able to consume. This is ok. Now I want to return two things, 1. DataSet 2. String Through one request only, I thot of using...
7
by: Danny Tuppeny | last post by:
Hi All, I've been going through Google Groups, but nothing seems to quite match my problem. It's hard to post a WSDL or anything at the moment (it's not my service, I'm just using it), but maybe...
1
by: Mike Clark | last post by:
I have a webservice that works great on localhost, but as soon as I promote to a network server I get an exception that doesn't tell me much. There's some implementation details in this exception...
5
by: mtv | last post by:
Hi all, I have the following code: ================================ Webservice side: public class MyWS: WebService { private myLib.DataObject curDataObject;
5
by: joeblast | last post by:
I have a Web service that gets the financial periods and hold a reference to a disconnected dataset built at initialization. Web methods work on the dataset inside the web service. Everything is...
1
by: J. Askey | last post by:
I am implementing a web service and thought it may be a good idea to return a more complex class (which I have called 'ServiceResponse') in order to wrap the original return value along with two...
2
by: Techno_Dex | last post by:
I have a custom object that I have written which is serializable. I have put this object in it's own dll which is referenced by both the WebService and the Application using it. My problem is the...
9
by: Greger | last post by:
Hi, I am building an architecture that passes my custom objects to and from webservices. (Our internal architecture requires me to use webservices to any suggestion to use other remoting...
0
by: RobertK | last post by:
I wrote a webservices that should accept an exception object and log info to a db. When I call the function in my webservices class I get an error: The type System.DivideByZeroException was not...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.