473,837 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2501
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.Serv ices
Imports System.Web.Serv ices.Protocols

' WSE Namespaces
Imports Microsoft.Web.S ervices2
Imports Microsoft.Web.S ervices2.Addres sing
Imports Microsoft.Web.S ervices2.Messag ing
Imports Microsoft.Web.S ervices2.Securi ty
Imports Microsoft.Web.S ervices2.Securi ty.Tokens
Imports Microsoft.Web.S ervices2.Securi ty.X509
Imports Microsoft.Web.S ervices2.Securi ty.Policy

Public Class MyService
Inherits System.Web.Serv ices.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
2302
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 to do is to read properties that are in the service. for instance if the service had a Propertie or Public variable like Public Int Myint = 12; (or... Public Myint as integer = 12)
3
2082
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 service on my workstation I have no problems whatsoever. I then deployed this to another server and cannot open any of the sockets. Troubleshooting this issue I've discovered that the 4 threads do successfully enter the HL7Listener constructor....
9
4164
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 verbaige completely wrong, but here goes nothing ... I'm currently using the MS Data Access Block for a desktop application I'm writing. Recently, I had to add a call to a web service, which in
2
3190
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 problems that I have encountered to date and the solutions (if any) that I found. http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm This page also has all of the source code in a compressed file that you are free to download...
2
1882
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 message "The request failed with HTTP status 401: Access Denied. " BUT when I add this line to my code it works fine. gsdiApplication gsdiWebService = new gsdiApplication(); gsdiApplication.Credentials =...
3
5361
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 the following error: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
5
2695
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 that's come before. To take an extreme example, suppose you have been writing Visual Basic applications for years now. If you're like many developers, you will have built up a substantial inventory of code in that time. And if you've been following...
17
4427
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 there, but is there a way they can find out if that application was put there from a CD or email or created at work? Hint: It's not on a client/server database, just native jet database mdb created on Access 2003 (default 2000)...
9
2172
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) Hide.dll methods and data I want to remain hidden I have a DLL, Hide.dll, that contains methods that I want to handle for
0
9682
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10615
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9390
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7803
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4469
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4036
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3122
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.