SOAP Implementation for Spell SourceType
Bing
This topic contains the following details of a Spell SourceType query sent to the SOAP interface:
-
Request Example
-
Response Example
For an example of code that might generate the request in this topic, see SOAP Code Samples (Spell SourceType).
This section contains an example of an HTTP query string that the aforementioned code might generate.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SearchRequest xmlns="http://schemas.microsoft.com/LiveSearch/2008/03/Search">
<parameters>
<Market>en-us</Market>
<Query>Mispeling words is a common ocurrence.</Query>
<AppId>Insert your AppId here</AppId>
<Options>
<SearchOption>EnableHighlighting</SearchOption>
</Options>
<Sources>
<SourceType>Spell</SourceType>
</Sources>
</parameters>
</SearchRequest>
</soap:Body>
</soap:Envelope>
This section contains an example of a response that Bing might return when sent the query string in the previous section:
<?xml version="1.0" encoding="utf-8"?>
<!--pageview_candidate-->
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<SearchResponse xmlns="http://schemas.microsoft.com/LiveSearch/2008/03/Search">
<parameters>
<Version>2.0</Version>
<Query>
<SearchTerms>Mispeling words is a common ocurrence.</SearchTerms>
</Query>
<Spell>
<Total>1</Total>
<Results>
<SpellResult>
<Value>Misspelling words is a common occurrence.</Value>
</SpellResult>
</Results>
</Spell>
</parameters>
</SearchResponse>
</soapenv:Body>
</soapenv:Envelope>
Show: