Server did not recognize the value of HTTP Header SOAPAction

Discussion in 'ASP .Net Web Services' started by Rohit, Aug 21, 2006.

  1. Rohit

    Rohit Guest

    Hi Guys,

    Trying to use Sharepoint Search Webservice. Keep getting the error
    "Server did not recognize the value of HTTP Header SOAPAction"

    Getting nowhere with this error, so any help would be appreciated.

    Cheers,

    Rohit

    Stak Trace as follows:

    [SoapException: Server did not recognize the value of HTTP Header
    SOAPAction:
    http://microsoft.com/webservices/SharePointPortalServer/WebQueryService/QueryEx.]

    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
    message, WebResponse response, Stream responseStream, Boolean
    asyncCall) +1545
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
    methodName, Object[] parameters) +205
    wss_search.QueryService.QueryEx(String queryXml) in
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\mysearchweb\f63621f5\4f629ffa\App_WebReferences.xxse2yhj.2.cs:270
    Search.ExecuteSearch(String keywords) in c:\Documents and
    Settings\rohits\My Documents\Visual Studio
    2005\Projects\MySearchWeb\Search.aspx.cs:196
    Search.btnSearch_Click(Object sender, EventArgs e) in c:\Documents
    and Settings\rohits\My Documents\Visual Studio
    2005\Projects\MySearchWeb\Search.aspx.cs:144
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String
    eventArgument) +97

    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    +33
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +4919
    Rohit, Aug 21, 2006
    #1
    1. Advertising

  2. Rohit

    Techno_Dex Guest

    Check your [Webservice(Namespace ="<value>")] at the top of your webservice
    class. I went round and round the other day with someone about this all
    because I changed the Namespace property. You might also check that your
    reference to your webservice has been refreshed if you changed it.


    "Rohit" <> wrote in message
    news:...
    > Hi Guys,
    >
    > Trying to use Sharepoint Search Webservice. Keep getting the error
    > "Server did not recognize the value of HTTP Header SOAPAction"
    >
    > Getting nowhere with this error, so any help would be appreciated.
    >
    > Cheers,
    >
    > Rohit
    >
    > Stak Trace as follows:
    >
    > [SoapException: Server did not recognize the value of HTTP Header
    > SOAPAction:
    > http://microsoft.com/webservices/SharePointPortalServer/WebQueryService/QueryEx.]
    >
    > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
    > message, WebResponse response, Stream responseStream, Boolean
    > asyncCall) +1545
    > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
    > methodName, Object[] parameters) +205
    > wss_search.QueryService.QueryEx(String queryXml) in
    > c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    > Files\mysearchweb\f63621f5\4f629ffa\App_WebReferences.xxse2yhj.2.cs:270
    > Search.ExecuteSearch(String keywords) in c:\Documents and
    > Settings\rohits\My Documents\Visual Studio
    > 2005\Projects\MySearchWeb\Search.aspx.cs:196
    > Search.btnSearch_Click(Object sender, EventArgs e) in c:\Documents
    > and Settings\rohits\My Documents\Visual Studio
    > 2005\Projects\MySearchWeb\Search.aspx.cs:144
    > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
    > System.Web.UI.WebControls.Button.RaisePostBackEvent(String
    > eventArgument) +97
    >
    > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    > eventArgument) +7
    > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > sourceControl, String eventArgument) +11
    > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    > +33
    > System.Web.UI.Page.ProcessRequestMain(Boolean
    > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    > +4919
    >
    Techno_Dex, Aug 21, 2006
    #2
    1. Advertising

  3. Rohit

    Rohit Guest

    Thanks for your reply. Using a sharepoint service and donot have access
    to the webservice class. Modified the .disco and .wsdl files to support
    service virtualization. Could that be a cause for it? Posting my asmx,
    disco and wsdl files if that could help.

    Thnaks mate,

    -Rohit

    My search.asmx reads as follows:

    <%@ WebService Language="c#"
    Class="Microsoft.Office.Server.Search.Query.QueryService,
    Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c" %>

    Changed the searchdisco.aspx to :

    <%@ Page Language="C#" Inherits="System.Web.UI.Page" %> <%@ Assembly
    Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c" %> <%@ Import
    Namespace="Microsoft.SharePoint.Utilities" %> <%@ Import
    Namespace="Microsoft.SharePoint" %>
    <% Response.ContentType = "text/xml"; %>
    <discovery xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://schemas.xmlsoap.org/disco/">
    <contractRef ref=<% SPEncode.WriteHtmlEncodeWithQuote(Response,
    SPWeb.OriginalBaseUrl(Request) + "?wsdl", '"'); %> docRef=<%
    SPEncode.WriteHtmlEncodeWithQuote(Response,
    SPWeb.OriginalBaseUrl(Request), '"'); %>
    xmlns="http://schemas.xmlsoap.org/disco/scl/" />
    <soap address=<% SPEncode.WriteHtmlEncodeWithQuote(Response,
    SPWeb.OriginalBaseUrl(Request), '"'); %>
    xmlns:q1="http://microsoft.com/webservices/SharePointPortalServer/WebQueryService"
    binding="q1:QueryServiceSoap"
    xmlns="http://schemas.xmlsoap.org/disco/soap/" />
    </discovery>

    And also changed the searchwsdl.aspx service definition to :

    <service name="QueryService">
    <documentation>SharePointPortalServer Query service</documentation>
    <port name="QueryServiceSoap" binding="s1:QueryServiceSoap">
    <soap:address location=<%
    SPEncode.WriteHtmlEncodeWithQuote(Response,
    SPWeb.OriginalBaseUrl(Request), '"'); %> />
    </port>
    </service>



    Techno_Dex wrote:
    > Check your [Webservice(Namespace ="<value>")] at the top of your webservice
    > class. I went round and round the other day with someone about this all
    > because I changed the Namespace property. You might also check that your
    > reference to your webservice has been refreshed if you changed it.
    >
    >
    > "Rohit" <> wrote in message
    > news:...
    > > Hi Guys,
    > >
    > > Trying to use Sharepoint Search Webservice. Keep getting the error
    > > "Server did not recognize the value of HTTP Header SOAPAction"
    > >
    > > Getting nowhere with this error, so any help would be appreciated.
    > >
    > > Cheers,
    > >
    > > Rohit
    > >
    > > Stak Trace as follows:
    > >
    > > [SoapException: Server did not recognize the value of HTTP Header
    > > SOAPAction:
    > > http://microsoft.com/webservices/SharePointPortalServer/WebQueryService/QueryEx.]
    > >
    > > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
    > > message, WebResponse response, Stream responseStream, Boolean
    > > asyncCall) +1545
    > > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
    > > methodName, Object[] parameters) +205
    > > wss_search.QueryService.QueryEx(String queryXml) in
    > > c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    > > Files\mysearchweb\f63621f5\4f629ffa\App_WebReferences.xxse2yhj.2.cs:270
    > > Search.ExecuteSearch(String keywords) in c:\Documents and
    > > Settings\rohits\My Documents\Visual Studio
    > > 2005\Projects\MySearchWeb\Search.aspx.cs:196
    > > Search.btnSearch_Click(Object sender, EventArgs e) in c:\Documents
    > > and Settings\rohits\My Documents\Visual Studio
    > > 2005\Projects\MySearchWeb\Search.aspx.cs:144
    > > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
    > > System.Web.UI.WebControls.Button.RaisePostBackEvent(String
    > > eventArgument) +97
    > >
    > > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    > > eventArgument) +7
    > > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > > sourceControl, String eventArgument) +11
    > > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    > > +33
    > > System.Web.UI.Page.ProcessRequestMain(Boolean
    > > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    > > +4919
    > >
    Rohit, Aug 22, 2006
    #3
  4. Rohit

    Techno_Dex Guest

    That would be the first place I would check. Check to see if you changed
    anything in the files that wouldn't corrispond with the compiled webservice.

    "Rohit" <> wrote in message
    news:...
    > Thanks for your reply. Using a sharepoint service and donot have access
    > to the webservice class. Modified the .disco and .wsdl files to support
    > service virtualization. Could that be a cause for it? Posting my asmx,
    > disco and wsdl files if that could help.
    >
    > Thnaks mate,
    >
    > -Rohit
    >
    > My search.asmx reads as follows:
    >
    > <%@ WebService Language="c#"
    > Class="Microsoft.Office.Server.Search.Query.QueryService,
    > Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral,
    > PublicKeyToken=71e9bce111e9429c" %>
    >
    > Changed the searchdisco.aspx to :
    >
    > <%@ Page Language="C#" Inherits="System.Web.UI.Page" %> <%@ Assembly
    > Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,
    > PublicKeyToken=71e9bce111e9429c" %> <%@ Import
    > Namespace="Microsoft.SharePoint.Utilities" %> <%@ Import
    > Namespace="Microsoft.SharePoint" %>
    > <% Response.ContentType = "text/xml"; %>
    > <discovery xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xmlns="http://schemas.xmlsoap.org/disco/">
    > <contractRef ref=<% SPEncode.WriteHtmlEncodeWithQuote(Response,
    > SPWeb.OriginalBaseUrl(Request) + "?wsdl", '"'); %> docRef=<%
    > SPEncode.WriteHtmlEncodeWithQuote(Response,
    > SPWeb.OriginalBaseUrl(Request), '"'); %>
    > xmlns="http://schemas.xmlsoap.org/disco/scl/" />
    > <soap address=<% SPEncode.WriteHtmlEncodeWithQuote(Response,
    > SPWeb.OriginalBaseUrl(Request), '"'); %>
    > xmlns:q1="http://microsoft.com/webservices/SharePointPortalServer/WebQueryService"
    > binding="q1:QueryServiceSoap"
    > xmlns="http://schemas.xmlsoap.org/disco/soap/" />
    > </discovery>
    >
    > And also changed the searchwsdl.aspx service definition to :
    >
    > <service name="QueryService">
    > <documentation>SharePointPortalServer Query service</documentation>
    > <port name="QueryServiceSoap" binding="s1:QueryServiceSoap">
    > <soap:address location=<%
    > SPEncode.WriteHtmlEncodeWithQuote(Response,
    > SPWeb.OriginalBaseUrl(Request), '"'); %> />
    > </port>
    > </service>
    >
    >
    >
    > Techno_Dex wrote:
    >> Check your [Webservice(Namespace ="<value>")] at the top of your
    >> webservice
    >> class. I went round and round the other day with someone about this all
    >> because I changed the Namespace property. You might also check that your
    >> reference to your webservice has been refreshed if you changed it.
    >>
    >>
    >> "Rohit" <> wrote in message
    >> news:...
    >> > Hi Guys,
    >> >
    >> > Trying to use Sharepoint Search Webservice. Keep getting the error
    >> > "Server did not recognize the value of HTTP Header SOAPAction"
    >> >
    >> > Getting nowhere with this error, so any help would be appreciated.
    >> >
    >> > Cheers,
    >> >
    >> > Rohit
    >> >
    >> > Stak Trace as follows:
    >> >
    >> > [SoapException: Server did not recognize the value of HTTP Header
    >> > SOAPAction:
    >> > http://microsoft.com/webservices/SharePointPortalServer/WebQueryService/QueryEx.]
    >> >
    >> > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
    >> > message, WebResponse response, Stream responseStream, Boolean
    >> > asyncCall) +1545
    >> > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
    >> > methodName, Object[] parameters) +205
    >> > wss_search.QueryService.QueryEx(String queryXml) in
    >> > c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    >> > Files\mysearchweb\f63621f5\4f629ffa\App_WebReferences.xxse2yhj.2.cs:270
    >> > Search.ExecuteSearch(String keywords) in c:\Documents and
    >> > Settings\rohits\My Documents\Visual Studio
    >> > 2005\Projects\MySearchWeb\Search.aspx.cs:196
    >> > Search.btnSearch_Click(Object sender, EventArgs e) in c:\Documents
    >> > and Settings\rohits\My Documents\Visual Studio
    >> > 2005\Projects\MySearchWeb\Search.aspx.cs:144
    >> > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
    >> > System.Web.UI.WebControls.Button.RaisePostBackEvent(String
    >> > eventArgument) +97
    >> >
    >> > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    >> > eventArgument) +7
    >> > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    >> > sourceControl, String eventArgument) +11
    >> > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    >> > +33
    >> > System.Web.UI.Page.ProcessRequestMain(Boolean
    >> > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    >> > +4919
    >> >

    >
    Techno_Dex, Aug 22, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=

    Server did not recognize the value of HTTP Header SOAPAction

    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=, May 25, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    28,700
    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=
    May 25, 2007
  2. Juan Rodriguez

    Server did not recognize the value of HTTP Header SOAPAction

    Juan Rodriguez, Aug 28, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    156
    Juan Rodriguez
    Aug 28, 2003
  3. Hazzard
    Replies:
    3
    Views:
    210
    Hazzard
    Sep 13, 2003
  4. Steve Evans
    Replies:
    2
    Views:
    150
    Steve Evans
    Jan 20, 2004
  5. Matt Greer
    Replies:
    2
    Views:
    263
    chriso
    Feb 6, 2004
Loading...

Share This Page