Created
July 27, 2013 15:06
-
-
Save Khrol/6095102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.khroliz; | |
import net.yandex.speller.services.spellservice.*; | |
import java.util.List; | |
public class WebServiceUsage { | |
public static void main(String[] args) { | |
SpellService service = new SpellService(); | |
SpellServiceSoap port = service.getSpellServiceSoap(); | |
CheckTextRequest request = new CheckTextRequest(); | |
request.setLang("en"); | |
request.setText("I lov Java"); | |
CheckTextResponse checkTextResponse = port.checkText(request); | |
List<SpellError> errorList = checkTextResponse.getSpellResult().getError(); | |
System.out.println(errorList.size()); | |
for (SpellError error : errorList) { | |
System.out.println(error.getWord()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment