Groups | Blog | Home
all groups > dotnet web services enhancements > november 2005 >

dotnet web services enhancements : "Updated Web Reference" but can't find the '****Wse' class!


Naeem Sarfraz
11/24/2005 4:39:08 AM
So Ihave enbaled by ASp.NET Web Service project to be WSE Enabled and the
same for my client project. Compiled the Web Service and then updated the
references in the client project.

I am now supposed to find a class which has 'Wse' appended to it, I can't
Craig Boland
11/26/2005 6:35:01 PM
It's in the Reference.cs file under the 'localhost' web reference. Open the
file and you'll find both the StockService and the StockServiceWse classes.

[quoted text, click to view]
Valentin
12/4/2005 4:49:51 PM
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



[quoted text, click to view]
xtcsonik NO[at]SPAM gmail.com
12/5/2005 8:33:41 AM
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
12/5/2005 12:15:02 PM
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

[quoted text, click to view]
Naeem Sarfraz
12/20/2005 2:00:03 AM
Where can I find this property?

[quoted text, click to view]
Naeem Sarfraz
12/20/2005 2:12:02 AM
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"

[quoted text, click to view]
Valentin
12/20/2005 4:13:02 AM
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

[quoted text, click to view]
Valentin
12/21/2005 5:02:02 AM
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

[quoted text, click to view]
darkadvent
12/29/2005 3:02:01 PM
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.

[quoted text, click to view]
AddThis Social Bookmark Button