Hi I am begginer with asmx web service. On web service side I add ticket in soap header if user call web method addTicket.
public class TicketIdentity
{
private string ticket;
public string Ticket
{
get { return ticket; }
}
public TicketIdentity(string _ticket)
{
this.ticket = _ticket;
}
}
public class TicketHeader : SoapHeader
{
public string Ticket;
public TicketHeader(string ticket)
{
Ticket = ticket;
}
public TicketHeader()
{ }
}
[SoapHeader("Ticket", Direction = SoapHeaderDirection.Out)]
public void addTicket()
{
//...
TicketIdentity ticket = new TicketIdentity(secureUtil.GetGuid());
Application[ticket.Ticket] = ticket;
Ticket = new TicketHeader(ticket.Ticket);
}
How can I check on client side in proxy class, if the proxy object have Ticket ? Here is a code of proxy:
namespace proxy
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://tempuri.org/")]
public partial class Service : System.Web.Services.Protocols.SoapHttpClientProtocol
{
[AttributeUsage(AttributeTargets.Method)]
//...
private TicketHeader ticketHeaderValueField;
public TicketHeader TicketHeaderValue {
get {
return this.ticketHeaderValueField;
}
set {
this.ticketHeaderValueField = value;
}
}
//...
bool checkTicket()
{
//...
}
}
//...
}
I would like have method checkTicket in class Service, which check if have user ticket. Can somebedy help me ?