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

Referencing Web-service (2005)

Hi all

I have a web-service that references another project (the component) that
actually carries out the work, the web-service is simply acting as the public
interface.

The web-service on occasion may return a class that is defined in the component
project.

When I reference the web-service from a new project will it pick up these
classes that are defined in the component project? Or will they be ignored
and I'll end up with a broken web-service.

The reason I'm asking is because Beta 2 failed to do this and I'm not sure
if the released version will work, and unfortunately I haven't got time to
check it.

HTMS
Any ideas?
Thanks

Kev
Mar 20 '06 #1
7 1116
Mantorok wrote:
Hi all

I have a web-service that references another project (the component)
that actually carries out the work, the web-service is simply acting as
the public interface.

The web-service on occasion may return a class that is defined in the
component project.

When I reference the web-service from a new project will it pick up
these classes that are defined in the component project? Or will they be
ignored and I'll end up with a broken web-service.

The reason I'm asking is because Beta 2 failed to do this and I'm not
sure if the released version will work, and unfortunately I haven't got
time to check it.

HTMS
Any ideas?
Thanks

Kev

If your web service returns objects that are defined by the component
project, you'll need those classes defined in the project that is
calling the webservice. The project cannot figure out what is being
passed otherwise.
Mar 20 '06 #2
> Mantorok wrote:
Hi all

I have a web-service that references another project (the component)
that actually carries out the work, the web-service is simply acting
as the public interface.

The web-service on occasion may return a class that is defined in the
component project.

When I reference the web-service from a new project will it pick up
these classes that are defined in the component project? Or will they
be ignored and I'll end up with a broken web-service.

The reason I'm asking is because Beta 2 failed to do this and I'm not
sure if the released version will work, and unfortunately I haven't
got time to check it.

HTMS
Any ideas?
Thanks
Kev

If your web service returns objects that are defined by the component
project, you'll need those classes defined in the project that is
calling the webservice. The project cannot figure out what is being
passed otherwise.


My work-around before was to create some classes in the web-service itself
and only pass them back to the caller, this seemed to work fine.

Maybe I shouldn't be passing back types that have been defined in the component
project - are there any general guidelines for this sort of scenario?

Thanks
Kev
Mar 20 '06 #3
CMM
>> If your web service returns objects that are defined by the component
project, you'll need those classes defined in the project that is
calling the webservice.
I'm not sure if that's entirely true. If the class in question is a simple
structure of primitive types or arrays (sometimes called a "document"), any
client (.NET, Java, or otherwise) will recontruct the class without any
extra help (it's automatically defined in the WSDL).

However, if the class is "fat" and does work (sometimes called an "entity")
then you're right... and you'll need to put your entity class
implementations in a complimentary DLL that is installed on both the client
and server.

--
-C. Moya
www.cmoya.com
"Mantorok" <sp******@spam.com> wrote in message
news:3a**************************@news.rmplc.co.uk ... Mantorok wrote:
Hi all

I have a web-service that references another project (the component)
that actually carries out the work, the web-service is simply acting
as the public interface.

The web-service on occasion may return a class that is defined in the
component project.

When I reference the web-service from a new project will it pick up
these classes that are defined in the component project? Or will they
be ignored and I'll end up with a broken web-service.

The reason I'm asking is because Beta 2 failed to do this and I'm not
sure if the released version will work, and unfortunately I haven't
got time to check it.

HTMS
Any ideas?
Thanks
Kev

If your web service returns objects that are defined by the component
project, you'll need those classes defined in the project that is
calling the webservice. The project cannot figure out what is being
passed otherwise.


My work-around before was to create some classes in the web-service itself
and only pass them back to the caller, this seemed to work fine.

Maybe I shouldn't be passing back types that have been defined in the
component project - are there any general guidelines for this sort of
scenario?

Thanks
Kev

Mar 20 '06 #4
CMM wrote:
If your web service returns objects that are defined by the component
project, you'll need those classes defined in the project that is
calling the webservice.


I'm not sure if that's entirely true. If the class in question is a simple
structure of primitive types or arrays (sometimes called a "document"), any
client (.NET, Java, or otherwise) will recontruct the class without any
extra help (it's automatically defined in the WSDL).

However, if the class is "fat" and does work (sometimes called an "entity")
then you're right... and you'll need to put your entity class
implementations in a complimentary DLL that is installed on both the client
and server.

You're right. My brain switched off for a while. ;)
Mar 20 '06 #5
CMM
VS2005/.NET 2.0 does a really good job of serializing classes. A lot of the
types and collections (like the infinitely very useful List(of <T>)) and
even deeply nested classes are recognized by the serializer and turned into
XML primitives and arrays and defined in the WSDL. The client (.NET, Java,
or whatever) should have no trouble reconstructing these classes... they're
described quite well in the WSDL.

However, this is only practical for classes that contain only data (document
paradigm)... not for classes that contain built-in validation or otherwise
do "work" (entity paradigm).

--
-C. Moya
www.cmoya.com
"Mantorok" <sp******@spam.com> wrote in message
news:3a**************************@news.rmplc.co.uk ...
Hi all

I have a web-service that references another project (the component) that
actually carries out the work, the web-service is simply acting as the
public interface.

The web-service on occasion may return a class that is defined in the
component project.

When I reference the web-service from a new project will it pick up these
classes that are defined in the component project? Or will they be ignored
and I'll end up with a broken web-service.

The reason I'm asking is because Beta 2 failed to do this and I'm not sure
if the released version will work, and unfortunately I haven't got time to
check it.

HTMS
Any ideas?
Thanks

Kev

Mar 20 '06 #6
> VS2005/.NET 2.0 does a really good job of serializing classes. A lot
of the types and collections (like the infinitely very useful List(of
<T>)) and even deeply nested classes are recognized by the serializer
and turned into XML primitives and arrays and defined in the WSDL. The
client (.NET, Java, or whatever) should have no trouble reconstructing
these classes... they're described quite well in the WSDL.

However, this is only practical for classes that contain only data
(document paradigm)... not for classes that contain built-in
validation or otherwise do "work" (entity paradigm).


Thanks for that - I thought as much, I'll try and stick to the document paradigm
for returned types.

Kev
Mar 21 '06 #7
The web reference generates proxies that reflect public variables and
properties of the class the web method is declared as returning. Even
if you add the reference to the original class, what you'll get back
from the service is the proxy class. If you want to work with an
instance of the original class you'll need to construct one from the
proxy object that is returned.

Mar 21 '06 #8

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

Similar topics

2
by: Torrance S. | last post by:
Hi, I have a class in an assembly that references a value in web.config like this: <appSettings> <add key="mykey" value="myvalue"/> </appSettings> string temp =...
1
by: Spyros Sakellariadis | last post by:
I have a standard aspx page format that I replicate in many places on my site. That page has a lengthy page_load section, that I'd love to stick in a single code file (e.g. MyFunctions.vb). I know...
2
by: Mike Taylor | last post by:
I'm trying to create a base page class for my project (am new to ASP.NET, so am a bit stumped) - I'm using VS.NET 2003, btw. OK, my dummy base page class is shown below: using System; using...
6
by: Mikey_Doc | last post by:
Hi We are running cms 2002, Framework 1.0 with Visual studio 2002. We have just upgraded to Framework 1.1 and visual studio 2003. All of our database connection strings are stored within the...
1
by: Felipe Garcia | last post by:
Does makes difference referencing controls inside EVERY page <%@ Register TagPrefix="PC" Namespace="MyControls" Assembly="Personal.MyControls" %> or referencing controls ONCE inside web.config,...
3
by: Lavender via DotNetMonster.com | last post by:
help... does anyone know how to solve this error? http://i5.photobucket.com/albums/y153/mayonise09/s.jpg i already install IIS but still got this error. Thanks If u cant see the pic " the...
0
by: Demetri | last post by:
I have a performance question with regards to packaging assemblies and referencing them. First lets say you have created the following assemblies: Company.Framework.dll...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
0
by: dba123 | last post by:
I need to "tie together the cookie with the domain" by referencing the information from my web.config below in my login's codebhind. I don't understand how. I need to also save that after...
1
by: Henry Stock | last post by:
I am having trouble referencing a theme in my ASP.NET project. I was following a model that allowed for multiple themes. So The theme that I have is stored in named "Base" under the App_Theme...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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.