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