简体   繁体   中英

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 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM