Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8848883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:30:28+00:00 2026-06-14T12:30:28+00:00

Here is my $.ajax() code, but I can’t make it work. After I change

  • 0

Here is my $.ajax() code, but I can’t make it 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     
        }); 

My another relevant emergent issue Chinese Character doesn’t appear. is similar to this one, if available, please take a look.

UPDATE:

Please read this part of the doc,(ctr+f, jump to “processData”).

I think my data is already a query string so that I ignore the option:processData. The doc says: “If you want to send a DOMDocument, or other non-processed data, set this option to false.” But my soapRequest_add_a_new_story_to_db is not a DOMDocument. And what’s the definition of “non-processed” data? Please give explain and relative reference document.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:30:29+00:00Added an answer on June 14, 2026 at 12:30 pm

    In your ajax call you have to prevent the processing of your data. You basically tell jquery: “don’t touch my request and response data I know what I’m doing.”
    The data in your request var is a valid soap message as is, so you want to prevent that jquery tries to convert it (which it will do for json or xml data).

      $.ajax({
            type: "POST",
            url: webServiceAddNewStoryToDbUrl,
            contentType: "text/xml; charset=\"UTF-8\"",
            dataType: "xml",   
            processData: false, 
            data: soapRequest_add_a_new_story_to_db,        
            success: processSuccess, //If the SOAP connection sucessess, the function: processSuccess() will be called.  
            error: processError     
        }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to get array data from json in c#? Here is the ajax code
Here's my client-side jQuery code: $.ajaxSetup ({ contentType: application/json, datatype: 'json' }); $.ajax({ type:
I am trying to submit a form with ajax. Here is my complete code
I'm having trouble to display data after form submition using JS and AJAX here
I'd like to use mockjax with qunit but can't get it to work. Here
Here is my Ajax code: var myJSONObject = {bindings: [ {ircEvent: PRIVMSG, method: newURI,
I've got a quite strange problem here. I'm calling some simple code via Ajax.Updater:
Here is the code I'm currently using: $.ajax({ success: function(){ $('.post_container').append('test <br />'); }
i'm trying wmd editor over ajax. here there is the bugged code wdm code
I am using ASP.NET page methods with jQuery. Here is my code, $.ajax({ type:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.