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

Exposing collection and classes from within a web service

Please - anyone that can help.

I am getting confusing results while trying to expose a collection from a
web service.

I have a webservice in which a web method accepts a collection as a
parameter and returns an array of datasets. The collection consists of
database connection objects.

Based on the simple hierarchy below, you can see that starting with the
ConnectionsCollection, all other collections and objects are "chained"
together. Each collection implements the 'CollectionBase' and each class
contains a property which associates it to the next collection in the
hierarchy.

Everything works fine. The problem is with intellisense. In my test
application that references the webservice the ParameterObject gets exposed
with all of the properties and methods visible using intellisense but none of
the classes "higher up in the chain" have any of their properties or methods
exposed. I need to get all of the properties and methods in all of the
classes exposed from inside of my test application.

If I take this design and create a standard project reference I get all the
intellisense I need from all the classes but from a webservice it's a
different result. Why or how can I get all of the classes in a webservice to
be serialized?

I would have thought that since the ParameterObject is the lowest class in
the chain that all of the other consuming classes would be exposed as well. I
am confused as to why that last class in the hierarchy is exposed while the
other two classes remain hidden

MyDataManagerService
WebMethod:GetMyDataset(MyConnectionCollection as ConnectionCollection) as
DataSet

--->>ConnectionsCollection (Contains connection objects)

------->>ConnectionObject (has a property of Commands as CommandsCollection)

----------->>CommandsCollection (Contains command objects)

--------------->>CommandObject (property of parameters collection)

------------------->>ParametersCollection (Contains parameters objects)

----------------------->>ParameterObject

Dec 7 '05 #1
3 2950
Hello Dave,

What do you mean by: "ParameterObject gets exposed with all of the
properties and methods"?
Methods are not serializable!

I don't know if this realy answers to your question, but here it goes:
Web-services use a XML serialization mechanism to transfer the object's
state across the wire. In order to properties get serialized, they must be
public and implement the *get* and *set* accessors.
--

Best regards,

Abel Eduardo Pereira
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
Please - anyone that can help.

I am getting confusing results while trying to expose a collection from a
web service.

I have a webservice in which a web method accepts a collection as a
parameter and returns an array of datasets. The collection consists of
database connection objects.

Based on the simple hierarchy below, you can see that starting with the
ConnectionsCollection, all other collections and objects are "chained"
together. Each collection implements the 'CollectionBase' and each class
contains a property which associates it to the next collection in the
hierarchy.

Everything works fine. The problem is with intellisense. In my test
application that references the webservice the ParameterObject gets
exposed
with all of the properties and methods visible using intellisense but none
of
the classes "higher up in the chain" have any of their properties or
methods
exposed. I need to get all of the properties and methods in all of the
classes exposed from inside of my test application.

If I take this design and create a standard project reference I get all
the
intellisense I need from all the classes but from a webservice it's a
different result. Why or how can I get all of the classes in a webservice
to
be serialized?

I would have thought that since the ParameterObject is the lowest class in
the chain that all of the other consuming classes would be exposed as
well. I
am confused as to why that last class in the hierarchy is exposed while
the
other two classes remain hidden

MyDataManagerService
WebMethod:GetMyDataset(MyConnectionCollection as ConnectionCollection) as
DataSet

--->>ConnectionsCollection (Contains connection objects)

------->>ConnectionObject (has a property of Commands as
CommandsCollection)

----------->>CommandsCollection (Contains command objects)

--------------->>CommandObject (property of parameters collection)

------------------->>ParametersCollection (Contains parameters objects)

----------------------->>ParameterObject

Dec 8 '05 #2
Perhaps I used the term "serialized" inccorectly. How can I get all of the
methods and properties of all my classes in my webservice to show up with
intellisense in the application that is using my webservice.

The ParameterObject has all of it's properties and methods available using
intellisense. How come the other classes and collections that consume one
another in my webservice do not show up with intellisense?
"Abel Eduardo Pereira" wrote:
Hello Dave,

What do you mean by: "ParameterObject gets exposed with all of the
properties and methods"?
Methods are not serializable!

I don't know if this realy answers to your question, but here it goes:
Web-services use a XML serialization mechanism to transfer the object's
state across the wire. In order to properties get serialized, they must be
public and implement the *get* and *set* accessors.
--

Best regards,

Abel Eduardo Pereira
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
Please - anyone that can help.

I am getting confusing results while trying to expose a collection from a
web service.

I have a webservice in which a web method accepts a collection as a
parameter and returns an array of datasets. The collection consists of
database connection objects.

Based on the simple hierarchy below, you can see that starting with the
ConnectionsCollection, all other collections and objects are "chained"
together. Each collection implements the 'CollectionBase' and each class
contains a property which associates it to the next collection in the
hierarchy.

Everything works fine. The problem is with intellisense. In my test
application that references the webservice the ParameterObject gets
exposed
with all of the properties and methods visible using intellisense but none
of
the classes "higher up in the chain" have any of their properties or
methods
exposed. I need to get all of the properties and methods in all of the
classes exposed from inside of my test application.

If I take this design and create a standard project reference I get all
the
intellisense I need from all the classes but from a webservice it's a
different result. Why or how can I get all of the classes in a webservice
to
be serialized?

I would have thought that since the ParameterObject is the lowest class in
the chain that all of the other consuming classes would be exposed as
well. I
am confused as to why that last class in the hierarchy is exposed while
the
other two classes remain hidden

MyDataManagerService
WebMethod:GetMyDataset(MyConnectionCollection as ConnectionCollection) as
DataSet

--->>ConnectionsCollection (Contains connection objects)

------->>ConnectionObject (has a property of Commands as
CommandsCollection)

----------->>CommandsCollection (Contains command objects)

--------------->>CommandObject (property of parameters collection)

------------------->>ParametersCollection (Contains parameters objects)

----------------------->>ParameterObject


Dec 8 '05 #3
Have you refreshed your WebService reference? If not, Build the web service,
then right click on your web service reference in the solution explorer of
your client app and refresh it.

For them to show up in Intellisense, they need to be in the WSDL. Check the
WSDL and if you are using Visual Studio to create your proxy for you, check
the proxy class to see if they are there.

If your web service either takes the class/collection as an argument to a
WebMethod or returns the class/collection as a result from a WebMethod, they
should be exposed and included in the WSDL. Encapsulation works for this,
so a class that is a member of another class will be exposed as well.

HTH,

John


"Dave" wrote:
Perhaps I used the term "serialized" inccorectly. How can I get all of the
methods and properties of all my classes in my webservice to show up with
intellisense in the application that is using my webservice.

The ParameterObject has all of it's properties and methods available using
intellisense. How come the other classes and collections that consume one
another in my webservice do not show up with intellisense?
"Abel Eduardo Pereira" wrote:
Hello Dave,

What do you mean by: "ParameterObject gets exposed with all of the
properties and methods"?
Methods are not serializable!

I don't know if this realy answers to your question, but here it goes:
Web-services use a XML serialization mechanism to transfer the object's
state across the wire. In order to properties get serialized, they must be
public and implement the *get* and *set* accessors.
--

Best regards,

Abel Eduardo Pereira
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
Please - anyone that can help.

I am getting confusing results while trying to expose a collection from a
web service.

I have a webservice in which a web method accepts a collection as a
parameter and returns an array of datasets. The collection consists of
database connection objects.

Based on the simple hierarchy below, you can see that starting with the
ConnectionsCollection, all other collections and objects are "chained"
together. Each collection implements the 'CollectionBase' and each class
contains a property which associates it to the next collection in the
hierarchy.

Everything works fine. The problem is with intellisense. In my test
application that references the webservice the ParameterObject gets
exposed
with all of the properties and methods visible using intellisense but none
of
the classes "higher up in the chain" have any of their properties or
methods
exposed. I need to get all of the properties and methods in all of the
classes exposed from inside of my test application.

If I take this design and create a standard project reference I get all
the
intellisense I need from all the classes but from a webservice it's a
different result. Why or how can I get all of the classes in a webservice
to
be serialized?

I would have thought that since the ParameterObject is the lowest class in
the chain that all of the other consuming classes would be exposed as
well. I
am confused as to why that last class in the hierarchy is exposed while
the
other two classes remain hidden

MyDataManagerService
WebMethod:GetMyDataset(MyConnectionCollection as ConnectionCollection) as
DataSet

--->>ConnectionsCollection (Contains connection objects)

------->>ConnectionObject (has a property of Commands as
CommandsCollection)

----------->>CommandsCollection (Contains command objects)

--------------->>CommandObject (property of parameters collection)

------------------->>ParametersCollection (Contains parameters objects)

----------------------->>ParameterObject


Dec 8 '05 #4

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

Similar topics

2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
8
by: Dave A | last post by:
I have a class called 'PrimaryKey' that represents the primary key of a table. PrimaryKeys can only be created and the class only implements .ToString(). The PrimaryKey class internally stores...
18
by: Larry Herbinaux | last post by:
I'm having issues with garbage collection with my long-standing service process. If you could review and point me in the right direction it would be of great help. If there are any helpful...
2
by: Yuk Tang | last post by:
I've satisfactorily got an axwebbrowser control on a form within a panel, suitably positioned and sized, and now I want to display a webpage on it. This is not normally a problem when I have the...
5
by: mmkhajah | last post by:
Hi, I am trying to have a set of base classes and interfaces of an application framework in their own assembly. That way, concrete implementations of the API will reference that assembly and...
4
by: =?Utf-8?B?QkogU2FmZGll?= | last post by:
We have a class that has a public property that is of type List<T>. FXCop generates a DoNotExposeGenericLists error, indicating "System.Collections.Generic.List<Tis a generic collection designed...
2
by: =?Utf-8?B?SWJyYWhpbS4=?= | last post by:
Hello, I have a client c# application from which I want to Add/Edit/Delete & list records by connecting to Web Service. HOw can I write classes & methods in Web service projet that will : ...
0
by: abhijit4229 | last post by:
Hello, I have strange situation on hand , I have remotely exposed an object through Windows serice. I am using Client Activated Objects(CAO) . Now whenever I try to create an proxy object...
4
by: =?Utf-8?B?Y2hyaXNjYXA=?= | last post by:
I tried searching the forums for this already and didn't find anything. I want to expose functionality from a vb6 COM component via a WCF service. I am trying to evaluate if exposing this...
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?
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...
0
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,...
0
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...

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.