473,763 Members | 8,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS2005 service appends Soap to class name

Almost a year ago, someone asked the question below and I am running
into the same problem:

I have two web services (code below). If I have only one webservice in
my disco file it works, it works fine. If I have multile web services
in the file, word "Soap" is appended to the classes.

What is the problem here?
Thanks
namespace WebService1 {
[WebService(Name space="http://microsoft.com/webservices/serv1")]
public class Service1 : System.Web.Serv ices.WebService {
public Service1() {
}

[WebMethod]
public string HelloWorld() {
return "Hello World";
}
}

}

namespace WebService1 {
[WebService(Name space="http://microsoft.com/webservices/serv2")]
public class Service2 : System.Web.Serv ices.WebService {
public Service2() {
}

[WebMethod]
public string HelloWorld() {
return "Hello World";
}
}

}

When I add these to a project (using "Web References" from VS.NET) I get a
proxy class such as:

[System.Diagnost ics.DebuggerSte pThroughAttribu te()]
[System.Componen tModel.Designer CategoryAttribu te("code")]
[System.Web.Serv ices.WebService BindingAttribut e(Name="Service 1Soap",
Namespace="http ://microsoft.com/webservices/serv1")]
public class Service1 :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {

/// <remarks/>
public Service1() {
this.Url = "http://localhost/WebService1/Service1.asmx";
}

...

}

The proxy class is named "Service1" which is what I want.

Now, if I add my two web services to a "disco" file such as:

<?xml version="1.0" encoding="utf-8" ?>
<discovery xmlns="http://schemas.xmlsoap .org/disco/">
<contractRef
ref="http://localhost/WebService1/Service1.asmx?w sdl"docRef="htt p://localhost/WebService1/Service1.asmx"
xmlns="http://schemas.xmlsoap .org/disco/scl/" />
<soap address="http://localhost/WebService1/Service1.asmx"
xmlns:q1="http://tempuri.org/" binding="q1:Ser vice1Soap"
xmlns="http://schemas.xmlsoap .org/disco/soap/" />

<contractRef
ref="http://localhost/WebService1/Service2.asmx?w sdl"docRef="htt p://localhost/WebService1/Service2.asmx"
xmlns="http://schemas.xmlsoap .org/disco/scl/" />
<soap address="http://localhost/WebService1/Service2.asmx"
xmlns:q1="http://tempuri.org/" binding="q1:Ser vice2Soap"
xmlns="http://schemas.xmlsoap .org/disco/soap/" />
</discovery>

Now, the proxy classes appends "Soap" to its class name as shown below:

[System.Diagnost ics.DebuggerSte pThroughAttribu te()]
[System.Componen tModel.Designer CategoryAttribu te("code")]
[System.Web.Serv ices.WebService BindingAttribut e(Name="Service 1Soap",
Namespace="http ://microsoft.com/webservices/serv1")]
public class Service1Soap :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {

/// <remarks/>
public Service1Soap() {
this.Url = "http://localhost/WebService1/Service1.asmx";
}

...
}

[System.Diagnost ics.DebuggerSte pThroughAttribu te()]
[System.Componen tModel.Designer CategoryAttribu te("code")]
[System.Web.Serv ices.WebService BindingAttribut e(Name="Service 2Soap",
Namespace="http ://microsoft.com/webservices/serv2")]
public class Service2Soap :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {

/// <remarks/>
public Service2Soap() {
this.Url = "http://localhost/WebService1/Service2.asmx";
}

...
}
Mar 7 '06 #1
0 1195

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

Similar topics

2
4219
by: Burak | last post by:
Hello, I have a web service that has a two user defined public classes. For sake of brevity, I'll write them as follows Public Class Service1 Public Class Class1 Public x as integer End Class
0
2312
by: Peter Conrey | last post by:
I have a perl web service (using SOAP::Lite) with a method called "Detail" that returns a strucure (hash reference to be exact). It works fine when consumed by a Perl client, but when I try to consume it with a C# application, I get the following runtime error from C#: Cannot assign object of type System.Xml.XmlNode to an object of type ConsoleApplication1.com.hilton.crmdev.SummaryType. Below is the Perl code that generates the hash,...
3
5074
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb). I changed the data type for the structure that contains the XML data from the default "String" to "xml.xmldocument" to enable easy filling of the data. my client code creates an XML document class, fills the data using standard xml dom...
0
1372
by: ben | last post by:
OK so there are a few things going on. I succesfully created a SOAP webreference in VS IDE which when built works fine under small amounts of load, however under heavy amounts of load we start to see a performance issue on the J2EE (CPU utilisation max's out) the load testing tool can hit the web service directly using HTTP posts and for the same amount of load the webservice performs considerably better. So the JAVA guys have asked me if...
0
9387
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
10002
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
9938
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,...
1
7368
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
6643
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
5270
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
3917
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
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
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.