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

Passing Complex Objects to/from a Web Service

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 it) can be sent via SOAP / HTTP to and from
remote web services

Its my understanding that there's a limit to what can be passed via SOAP /
HTTP ie. only native datatypes (I could be wrong)

I gather the data needs to be serializable before this can be done. What is
the easiest way to pass complex objects to and from web services ?

(a link or URL to some knowledge here would be helpful - tia)

thanks,

peteZ
Nov 21 '05 #1
2 4023
Hi PeteZ,
Actually you should be able to just write a function header with the
class type in it just like you would any other .Net code that is not a web
service. Just pass the parameters as you would any other. .Net will then
handle it under the covers. I haven't had any problems with this so farand
I am constantly passing custom classes which are themselves build of other
classes nested many layers deep. So far no real problems. The one thing to
keep in mind is that the default test pages for your web service won;t work.
This is also no big deal as you just have to write a simple test harness of
your own.

Paul Michaud
"PeteZ" <pe***@aol.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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 it) can be sent via SOAP / HTTP to and from
remote web services

Its my understanding that there's a limit to what can be passed via SOAP /
HTTP ie. only native datatypes (I could be wrong)

I gather the data needs to be serializable before this can be done. What is the easiest way to pass complex objects to and from web services ?

(a link or URL to some knowledge here would be helpful - tia)

thanks,

peteZ

Nov 21 '05 #2

"Paul Michaud" <NO_SPAM_pmichaud@NO_SPAM_earthlink.net> wrote in message
news:O4*************@TK2MSFTNGP12.phx.gbl...
Hi PeteZ,
Actually you should be able to just write a function header with the
class type in it just like you would any other .Net code that is not a web
service. Just pass the parameters as you would any other. .Net will then
handle it under the covers. I haven't had any problems with this so
farand
I am constantly passing custom classes which are themselves build of other
classes nested many layers deep. So far no real problems. The one thing
to
keep in mind is that the default test pages for your web service won;t
work.
This is also no big deal as you just have to write a simple test harness
of
your own.

Paul Michaud
"PeteZ" <pe***@aol.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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 it) can be sent via SOAP / HTTP to and from
remote web services

Its my understanding that there's a limit to what can be passed via SOAP
/
HTTP ie. only native datatypes (I could be wrong)

I gather the data needs to be serializable before this can be done. What

is
the easiest way to pass complex objects to and from web services ?

(a link or URL to some knowledge here would be helpful - tia)

thanks,

peteZ


Nov 21 '05 #3

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

Similar topics

3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
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...
1
by: vbvjain | last post by:
Hi Thanks for your suggestion, i even tried that but now the error that is generated is "There was an error generating XML". If i declare the input parameter of my web service method as object and...
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...
3
by: andreas.baus | last post by:
Hello. I'm trying to exchange data between a webservice based on Apache Axis and a client written in C#, and so far it has been working with few problems (none that I couldn't solve myself with...
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...
7
by: =?iso-8859-1?Q?S=F8ren_M._Olesen?= | last post by:
Hi How do I pass a complex type to a webservice?? What I have is a Class 'MyComplexClass' which lives in it's own dll/namespace. I'd like to pass this class to my webmethod: <WebMethod()_...
2
by: =?Utf-8?B?ZHNoZW1lc2g=?= | last post by:
Hello, My problem is a little complex... Here it goes: I have a web service in my system which my users need to web reference. By web referencing my web service, my users can use all kinds of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
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...

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.