передача HTTP-заголовка
От: threak  
Дата: 07.07.06 08:18
Оценка:
Есть веб-парт в SharePoint, который получает контент от веб-сервиса. Ниже описан кусок прокси-класса, в котором описан
SOAP запрос к сервису:
[System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="WSRP_v1_PortletManagement_Binding_SOAP", Namespace="urn:oasis:names:tc:wsrp:v1:bind")]
    public class WSRP_v1_PortletManagement_Binding_SOAP : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        /// <remarks/>
        public WSRP_v1_PortletManagement_Binding_SOAP() {
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:oasis:names:tc:wsrp:v1:getPortletDescription", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
        [return: System.Xml.Serialization.XmlElementAttribute("getPortletDescriptionResponse", Namespace="urn:oasis:names:tc:wsrp:v1:types")]
        public PortletDescriptionResponse getPortletDescription([System.Xml.Serialization.XmlElementAttribute("getPortletDescription", Namespace="urn:oasis:names:tc:wsrp:v1:types")] getPortletDescription getPortletDescription1) {
            object[] results = this.Invoke("getPortletDescription", new object[] {
                        getPortletDescription1});
            return ((PortletDescriptionResponse)(results[0]));
        }


при вызове метода getPortletDescription нужно, чтобы с SOAP-запросом, который мы отсылаем, передавался в http-заголовке какой-нибудь параметр.
Через
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:oasis:names:tc:wsrp:v1:getPortletDescription", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]

в качестве параметра хттп-заголовка передается SOAPAction: "urn:oasis:names:tc:wsrp:v1:getServiceDescription"

Возможно так же, через аттрибут передать свой хттп-заголовок?
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.