Here is my $.ajax() code, but it can't work.
After I change the form from contentType: "text/xml ; ",
to contentType: "text/xml ; charset=UTF-8",
The request is broken. However, according to the official document: api/$.ajax, I have to do so,or the charset will be same with the server.
var soapRequest_add_a_new_story_to_db= '<?xml version="1.0" encoding="utf-8"?>'+ '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+ 'xmlns:xsd="http://www.w3.org/2001/XMLSchema" '+ 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+ '<soap:Body> '+ '<AddNewStory xmlns="http://x.x.x.x/StoryForMac/">'+ '<StoryID>'+story_id+'</StoryID>'+ '<UserName>' +User_Name+ '</UserName>'+ '<Story_CreateTime>'+Edit_Time+'</Story_CreateTime>'+ '<StoryName>'+Story_Name+'</StoryName>'+ '</AddNewStory>'+ '</soap:Body>'+ '</soap:Envelope>'; $.ajax({ type: "POST", url: webServiceAddNewStoryToDbUrl, contentType: "text/xml ; charset=UTF-8", dataType: "xml", data: soapRequest_add_a_new_story_to_db, success: processSuccess, //If the SOAP connection sucessess, the function: processSuccess() will be called. error: processError });