Working with SpellCheck.asmx

Coordinator
Nov 21, 2012 at 3:36 AM

TechnSmile wrote Nov 13 at 2:39 PM

Hello Marc,

I have tried it out !

The webservice spellcheck.asmx cannot be called properly with 0.7.2
I had to update the webservice definition contained in SPServices() as follow to make it work (missing '>' at end of line 2) :

case SPELLCHECK:
SOAPEnvelope.opheader += "xmlns='http://schemas.microsoft.com/sharepoint/publishing/spelling/' >";
SOAPAction = "http://schemas.microsoft.com/sharepoint/publishing/spelling/SpellCheck";


Also, we are not able to use the parameter "chunksToSpell" as spelled chunks need to be surrounded with <string>myChunkSpell</string>

I am not very familiar with your great lib and maybe you wrote a utility function to handle this case.
Please find my apologizes if this is a stupid question.

Thanks for your time and energy, your work is a piece of art !

Sebastien

As reference, you will find my example code :

var chunks = "Thhank yoou Marck ;)".split(" "),
i = 0;

for (i=0; i<chunks.length; i++){
chunks[i] = "<string>" + chunks[i] + "</string>";
}

var spellResults = $().SPServices({
operation: "SpellCheck",
chunksToSpell: chunks, 
declaredLanguage: 1036, // use 1033 for english
useLad: false,

completefunc: function(xData, Status){
...
}
});
Coordinator
Nov 21, 2012 at 3:38 AM

Sebastien:

Thanks for catching the error in the opheader for SPELLCHECK. The example you give is helpful, too. I'm going to add this to the list for the next release (TBD).

In the meantime, it looks like you're up and running, at least.

M.

Coordinator
Nov 21, 2012 at 3:39 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.