Hi, i have a service in which SOAP Header Attribute is used for passing paramters.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "S:Apple.Summry")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Service : System.Web.Services.WebService
{
public class Apple : SoapHeader
{
public string Amountt = "0.0";
public string Number = "1";
public string Type = "Credit";
public string Date = "2011/09/26";
public string Id = "AVST000XXXX201109990000012";
}
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
public Apple apple;
[WebMethod]
[SoapHeader("apple", Direction = SoapHeaderDirection.InOut)]
public void HelloWorld()
{
if (apple == null) { apple = new Apple(); }
}
}
but now i need do this work in a wcf service
Please help how do i use Soap Header in WCF, its really urgent please help me......