473,804 Members | 3,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple web service classes in a single URL

This seems like it's probably a pretty basic question but is there a way to
publish multiple classes from a single web service URL?

Using VS.NET, I create a project, FOO and add a web service, BAR, to it with
one function, baz(). Then, I create a second project to consume the service.
I add a web reference to http://webserver/FOO/BAR.asmx and call that,
BAR_Service. In the code, if I do something like:

dim ws as new BAR_Service.BAR
ws.baz()

My questions are:
Is there a way to add a second class to the web service that could be
referenced as, say, BAR_Service.BAR 2? If not, why is the one and only class
that can be referenced by the web service not implicit in the reference to
the service?

Thanks for any help,

</hjp>
Jan 18 '06 #1
2 3222
Yes you can add a second web service using the Add new item dialog in
VS. Say you a new web service named BOO with one function boo. After
doing so, update the web reference in your client project, your
BAR_Service will contain the following:

BAR_Service.BAR ws1 = new BAR_Service.BAR ()
ws1.baz();
BAR_Service.BOO ws2 = new BAR_Service.BOO ();
ws2.boo ();

Hope this helps...

- NuTcAsE

Jan 18 '06 #2
That's what I thought should happen, as well. Alas... Each newly added web
service adds a new .asmx file. That .asmx file corresponds to an URL. Hence,
you have to add two references to the consuming app, one to
http://server/BAR.asmx (called BAR_Service) and a second one to
http://server/BOO.asmx (called BOO_Service) and then reference them:

BAR_Service.BAR ws1 = new BAR_Service.BAR ()

and

BOO_Service.BOO ws2 = new BOO_Service.BOO ()

I can find no way to add a single URL to the consuming app (called Service)
such that Service.BAR and Service.BOO are accessible.

"NuTcAsE" wrote:
Yes you can add a second web service using the Add new item dialog in
VS. Say you a new web service named BOO with one function boo. After
doing so, update the web reference in your client project, your
BAR_Service will contain the following:

BAR_Service.BAR ws1 = new BAR_Service.BAR ()
ws1.baz();
BAR_Service.BOO ws2 = new BAR_Service.BOO ();
ws2.boo ();

Hope this helps...

- NuTcAsE

Jan 18 '06 #3

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

Similar topics

2
4339
by: Graham Banks | last post by:
Does using multiple inheritance introduce any more performance overhead than single inheritance?
22
23388
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete examples?
4
2331
by: Jeff | last post by:
We have multiple ASP.Net web apps in development. As a standard we are looking to go with SQL Server to hold state information. Can we have the multiple apps all point to a single State DB? Or do we need to install multiple instances of the State database on to the SQL Server (one for each Web app)? It would seem that you could run into troubles pointing several web apps at the same DB, because you would introduce the possibility (a...
3
3050
by: Elroyskimms | last post by:
I know that multiple class inheritance is not possible in VB.Net I also know that I can: inherit class a and in class a: inherit class b and in class b:
3
6512
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/html/service07162002.asp) but I don't want clients to have to add two web references and then manually have to edit the proxy classes. After doing some searching I found that putting references to multiple web services in a .disco...
4
4703
by: Matt Kruse | last post by:
While developing an internal IE6-only webapp, a discussion started about the 'best' way to apply classes to data tables across multiple pages. The two arguments were: 1. Apply a single class to each table. That class (possibly in combination with other classes on child elements) controls every part of the table - layout, colors, fonts, etc. Example: class="data" PROS: Easier to standardize, less specificity confusion, everything is...
11
7924
by: Joseph Geretz | last post by:
I've been looking at two approaches for the maintenance of Session state for a Web Service application. One approach uses the old familiar Session object which I've used in the past for Web applications. As far as I can see, the Session approach is non-standard since Web Services are supposed to be agnostic with respect to their clients. It seems that cookies are outside the Web Service standard; therefore, such a Web Service application...
6
3992
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public string UID; public string PWD; }
1
3732
by: =?Utf-8?B?UEI=?= | last post by:
Hi I was investigating whether we could have a single entry-point (.asmx) to multiple Web Service classes instead of just one. Something like: <%@ WebService Language="C#" Class="Class1" "Class2" "Class3" %> My goal is to minimize the number of .asmx files (and as such, the number of Web proxy references on the client side).
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9571
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
10318
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
10302
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
9132
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 project—planning, coding, testing, and deployment—without 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...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5505
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...
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
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.