Hello,
I have a question. But first my situation: I had a Web Service, which
was written using .NET Framework 2.0, here is my code:
[WebService(Name space = "http://tempuri.org/")]
[WebServiceBindi ng(ConformsTo = WsiProfiles.Bas icProfile1_1)]
public class Service : System.Web.Serv ices.WebService
{
public class Authentication : SoapHeader
{
public String user;
public String pwd;
}
public Authentication auth;
public Service () {
//InitializeCompo nent();
}
[WebMethod]
[SoapHeader("aut h")]
public string HelloWorld()
{
return auth.user + " : " + auth.pwd;
}
}
Now i need to write same Web Service, using .NET Framework 3.0, because
i will be hosting it from Windows Forms application.
So, here is my code, using WCF:
[MessageHeader(N ame = "informacij a")]
public class Authentication : SoapHeader
{
public String user;
public String pwd;
}
[ServiceContract]
public class metodai
{
public Authentication auth;
[OperationContra ct]
String Ziurim()
{
return "User: " + auth.user;
}
}
So, here is problem that i can't solve myself: How can I check SOAP
header information using WCF components in my new Web Service? And be
able to use new Web Service's proxy class that is generated with
wsdl.exe tool from client application? and send same SOAP header from
..NET 2.0 Framework Client ?
I have a question. But first my situation: I had a Web Service, which
was written using .NET Framework 2.0, here is my code:
[WebService(Name space = "http://tempuri.org/")]
[WebServiceBindi ng(ConformsTo = WsiProfiles.Bas icProfile1_1)]
public class Service : System.Web.Serv ices.WebService
{
public class Authentication : SoapHeader
{
public String user;
public String pwd;
}
public Authentication auth;
public Service () {
//InitializeCompo nent();
}
[WebMethod]
[SoapHeader("aut h")]
public string HelloWorld()
{
return auth.user + " : " + auth.pwd;
}
}
Now i need to write same Web Service, using .NET Framework 3.0, because
i will be hosting it from Windows Forms application.
So, here is my code, using WCF:
[MessageHeader(N ame = "informacij a")]
public class Authentication : SoapHeader
{
public String user;
public String pwd;
}
[ServiceContract]
public class metodai
{
public Authentication auth;
[OperationContra ct]
String Ziurim()
{
return "User: " + auth.user;
}
}
So, here is problem that i can't solve myself: How can I check SOAP
header information using WCF components in my new Web Service? And be
able to use new Web Service's proxy class that is generated with
wsdl.exe tool from client application? and send same SOAP header from
..NET 2.0 Framework Client ?