如何将每一个结合起来

I'm trying to make soap request inside .each() but jQuery executes the next object (in the list) before the first soap request finished. How can I put a lock on it ?

For example:

$(xmlHttpRequest.responseXML).find("Items").find("PowerPlant").each(function(index, item){      
    sendSOAPRequest(item);
});

You need to execute the next iteration of the $.each loop inside of the soap request's complete callback function.

I am not 100% sure what library you are using, but in some of the sendSOAPRequest calls in some of the versions you should be able to set an async variable to false, thus forcing them to be executed one at a time:

$(xmlHttpRequest.responseXML).find("Items").find("PowerPlant").each(function(index, item){      
    sendSOAPRequest(item, {async: false}); //Might be other syntax. Look at the doc for your library.
});

If this does not work, you can do as Brad M suggests:

items = $(xmlHttpRequest.responseXML).find("Items").find("PowerPlant");           

function sendSoapReq(itemList){
    if(itemList.length > 0)
    {
        sendSOAPRequest(itemList.splice(0,1), function(){
            sendSoapReq(itemList);
        });
    }
}

sendSoapReq(items);