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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:51:44+00:00 2026-05-13T14:51:44+00:00

So I am trying to make a request and pass in a SOAP object,

  • 0

So I am trying to make a request and pass in a SOAP object, the problem is that it comes back fine (onSuccess) but the responseXML is not there. I used Fiddler and HTTP Client (OSX version of fiddler) and input the same requests, boom, both back with the correct response. With prototype, not so much.

I tried in the header and in the parameters fields…

<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript">
    function test(){
        var body = '<?xml version="1.0" encoding="utf-8"?>' +
        '<soap:Envelope' +
        ' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' +
        ' xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"' +
        ' xmlns:tns="urn:uvindexalert" xmlns:types="urn:uvindexalert/encodedTypes"' +
        ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
        ' xmlns:xsd="http://www.w3.org/2001/XMLSchema">' +
        '  <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">' +
        '    <tns:getUVIndexAlertByZipCode>' +
        '       <in0 xsi:type="xsd:string">92109</in0>' +
        '   </tns:getUVIndexAlertByZipCode>' +
        '  </soap:Body>' +
        '</soap:Envelope>';

        var headers = ["SOAPAction", " ", "Content-Type", "text/xml"];

        var request = new Ajax.Request("http://iaspub.epa.gov/uvindexalert/services/UVIndexAlertPort?wsdl", {
            contentType: "application/xml",
            requestHeaders: headers,
            parameters: "SOAPAction: ",
            postBody: body,
            onSuccess: function(response){
                var j = 0;
            },
            onFailure: function(){
                var i = 0;
            }
        });
    }

    test();
</script>

The var i & j are just so I know where it breaks so I can inspect it. I also looked online and noticed someone said try instead of text/xml application/xml then add charset=utf-8 so I did all that but still nothing. Anyone know for sure how to get back XML with a SOAPAction?

  • 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-13T14:51:44+00:00Added an answer on May 13, 2026 at 2:51 pm

    Cross site scripting security issues aside, I’ve written a Prototype.js SOAP client before and had lots of problems with the ‘Content-Type’ and ‘SOAPAction’ headers. I eventually used the following and it worked (But only for requests in the same domain).

    Content-Type: text/xml; charset=utf-8
    SOAPAction: ""
    

    The webserver should send this header for OPTIONS requests:

    Access-Control-Allow-Origin: *
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a request to a web page using WebRequest class
I am trying to make an asynchronous request with POST method from a web
I'm trying to make a HTTP request through an open SOCKS5 proxy. I have
I'm trying to pass the DELETE to a URL in asp.net MVC using JavaScript
I'm trying to implement a Widget control that exists on every page in the
I think that I am having a slow evening but I have a question
I am working on implementing a JavaScript web bug that will be inserted into
I can't find anything in the docs on exactly how to do this. http://nodejs.org/api.html#request-method-149
I am implementing a full text search API for my rails apps, and so
I am using T4MVC to redirect to another action return RedirectToAction(MVC.MyController.MyAction());. In result it

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.