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

Passing custom object to web service

Bob Ross
119 100+
I am trying to send a cutom SearchCriteria class to my web service.
It is the same class in both projects with the same namespace.
But when I try to pass the object it says
"namespace.SearchCriteria is not of type web_service_name.SearchCriteria"

How can I tell it that they are the same type?
Why does it want the type web_service_name.SearchCriteria when that clearly isn't the name of the class?
May 10 '07 #1
7 1416
Motoma
3,237 Expert 2GB
You could try casting the data before passing it.

I am trying to send a cutom SearchCriteria class to my web service.
It is the same class in both projects with the same namespace.
But when I try to pass the object it says
"namespace.SearchCriteria is not of type web_service_name.SearchCriteria"

How can I tell it that they are the same type?
Why does it want the type web_service_name.SearchCriteria when that clearly isn't the name of the class?
May 10 '07 #2
Bob Ross
119 100+
Tried it. No good.
May 11 '07 #3
Motoma
3,237 Expert 2GB
Tried it. No good.
You tried casting as web_service_name.SearchCriteria ? What errors did it give?

Are these classes both part of the same solution? The same project?
May 11 '07 #4
Bob Ross
119 100+
No different solution and different projects.
It says
"type can be converted to web_service_name.type"

Basically saying there not the same.
But they clearly are because it is the same dll in both projects.
May 11 '07 #5
Motoma
3,237 Expert 2GB
What it sounds like to me is that you have declared a class with the same name in two different places. This could be the cause of your problem. You will want to create a single class definition in one project, and include it as a reference in the other.

No different solution and different projects.
It says
"type can be converted to web_service_name.type"

Basically saying there not the same.
But they clearly are because it is the same dll in both projects.
May 11 '07 #6
Bob Ross
119 100+
I have created one class compiled it into a dll and added a reference to it in each project.
May 14 '07 #7
Motoma
3,237 Expert 2GB
In that case, it may help if you post your code that is having the problems; please use the [code] tags!
May 14 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Sahil Malik [MVP] | last post by:
Okay so now I understand (surprised though) - that WebServices can indeed pass ByRef/ref parameters. All I have to do is mark an integer parameter of a WebMethod as "ref". Funnily enough, this is...
25
by: Stuart Hilditch | last post by:
Hi all, I am hoping that someone with some experience developing nTier apps can give me some advice here. I am writing an nTier web app that began with a Data Access Layer (DAL), Business...
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
2
by: PeteZ | last post by:
Can someone help me here. I'm having trouble finding details on how complex objects (eg. an object created in a code behind page that has imbedded object references, collections etc imbedded in...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
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...
2
by: Hakan Örnek | last post by:
Hi , I want to parameter passing to my windows sevice. I call service commands like this ; '------------------------------------------------------------ Dim sc As ServiceController sc = New...
8
by: =?Utf-8?B?UmF2aQ==?= | last post by:
Hi, I'm trying to pass values of different data-types to a web-service. I thought it would be easier to box these values and pass them as a System.object parameter, like public void...
2
by: =?Utf-8?B?Y3Nz?= | last post by:
I am new to ASP.net webservice and have a quesiton. Is is possible to pass custom object to a web service (using VB 2005)? My custom object will look like this Public Class Myclass Public...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
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:
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...
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:
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
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...

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.