これが役立つかどうかはわかりませんが、次のようなajax.asmx
Webサービスを使用し、jQueries ajaxを使用して呼び出します
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports ClsLib
Imports Microsoft.WindowsAzure.StorageClient
Imports Microsoft.WindowsAzure
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
<System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class Ajax
<System.Web.Services.WebMethod()> _
Public Function function1(byval first as string, byval second as string) as string
'do something here
Return someJsonAsString
End Function
End Class
そのような何かがあなたを助けることができると思います。
ただし、独自のクラスを作成して既存の SOAP XML サービスを処理することはできますが、より多くのクライアント側コードが必要になります。
var productServiceUrl = 'http://localhost:57299/ProductService.asmx?op=SaveProduct'; // Preferably write this out from server side
function beginSaveProduct(productID, productName, manufactureDate)
{
var soapMessage =
'<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/"> \
<soap:Body> \
<SaveProduct xmlns="http://sh.inobido.com/"> \
<productID>' + productID + '</productID> \
<productName>' + productName + '</productName> \
<manufactureDate>' + manufactureDate + '</manufactureDate> \
</SaveProduct> \
</soap:Body> \
</soap:Envelope>';
$.ajax({
url: productServiceUrl,
type: "POST",
dataType: "xml",
data: soapMessage,
complete: endSaveProduct,
contentType: "text/xml; charset=\"utf-8\""
});
return false;
}
function endSaveProduct(xmlHttpRequest, status)
{
$(xmlHttpRequest.responseXML)
.find('SaveProductResult')
.each(function()
{
var name = $(this).find('Name').text();
});
}
そして、jQuery で SOAP 応答を解析しています。そのためのプラグインがあると思います。