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 6903545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:56:20+00:00 2026-05-27T07:56:20+00:00

I have constructed a full soap envelope soapEnvelopeXML and I can see the call

  • 0

I have constructed a full soap envelope soapEnvelopeXML and I can see the call come through my TCP/IP Monitor, but the issue is that instead of calling the right method, the request URI comes in concatenated with the soapEnvelopeXML as if it is an option in the header. So i am not getting any result. I don’t want to pass in the parameters as JSON objects. Any ideas on where i could be going wrong?

$.ajax({
    type: "GET",
    url: "http://localhost:8080/webservice/serviceName/",
    data: soapEnvelopeXML,
    contentType: "text/xml",
    dataType: "xml",       
    error: function(xhr, status, error) { 
        alert("Error processing your request: \n" + status + " : " + error);
    },
    success: function(response){
        var xml = $(response);
        alert(xml);
    }
});

I have tested the code on top to use POST instead of GET but I was getting an empty response and I see that an empty webservice call was being made. I didnt know that GET was illegal for SOAP requests. Does anyone know why the sent content is an empty call?

  • 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-05-27T07:56:21+00:00Added an answer on May 27, 2026 at 7:56 am

    Maybe the problem is that SOAP should be POST?

    http://www.coderanch.com/t/463869/Web-Services/java/SOAP-request-as-HTTP

    Q: How do I send a SOAP request as HTTP GET?

    A: You can’t. SOAP always uses POST. Only REST uses GET (as well as various other HTTP methods, including POST).

    Update:

    Thanks for this, I was using GET because an empty web-service call was was made when I use POST. So any ideas as to why I make empty web-service calls when I use POST?

    I am getting the same behavior on my local box if I go to localhost, but I got it working by doing this:

    1. Make up a domain name
    2. Stick it in the hosts file, pointing to 127.0.0.1
    3. Access the local webserver with that fake domain

    Try this code, it is working for me:

    var soapEnvelopeXML= "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\"> <soap:Header>CUSTOM HEADER</soap:Header> <soap:Body>PARAMS</soap:Body> </soap:Envelope>";
    $.ajax({
        type: "post",
        url: "http://superblah.com/webservice/serviceName/",
        contentType: "text/xml; charset=\"utf-8\"",
        dataType: "xml",       
        data: soapEnvelopeXML,
        processData: false,
        beforeSend: function(xhr){
          xhr.setRequestHeader(
            "SOAPTarget",
            "http://superblah.com/webservice/serviceName/"
          );
          xhr.setRequestHeader(
            "SOAPAction",
            "http://superblah.com/webservice/serviceName/Something"
          );
        },
        error: function(xhr, status, error) { 
            alert("Error processing your request: \n" + status + " : " + error);
        },
        success: function(response){
            var xml = $(response);
            alert(xml);
        }
    });
    

    I got this code from here:

    • http://www.bennadel.com/blog/1853-Posting-XML-SOAP-Requests-With-jQuery.htm
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asked similar questions before but here is a full demo example code.
I have an issue where the call the MQQueueManager constructor is hanging if the
I have constructed an XML tree structure of an XML file. I am able
I have constructed a suffix trie, a tree containing all the suffixes of a
I have constructed a collection of data series items. Each data series has multiple
I have a description text file with content constructed in such manner: Book title
I have a header which I constructed like this: <header class=top> <a href=> <span
Hi I have a question about this pointer, when an object is constructed, when
Let's say you have three tables named Item, Event, and Seat, constructed as such:
Suppose, I have a lot of classes, which are constructed using Java reflection (for

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.