kalasp
04-02-2009, 02:23 AM
Hi im using WSE3.0 with C#.
I know that WSE is old but I still have to use it. I get this error: Error 11 'WeldPointClient.localhost.Service' does not contain a definition for 'SetPolicy' E:\WeldPointClient\WeldPointClient\Form1.cs 35 18 WeldPointClient. When im trying to use Policies.
CLIENT CODE:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeldPointClient.WeldSupportService;
using System.IO;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Design;
using Microsoft.Web.Services3.Security;
using Microsoft.Web.Services3.Security.Tokens;
using Microsoft.Web.Services3.Security.X509;
using Microsoft.Web.Services3.Mime;
using WeldPointClient.localhost;
namespace WeldPointClient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
WeldSupportService.Service1 weldPointClientService = new Service1();
weldPointClientService.SetPolicy("ClientPolicy");
try
{
String s = weldPointClientService.HelloWorld();
textBox1.Text = s;
}
catch (Exception ex)
{
MessageBox.Show("FEL " + ex.Message);
}
}
WEB SERVICE CODE:
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Design;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace WeldSupportService
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://esab.se/weldpoint")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[Policy("ServerPolicy")]
public class Service1 : Microsoft.Web.Services3.WebServicesClientProtocol
{
[WebMethod]
public string HelloWorld()
{
return "000";
}
I have read about this problem on the forum and I have followed the advices but I donīt seem to get it to work. Either there is something I donīt understand or something I missed. I have spent several hours on this. Help would be greatly appreciated.
I know that WSE is old but I still have to use it. I get this error: Error 11 'WeldPointClient.localhost.Service' does not contain a definition for 'SetPolicy' E:\WeldPointClient\WeldPointClient\Form1.cs 35 18 WeldPointClient. When im trying to use Policies.
CLIENT CODE:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WeldPointClient.WeldSupportService;
using System.IO;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Design;
using Microsoft.Web.Services3.Security;
using Microsoft.Web.Services3.Security.Tokens;
using Microsoft.Web.Services3.Security.X509;
using Microsoft.Web.Services3.Mime;
using WeldPointClient.localhost;
namespace WeldPointClient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
WeldSupportService.Service1 weldPointClientService = new Service1();
weldPointClientService.SetPolicy("ClientPolicy");
try
{
String s = weldPointClientService.HelloWorld();
textBox1.Text = s;
}
catch (Exception ex)
{
MessageBox.Show("FEL " + ex.Message);
}
}
WEB SERVICE CODE:
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Design;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace WeldSupportService
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://esab.se/weldpoint")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[Policy("ServerPolicy")]
public class Service1 : Microsoft.Web.Services3.WebServicesClientProtocol
{
[WebMethod]
public string HelloWorld()
{
return "000";
}
I have read about this problem on the forum and I have followed the advices but I donīt seem to get it to work. Either there is something I donīt understand or something I missed. I have spent several hours on this. Help would be greatly appreciated.