我正在使用来自https://wwwcie.ups.com/ups.app/xml/Rate的 Web 服务将 UPS 运输计算合并到我的 asp.net 项目中。在运行项目时,我遇到了如下异常:
说明:System.Web.Services.Protocols.SoapException:服务器无法识别 HTTP 标头 SOAPAction 的值:http://localhost:4594/ShippingModule.asmx/GetUPSShippingCost。在 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() 在 System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage 消息) 在 System.Web.Services.Protocols.SoapServerProtocol.Initialize() 在 System.Web.Services .Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) Source: System 。网页服务
我现在在 localhost 中运行它。这是这个异常的来源吗?还是 Web 服务中使用的自定义命名空间是主要问题?我在网上搜索了很多这个问题。但是没有办法解决这个问题。