index > Windows Live Search: Development > Soap Exception Reference.cs Line 38

Soap Exception Reference.cs Line 38

Used to be fine, I could run my apps and the sample no problem.  Now I get a soap exception when Search() is attempted to be invoked. 

System.Web.Services.Protocols.SoapException: Client Error at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at [...].MSNSearchService.Search(SearchRequest Request) in [...]\Reference.cs:line 38

I get this when trying to run my apps or the sample apps, any ideas?



Conrad
ConradC
I've been running into the same problem too. It seems like the WSDL for the web service was updated, so I updated all my web references, but still no luck. I think there has been some sort of change in the API that we need to account for in our applications, but I'm not sure what.
Rohan Singh
I got the same error. Debugging through the received SoapException (look at the "Detail" property) I saw I needed to configure a new "CultureInfo" parameter. Set this to e.g. "en-US" and it worked for me. It's properly the same type of error you're having.

For reference, this works for v0.5.0 of the MSN Search Web Service:



MSNSearchService msn = new MSNSearchService();

SearchRequest req = new SearchRequest();
req.AppID = "[ your app id ];
req.Query = "[ your query ]";
req.Flags = SearchFlags.MarkQueryWords;
req.CultureInfo = "en-US";

SourceRequest source = new SourceRequest();
source.Source = SourceType.Web;
source.Count = 10;
source.ResultFields = ResultFieldMask.All;
req.Requests = new SourceRequest[] { source };

 


Peter Theill
Unfortunately, that didn't work for me and the sample has that property set but I still get that Soap exception when trying to run the sample.  My relevant code is:


                    MSNSearchService s = new MSNSearchService();

                    SearchRequest searchRequest = new SearchRequest();
                    searchRequest.Query = keyword;
                    searchRequest.AppID = "AppID";
                    searchRequest.Flags = SearchFlags.MarkQueryWords;
                    searchRequest.CultureInfo = "en-US";

                    SourceRequest sourceRequest = new SourceRequest();
                    sourceRequest.Source = SourceType.Web;
                    sourceRequest.ResultFields = ResultFieldMask.All;
                    sourceRequest.Offset = pass*50;
                    sourceRequest.Count = 50;

                    searchRequest.Requests = new SourceRequest[] { sourceRequest };

                    SearchResponse searchResponse = s.Search(searchRequest);

 


I haven't had time to try to trace the problem to a specific instance but it looks like that's what I'll need to do :\

I'm glad it's working for you though!



Conrad
ConradC

The SOAP exception should have information regarding what is incorrect with the request.  The exception you posted is the exception thrown by managed code when it received the exception from the server.

Erin

MSN Search Test




Erin, MSN Search Test
Erin McGowan
reply 5

You can use google to search for other answers

 

More Articles

• read am WSDL
• Image search?
• problems Signing Into Windows Live Messenger v8.0
• Yahoo API
• How to change a CultureInfo and what effect on search it has!?
• Developer Provisioning System not found
• Consuming MSN Search Web Service from PHP
• Live search service not responding
• Writing a Client in Java
• SoapException on MSN search
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Showing non-english caracters in search
• Comparison of Google, Yahoo, MSN APIs
• Use asynchronous Search API
• How can i get Account and TOKEN for WEB
• Python Interfacing with API
• application ids
• org.apache.axis.ConfigurationException:
• How to change a search result?
• proxy authentication required error
• ERRO
• Local Search Issues
• read am WSDL
• Displaying the search result
• Error while using MSN Search Web Service
• XmlDataSource?

Hot Articles

• optional parameters for xml
• Using MSN Search from aspx page - Questi
• Better SDK please
• read am WSDL
• XmlDataSource?
• No results after first SourceResponse
• Bounce on feedback email
• Yahoo API
• Using Search API to return adverts
• Getting more than 250 results
• Unattended Soap Installation
• Commercial usage
• What consitutes a query?
• Soap Exception Reference.cs Line 38
• Search News?

Recommend Articles

• Visual Studio Only?
• DateTime field
• Showing non-english caracters in search
• Windows Live Search API (Needs to be Sim
• Results Not All There
• ERRO
• Client Error
• Sample Timeouts
• live.com too slow
• read am WSDL
• how can i turn off website grouping in t
• No results with inurl: parameter
• error 1601
• escaped XML string ---> XML?
• MSN Search Developer Site Error.