473,473 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create 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(Namespace="http://microsoft.com/webservices/serv1")]
public class Service1 : System.Web.Services.WebService {
public Service1() {
}

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

}

namespace WebService1 {
[WebService(Namespace="http://microsoft.com/webservices/serv2")]
public class Service2 : System.Web.Services.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.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]
[System.Web.Services.WebServiceBindingAttribute(Nam e="Service1Soap",
Namespace="http://microsoft.com/webservices/serv1")]
public class Service1 :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

/// <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?wsdl"docRef="http://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:Service1Soap"
xmlns="http://schemas.xmlsoap.org/disco/soap/" />

<contractRef
ref="http://localhost/WebService1/Service2.asmx?wsdl"docRef="http://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:Service2Soap"
xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

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

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]
[System.Web.Services.WebServiceBindingAttribute(Nam e="Service1Soap",
Namespace="http://microsoft.com/webservices/serv1")]
public class Service1Soap :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

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

...
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]
[System.Web.Services.WebServiceBindingAttribute(Nam e="Service2Soap",
Namespace="http://microsoft.com/webservices/serv2")]
public class Service2Soap :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

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

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

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

Similar topics

2
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...
0
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...
3
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)....
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.