요청을 만들고 SOAP 객체를 전달하려고 할 때 문제가 다시 발생하지만 (onSuccess) responseXML이없는 것입니다. 필자는 Fiddler와 HTTP Client (OSX 버전의 fiddler)를 사용하고 동일한 요청을 입력했습니다. 프로토 타입이 아니라별로. 내가 헤더 및 매개 변수 필드에 노력SOAP 프로토 타입 Ajax SOAPAction 헤더 질문
...
<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>
는 그래서 그것을 검사 할 수 있습니다 나누기 어디 그래서 난 그냥를 & J를 알고하는 VAR. 나는 또한 온라인으로 보았고 누군가가 text/xml application/xml 대신 textset/utf-8을 추가한다고 말했어. 그래서 나는 그 모든 것을했지만 여전히 아무것도하지 않았다. 누구나 SOAPAction을 사용하여 XML을 가져 오는 방법을 알고 있습니까?