473,545 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4032
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.co m> wrote in message
news:%2******** *******@TK2MSFT NGP11.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_pmicha ud@NO_SPAM_eart hlink.net> wrote in message
news:O4******** *****@TK2MSFTNG P12.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.co m> wrote in message
news:%2******** *******@TK2MSFT NGP11.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
14913
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) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
25
5030
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 Logic Layer (BLL) and User Interface Layer (UIL). The problem I found with this was circular referencing...
1
532
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 pass a collection, it adds a web reference in client project but it gave me same error of generating XML in that also. I m specifially using...
12
5299
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 the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and...
9
3772
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 techniques are not feasible) The question is; Given that I have a Person object with a private set for id. What is the recommended approac in passing...
3
7295
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 a bit of web research). However, now I've tried passing complex data types between the two, and could not get that to work. What I did was to...
8
8890
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 webmethod1(object a) where a can be of type string, DateTime, float, etc..
7
10136
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()_ Public Sub MyMethod(ByVal arg As MyComplexClass) End Sub
2
1309
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 complex objects which were defined by myself (including inheritance) . Next, I want my customers to publish a wsdl predefined by myself so I can call...
0
7487
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7680
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7934
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7778
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6003
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3459
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.