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

How would you do that?

I'm stuck. Let's see if someone can help me.

Imagine you have to develop an application with some clients (Pocket PCs)
and a server. The clients will send custom objects (let's call them
myObject) to the server but later they will access again to these objects.
The server must then store the objects. myObject has some simple attributes
(strings, int,...) and any kind of collection (maybe myObject[], or
ArrayList, or simply Object[])

My first idea was using web services but I found a problem: the proxy
generates a serialized class myObject, with only the public properties and
the web methods expect to receive these new objects. An original myObject
can't be converted into these new objects.

The main problem is the collection. I don't usually expose collections as
public properties: instead I use methods and I avoid the user dealing with
collections. Also, I can change the kind of collection without modifying the
client code. But the proxy generates an Object[] and the clients have to
manage the new objects declared by the proxy.

Any ideas to send myObjects to the server?

Regards,

Diego F.
Nov 16 '05 #1
1 898
Diego,

I would have your web method deal with strings. Basically, you can use
Serialization to serialize your object into a SOAP encoding, and then pass
that back through a string. Then, on the other side, you have to take the
string, and re-create the object using the SoapFormatter.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Diego F." <di*****@NOterra.es> wrote in message
news:OV****************@TK2MSFTNGP10.phx.gbl...
I'm stuck. Let's see if someone can help me.

Imagine you have to develop an application with some clients (Pocket PCs)
and a server. The clients will send custom objects (let's call them
myObject) to the server but later they will access again to these objects.
The server must then store the objects. myObject has some simple attributes (strings, int,...) and any kind of collection (maybe myObject[], or
ArrayList, or simply Object[])

My first idea was using web services but I found a problem: the proxy
generates a serialized class myObject, with only the public properties and
the web methods expect to receive these new objects. An original myObject
can't be converted into these new objects.

The main problem is the collection. I don't usually expose collections as
public properties: instead I use methods and I avoid the user dealing with
collections. Also, I can change the kind of collection without modifying the client code. But the proxy generates an Object[] and the clients have to
manage the new objects declared by the proxy.

Any ideas to send myObjects to the server?

Regards,

Diego F.

Nov 16 '05 #2

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

Similar topics

1
by: sentinel | last post by:
Hi, I'm currently writing a mulit-page form app that uses a session to retain data from each form element in order for the user to jump between pages, then the final data is passed to a calculation...
2
by: ChronicFatigue | last post by:
Given that some browsers dont have javascript enabled.... do developers try to avoid using javascript when a php alternative can be used? What sort of alternative php scripts are often used?
1
by: Timothy Rue | last post by:
I found the online and free PHP manual(s) but what I need is one that is plain text/ascii Is there such a beast and if not what is the closest to it? I'd like to do my own markup on it. ...
5
by: Nick Bartos | last post by:
I am looking for an open source php accelerator that works in cgi mode. I am guessing that to do that the cache would have to be on disk and not in memory. I was looking at the turk accelerator...
2
by: Martien van Wanrooij | last post by:
I am rather new at php so the answer to my question could be somewhere on the web but unfortunately I couldn't find it until now. I am using a form that is sent to me by email with the following...
4
by: Randell D. | last post by:
Folks, I use PHP to write my form data to MySQL. I have a database with about ten tables. I'm trying to fill one table with some dummy data (its a contact manager table holding names of...
3
by: simonc | last post by:
I'm getting incoming emails to activate a PHP script, not web page requests - so I can't visibly see things with a browser. Is there any way I can detect if one of my PHP scripts never exits -...
5
by: Beef Erikson | last post by:
Heya :) Ok... I've been thinking of a way to go about doing this, and I think I might have came up with it. Just wanting to run this by you guys, see what you think. Here's my setup: I...
3
by: Stijn Goris | last post by:
hi all, Does a function excist that converts a string to a string thats compatible with linux file system? kind regards Stijn
7
by: Jayne Wolps | last post by:
Hello I wonder if anyone can help. I would like to know how certain sites: http://aboutbritain.com/ArundelCastle.htm, and http://travel.knowhere.co.uk/place/+bristol-0/ manage to put approx...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.