No, you will not find an appended class in client code.
To consume the Web Service you have to do:
Create an object for the class of your Web Service in this manner:
WebReference.WebServiceClass myService = new WebReference.WebServiceClass
(…// constructor arguments);
Call the needed methods as follows:
myService.Method01 (….// the method arguments);
Regards,
Valentin
www.wwv-it.de
My Web Services: http://www.wwv-it.com/DateTimeSpan/ComputeDateTimeSpan.asmx
http://www.wwv-it.com/Mathematics/JHConwayPrimeNumbers.asmx
Make that in your service project you have also checked the "Enable
Microsoft Web Services Enhancement Soap Protocol Factory" checkbox.
Then continue with the steps you already did.
Valentin - 05 Dec 2005 20:15 GMT
Which developing kit are you using?
I am working with Visual C# .net. I do not find this check box. Maybe is
this a default setting, when I select a Web Service project to create.
Regards, Valentin
> Make that in your service project you have also checked the "Enable
> Microsoft Web Services Enhancement Soap Protocol Factory" checkbox.
> Then continue with the steps you already did.
Naeem Sarfraz - 20 Dec 2005 10:00 GMT
Where can I find this property?
> Make that in your service project you have also checked the "Enable
> Microsoft Web Services Enhancement Soap Protocol Factory" checkbox.
> Then continue with the steps you already did.
I think you may be mistaken, there should be "...Wse" class if you have WSE
enabled. I know the "...Wse" proxy class inherits from a different class than
the normal "SoapHttpClientProtocol"
> No, you will not find an appended class in client code.
> To consume the Web Service you have to do:
[quoted text clipped - 16 lines]
> > I am now supposed to find a class which has 'Wse' appended to it, I can't
> > find it, it's not in the namespace. Am I missing a step?
Valentin - 20 Dec 2005 12:13 GMT
Hi Naeem,
I suppose, we are writing about different things.
So, here is a test code for Web Services:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace TestWebService
{
/// <summary>
/// Zusammenfassung für WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox txtBox01;
protected System.Web.UI.WebControls.TextBox txtBox02;
MyService01.ComputeDateTimeSpan myServ01 = new
MyService01.ComputeDateTimeSpan ();
protected System.Web.UI.WebControls.TextBox txtBox3;
MyService02.WebServicesClass myServ02 = new MyService02.WebServicesClass ();
private void Page_Load(object sender, System.EventArgs e)
{
txtBox01.Text = myServ01.ActualDate ("……");
txtBox02.Text = myServ02.Enter_A_Text ("Hello World");
txtBox3.Text = myServ02.CurrentDate ("…..");
// Hier Benutzercode zur Seiteninitialisierung einfügen
}
#region Vom Web Form-Designer generierter Code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: Dieser Aufruf ist für den ASP.NET Web Form-Designer
erforderlich.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
The Web References are called:
MyService01
MyService02
Regards
Valentin
> I think you may be mistaken, there should be "...Wse" class if you have WSE
> enabled. I know the "...Wse" proxy class inherits from a different class than
[quoted text clipped - 20 lines]
> > > I am now supposed to find a class which has 'Wse' appended to it, I can't
> > > find it, it's not in the namespace. Am I missing a step?
Valentin - 21 Dec 2005 13:02 GMT
Hi Naeem,
I wish to add to my previous answer that the Visual Studio C# .Net 2003
generates proxy namespaces for each reference, which contain the service
methodss. Therefore using Visual Studio you do not to take care to create Wse
classes.
Regards
Valentin
> I think you may be mistaken, there should be "...Wse" class if you have WSE
> enabled. I know the "...Wse" proxy class inherits from a different class than
[quoted text clipped - 20 lines]
> > > I am now supposed to find a class which has 'Wse' appended to it, I can't
> > > find it, it's not in the namespace. Am I missing a step?
darkadvent - 29 Dec 2005 23:02 GMT
I had the same problem with the wse class not showing up when importing the
webservice into an asp.net application. It wasn't until I installed the
redistributal that comes with the SDK did it finally show up. Kinda wierd.
> Hi Naeem,
>
[quoted text clipped - 31 lines]
> > > > I am now supposed to find a class which has 'Wse' appended to it, I can't
> > > > find it, it's not in the namespace. Am I missing a step?