これは私のクライアント側のコードです。この関数を呼び出すと、400 の不正な要求エラーが発生します。誰か助けてください。
var req_params="<?xml version=\"1.0\" encoding=\"utf-8\"?>";
req_params = req_params + "<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/\">";
req_params = req_params + "<soap:Header>";
req_params = req_params + "<UserDetails>";
req_params = req_params + "<Lastname>Abubakar</Lastname>";
req_params = req_params + "<Othernames>Uju, Ayo</Othernames>";
req_params = req_params + "<Email>me@me.com</Email>";
req_params = req_params + "<Phone>08032458829</Phone>";
req_params = req_params + "</UserDetails>";
req_params = req_params + "</soap:Body>";
req_params = req_params + "</soap:Envelope>";
console.log(req_params);
$.ajax({
type: "POST",
url: "http://testservices.interswitchng.com/quicktellerservice/quickteller.svc/CreateUser",
data: req_params,
processData:false,
contentType: "text/xml; charset=\"utf-8\"",
dataType: "xml",
success: function (data) {
console.log(data);
},
error: function (xhr, status, error) {
alert(error);
}
});