Sorry for the confusion. Yes, the Service I am referring to is my Web Service Project (i.e. Service1.dll). To clarify things I have a:
1. Web Service Solution with 9 other projects associated with it.
2. Web Application Solution
My Web App Solution contains a reference to my Web Service. Since my Web Service and these various projects have different Root Namespaces I have to fully qualify them using the Imports Statement in my .asmx.
When I do this, shouldnât I have access to those classes in these projects with their properties and methods from my Web App, so long as I have a reference in my Web App pointing to this Web Service? I would think so, but I donât.
Hereâs what my code looks like in my Service:
Imports Project1
Imports Project1.Data
Imports Project1.Model
Imports Project1.DataAccess
Imports Project1.Security
Imports Project1.SystemConfig
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
<System.Web.Services.WebService(Namespace:="http ://tempuri.org/ApolloService/ApolloService")> _
Public Class ApolloService
Inherits System.Web.Services.WebService
End Class
Itâs very basic right now until I start adding Security. Currently the first 6 Imports are References in my Web App but I want to pull them out, and have them referenced in my Web Service instead, then just have a single reference in my Web App to this Service.
Quote:
quote:Originally posted by planoie
First, I'd like to clarify something (the terms you used don't seem entirely correct. From what I'm reading, this is what you have:
- Visual studio solution with 10 projects
- 1 of the projects is a web service project (truly a web application project)
- Web service project references the other 9 projects
1 question regarding "I added a reference to my Web App to my Service.": What web app are you referring to? Is the "service" you refer to the web service project?
Web services function my exposing methods written in the web service class (the *.asmx.vb file(s)) as "WebMethod"s. If you have standalone methods in your supporting projects that you can call independently then you could create matching method signatures on your web service class and then call the support class methods from them, returning the result on the web method.
If you have more extensize processes that need to go on, then you might want to look into a remoting solution.
-Peter
|