Search code examples
javascriptweb-servicesauthenticationsharepoint-2010fastsearch

how to call sharepoint fast search web service from javascript?


How can I call methods from sharepoint fast search web service ex: QueryEx , GetQuerySuggestions I followed this Article

but every time i get this error :

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><faultcode>soap:Client</faultcode><faultstring>Data at the root level is invalid. Line 1, position 1.</faultstring></soap:envelope>

I also check the outgoing message with fiddler , and i found that the body is 0 and it returns "401 Unauthorized" any ideas please ?


Solution

  • The problem was Cross-domain calling from JavaScript to WCF sevice , so I created a new web service in the same domain of the web application and consumed the other service from it .

    javascript ----call----> Proxy webservice -----call-----> webservice in different domain