使用VB呼叫WebService 介面定義String submit (String message)
message是XML格式的字串
我用MSSOAPLib30.SoapClient30創建實體,呼叫MSSoapInit方法沒有出錯
但是呼叫這個介面的時候
回傳的錯誤是"Found element {http://service.ws.ctcoss.ctc.com/}arg0 but could not find matching RPC/Literal part"
求教高手這是什么原因
急!
uj5u.com熱心網友回復:
我連MSSoapInit都通不過,郁悶。uj5u.com熱心網友回復:
其實 你可以不用 soap 呼叫webservice 呼叫.net 的還可以 呼叫其他語言寫的經常不錯 。其實 webservices 就是一個 xml 的 提交 和回傳值 可以進行 js 的決議。
function RequestWebService() {
//這是我們在第一步中創建的Web服務的地址
var URL = "http://10.20.50.80:8080/cc_yunda/services/WebServiceHost?wsdl/sendCallcountToService";
//在這處我們拼接
var data;
data = '<?xml version="1.0" encoding="utf-8"?>';
data = data + '<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">';
data = data + '<soap12:Body>';
data = data + '<HelloWorld xmlns="http://tempuri.org/" />';
data = data + '</soap12:Body>';
data = data + '</soap12:Envelope>';
//創建異步物件
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.Open("POST", URL, false);
xmlhttp.SetRequestHeader("Content-Type", "application/soap+xml");
xmlhttp.Send(data);
document.getElementById("data").innerHTML = xmlhttp.responseText;
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/133277.html
標籤:網絡編程
上一篇:求助于字串搜索!
下一篇:vb.net中在form1表單中放置三個按鈕,這三個按鈕分別對應不同的三個表單,按下按鈕進入對應的表單中,這要怎么編程
