相关疑难解决方法(0)

WCF服务的REST/SOAP端点

我有一个WCF服务,我想将它作为RESTfull服务和SOAP服务公开.以前有人做过这样的事吗?

rest wcf soap

420
推荐指数
4
解决办法
26万
查看次数

ASP.NET WebAPI + Soap

WebAPI是否支持SOAP?我正在尝试在MVC4中编写SOAP服务器,虽然我可以在WCF中执行它,但似乎WebAPI正在替换它,但我认为没有办法在此使用SOAP,只使用REST Style接口的JSON/XML.

c# asp.net-mvc-4 asp.net-web-api

28
推荐指数
4
解决办法
3万
查看次数

问题从jQuery调用WCF服务库

我有一个通过我的ASPX站点公开的WCF服务库,如下所示

[System.ServiceModel.OperationContract]
[System.ServiceModel.Web.WebInvoke(
Method= "POST",
RequestFormat=System.ServiceModel.Web. WebMessageFormat .Json,
ResponseFormat=System.ServiceModel.Web.WebMessageFormat .Json)]
LogonResponse Logon(LogonRequest logonRequest);


[System.Runtime.Serialization.DataContract]
[ Serializable()]
public class LogonRequest
{
[System.Runtime.Serialization.DataMember]
public string EMailAddress;
[System.Runtime.Serialization.DataMember]
public string Password;
}
Run Code Online (Sandbox Code Playgroud)

在我的测试页面中,我可以通过MS Ajax调用: -

<asp:ScriptManager ID ="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/testService.svc" />
</Services>
</asp:ScriptManager>
.
.
.
function clsLogonRequest(eMailAddress, password) {
this .EMailAddress = eMailAddress;
this .Password = password;
}

function login(eMailAddress, password) {
var LogonRequest = new clsLogonRequest(eMailAddress, password);
name.API.IAPI.Logon(LogonRequest, onSuccess, onFailure);
}

function onSuccess(result) {
$( "#txtSessionId").val(result.SessionId);
$( "#txtUserName").val(result.Name);
$( …
Run Code Online (Sandbox Code Playgroud)

ajax wcf jquery json .net-3.5

7
推荐指数
1
解决办法
5592
查看次数

标签 统计

wcf ×2

.net-3.5 ×1

ajax ×1

asp.net-mvc-4 ×1

asp.net-web-api ×1

c# ×1

jquery ×1

json ×1

rest ×1

soap ×1