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

Access properties and methods from within a Web Service

SAL
I’m fairly new to .NET. I’ve been developing in .NET for about 6 months. I
have over 10 years experience with VB in general.

Here’s what I have done so far:

1. Project is entirely .NET
2. Working with VS.net 2003, Framework 1.1, and WSE 2.0
3. Created 1 Webservice
4. Added 9 projects to it. All developed in VB.net (6) and C# (3)
5. Added all the necessary references to the .asmx to access these projects

Here is the issue I have:

1. How do I expose the properties and methods residing in my external
projects I added to my Webservice Solution, so my Web App can access them?
2. Each of these external projects have many classes in them with the
properties and methods I need.
3. I added a reference to my Web App to my Service.

I have tried adding Imports statements to the .asmx but I still have no
access to the properties and methods.

I tried creating a Public Class and adding an Inherits statement to my
external project, so my Web App can gain access to these classes though my
Web Service. However I am unable to just add a Parent Inherits statement
without drilling down to the lowest child level. If I don’t, it asks for a
Type Expected. Is there a better way to do this?

Just an FYI, all 9 of these projects are in my Web App currently and I want
to pull them out and access them though my Web Service instead. Any help you
can provide would be greatly appreciated.

Thanks,

Sal
Jan 16 '06 #1
3 2479
Sal,

Are all your projects that make up your web service solution part of the
same namespace? If not you will need may need to use the fully qualified
namespace to access the properties of your object.

Normally, I've just included an imports statement in the top of my
webservice.asmx to the namespace of my other projects and then updated the
web reference in my calling app (web app or win app). I can normally then
access the objects / classes of my other projects externally.

--
Kurt Farrar
..NET Developer & Computer Enthusiast

"SAL" wrote:
I’m fairly new to .NET. I’ve been developing in .NET for about 6 months. I
have over 10 years experience with VB in general.

Here’s what I have done so far:

1. Project is entirely .NET
2. Working with VS.net 2003, Framework 1.1, and WSE 2.0
3. Created 1 Webservice
4. Added 9 projects to it. All developed in VB.net (6) and C# (3)
5. Added all the necessary references to the .asmx to access these projects

Here is the issue I have:

1. How do I expose the properties and methods residing in my external
projects I added to my Webservice Solution, so my Web App can access them?
2. Each of these external projects have many classes in them with the
properties and methods I need.
3. I added a reference to my Web App to my Service.

I have tried adding Imports statements to the .asmx but I still have no
access to the properties and methods.

I tried creating a Public Class and adding an Inherits statement to my
external project, so my Web App can gain access to these classes though my
Web Service. However I am unable to just add a Parent Inherits statement
without drilling down to the lowest child level. If I don’t, it asks for a
Type Expected. Is there a better way to do this?

Just an FYI, all 9 of these projects are in my Web App currently and I want
to pull them out and access them though my Web Service instead. Any help you
can provide would be greatly appreciated.

Thanks,

Sal

Jan 16 '06 #2
SAL
Hi Kurt,

Each of my other projects does have different Namespaces. I've tried fully
qualifying them with their Root Namespace by using the Imports Statement in
my .asmx but that didn’t work.

I believe this is what you had in mine, so tell me if I wrong but for
simplicity lets say my Web App is called MWA. In each of my Root Namespaces
I use MWA.Project1, MWA.Project2, etc. In my .asmx I fully qualified them as:

1. Imports MWA.Project1
2. Imports MWA.Project2
3. Imports MWA.Project3
4. Imports MWA.Project4
5. etc.

Besides my Imports Statements show above the only other code I have in my
..asmx is

Imports System
Imports System.Xml
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

' WSE Namespaces
Imports Microsoft.Web.Services2
Imports Microsoft.Web.Services2.Addressing
Imports Microsoft.Web.Services2.Messaging
Imports Microsoft.Web.Services2.Security
Imports Microsoft.Web.Services2.Security.Tokens
Imports Microsoft.Web.Services2.Security.X509
Imports Microsoft.Web.Services2.Security.Policy

Public Class MyService
Inherits System.Web.Services.WebService
End Class

I plan to add Security to my Web Service once I get it working with what I
have now.
"Kurt Farrar" wrote:
Sal,

Are all your projects that make up your web service solution part of the
same namespace? If not you will need may need to use the fully qualified
namespace to access the properties of your object.

Normally, I've just included an imports statement in the top of my
webservice.asmx to the namespace of my other projects and then updated the
web reference in my calling app (web app or win app). I can normally then
access the objects / classes of my other projects externally.

--
Kurt Farrar
.NET Developer & Computer Enthusiast

"SAL" wrote:
I’m fairly new to .NET. I’ve been developing in .NET for about 6 months. I
have over 10 years experience with VB in general.

Here’s what I have done so far:

1. Project is entirely .NET
2. Working with VS.net 2003, Framework 1.1, and WSE 2.0
3. Created 1 Webservice
4. Added 9 projects to it. All developed in VB.net (6) and C# (3)
5. Added all the necessary references to the .asmx to access these projects

Here is the issue I have:

1. How do I expose the properties and methods residing in my external
projects I added to my Webservice Solution, so my Web App can access them?
2. Each of these external projects have many classes in them with the
properties and methods I need.
3. I added a reference to my Web App to my Service.

I have tried adding Imports statements to the .asmx but I still have no
access to the properties and methods.

I tried creating a Public Class and adding an Inherits statement to my
external project, so my Web App can gain access to these classes though my
Web Service. However I am unable to just add a Parent Inherits statement
without drilling down to the lowest child level. If I don’t, it asks for a
Type Expected. Is there a better way to do this?

Just an FYI, all 9 of these projects are in my Web App currently and I want
to pull them out and access them though my Web Service instead. Any help you
can provide would be greatly appreciated.

Thanks,

Sal

Jan 17 '06 #3
SAL
Is there some truth that other assemblies referenced in my web service can be
USED in the code for my web service, but those assemblies ARE NOT implicitly
exposed by my web service to my web app? Hence, I would have to explicitly
create web methods that exposed the functionality I want to make public.
Since my assemblies are already referenced in the Web Service Solution I do
not need to use the Imports either.

If this is the case then I’m not really sure what the benefits of a Web
Service is.

"Kurt Farrar" wrote:
Sal,

Are all your projects that make up your web service solution part of the
same namespace? If not you will need may need to use the fully qualified
namespace to access the properties of your object.

Normally, I've just included an imports statement in the top of my
webservice.asmx to the namespace of my other projects and then updated the
web reference in my calling app (web app or win app). I can normally then
access the objects / classes of my other projects externally.

--
Kurt Farrar
.NET Developer & Computer Enthusiast

"SAL" wrote:
I’m fairly new to .NET. I’ve been developing in .NET for about 6 months. I
have over 10 years experience with VB in general.

Here’s what I have done so far:

1. Project is entirely .NET
2. Working with VS.net 2003, Framework 1.1, and WSE 2.0
3. Created 1 Webservice
4. Added 9 projects to it. All developed in VB.net (6) and C# (3)
5. Added all the necessary references to the .asmx to access these projects

Here is the issue I have:

1. How do I expose the properties and methods residing in my external
projects I added to my Webservice Solution, so my Web App can access them?
2. Each of these external projects have many classes in them with the
properties and methods I need.
3. I added a reference to my Web App to my Service.

I have tried adding Imports statements to the .asmx but I still have no
access to the properties and methods.

I tried creating a Public Class and adding an Inherits statement to my
external project, so my Web App can gain access to these classes though my
Web Service. However I am unable to just add a Parent Inherits statement
without drilling down to the lowest child level. If I don’t, it asks for a
Type Expected. Is there a better way to do this?

Just an FYI, all 9 of these projects are in my Web App currently and I want
to pull them out and access them though my Web Service instead. Any help you
can provide would be greatly appreciated.

Thanks,

Sal

Jan 17 '06 #4

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

Similar topics

2
by: Dennis Stew | last post by:
How do I access Public variables within a Windows Service? I can, and have, created installed and executed a basic Service. From my client App I can Start, Stop...etc the service.... What I want...
3
by: karl | last post by:
I have a windows service that creates a monitor thread which in turn creates 4 worker threads. Each thread is based upon a derived class (HL7Listener) of the TcpListener class. When running this...
9
by: Clint | last post by:
Hey all - Excuse the cross-post ... I'm not sure what the appropriate newsgroup would be for this question. I have a question that I'm not quite sure how to ask. For all I know, I have the...
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...
2
by: Edward W. | last post by:
I wrote my web service and I have no problem browsing to the asmx file and seeing the public methods. I can even invoke them with no problem. But in my asp.net application I get this error...
3
by: Nick | last post by:
I've created a user control that extracts data from a database. The VB code is all contained in a code-behind file. I'm trying to extract a value from the request.querystring but keep getting...
5
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
9
by: JT | last post by:
Here is the overall structure I will be referring to: End-program ProvideWorkFlow.dll Forms and methods that properly manipulate calls to methods in AccessUtils AccessUtils (a web service)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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.