Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Recent Topics
Advanced Search
Collections in a Web Service  
Forum Index -> Object Relational Mapping (ORM)
Author Message
Eduardo




Joined: 2007/04/17
Messages: 9

Location: Spain
Offline

Hi, I am using ORM classes code from a web service, and I have a problem with the collections because they are not public attributes. These classes can´t publish in the web service because are not standard.
How can I solve this problem?
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hello Eduardo,

Thank you for your post. Could you let me know more about your standard? As I know we seldom use public attributes. Instead, we would make attributes as private, and let the accessors to be public.

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Eduardo




Joined: 2007/04/17
Messages: 9

Location: Spain
Offline

Ok Jick. You are right. I want to serialize the collections that visual paradigm generates to can use it in a web service.
A collection like "ArrayList" have not problems to be serializable in a SOAP message.


Thanks.

Attached Image : No description given (248 kb)

 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hello Eduardo,

I will discuss with our engineers and come back to you asap.

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hello Eduardo,

We would like to clarify your need first. May I know how does the currently generated code looks like, and what would be your expected result? Could you provide us with some code sample to illustrate your need?

To be specific, do you want to change only the collection to public? We suppose it should work with property, but we are not sure...

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Eduardo




Joined: 2007/04/17
Messages: 9

Location: Spain
Offline

Hello Jick.
It´s easy. You can try to return an ORM class with an 0...* association to another ORM class from a Web Service and the Web Service will throw a System.InvalidOperationException.
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi Eduardo,

Thank you for your reply. So do you want not only public attributes, but also a collection that is compatible with webservice?

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Eduardo




Joined: 2007/04/17
Messages: 9

Location: Spain
Offline

Hi Jick,
You can forget my previous posts.
I think that my problem is the serialization of the ORM objects. An ORM object can´t be serializabled in a XML file or SOAP message. We can see the problem from this point of view.
Thank you Jick.

This forum is very useful.

Best regards.

(Sorry but I can´t get an english version of Visual Studio 2005)
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hello Eduardo,

Thanks for your reply. I discussed with our engineers. Actually, the problem is not related to "public" or not, but about serialization - The collection used by NHibernate can't be serialized. A related discussion:
http://forum.hibernate.org/viewtopic.php?t=956359&view=previous&sid=92939d20c6a0a46099b92e24af31a14c

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Eduardo




Joined: 2007/04/17
Messages: 9

Location: Spain
Offline

Ok Jick!
Thanks for the link. I´m going to apply that pattern to solve my problem.

 
 
   Forum Index -> Object Relational Mapping (ORM)
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil