Я использую wsdl, используя c #, и получаю следующую ошибку "Заголовок SOAP To не был понят".
Что вызывает эту проблему и как ее решить?
Спасибо за ваш ответ. По вашему предложению я попробовал этот код:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class MyHeader : SoapHeader
{
public bool _MustUnderstand;
public MyHeader() { }
public bool MustUnderstand
{
get { return _MustUnderstand; }
set { _MustUnderstand = value; }
}
}
public class Service : System.Web.Services.WebService
{
public MyHeader MustUnderstand;
public Service ()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
[SoapHeader("MustUnderstand")]
public void Nokia()
{
MustUnderstand = new MyHeader();
MustUnderstand.MustUnderstand = true;
WebService connect = new WebService();
long publicKeyK ;
publicKeyK= connect.GetPublicKey(out publicKeyK);
}
}
(я также поставил false в свойстве mustUnderstand ...)
I'mпо-прежнему получить то же сообщение об ошибке.«SOAP-заголовок не был понят»
Есть идеи?Poli.