我无法在 3.5 应用程序中使用 2005 年网络服务
当我在浏览器中查看 .asmx 页面时,我看到: 支持以下操作。有关正式定义,请查看服务说明。
AcceptCaseInformation
ClearServiceErrors
CreateBatch
GetBookingsOnIndictment
GetCaseInformation
GetCasesForJacket
当我在项目中引用 asmx 文件时,我没有看到这些 Web 方法。我在Reference.cs中看到了完整的方法集。
JSSTester.GrandJuryService.GetBookingsOnIndictmentRequest JSSTester.GrandJuryService.GetBookingsOnIndictmentRequestBody JSSTester.GrandJuryService.GetBookingsOnIndictmentResponse
我没有设置什么来允许我查看该 asmx 页面的 WebMethods?
TIA
When I look at the .asmx page in the browser I see:
The following operations are supported. For a formal definition, please review the Service Description.
AcceptCaseInformation
ClearServiceErrors
CreateBatch
GetBookingsOnIndictment
GetCaseInformation
GetCasesForJacket
When I reference the asmx file in my project I do not see these web methods. I see the complete set of methods in the Reference.cs.
JSSTester.GrandJuryService.GetBookingsOnIndictmentRequest
JSSTester.GrandJuryService.GetBookingsOnIndictmentRequestBody
JSSTester.GrandJuryService.GetBookingsOnIndictmentResponse
What am I not setting to allow me to see the WebMethods for that asmx page?
TIA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我遵循您的流程,那么您将在 Visual Studio 中的项目中使用“添加服务引用”选项。
默认情况下,3.5 应用程序希望利用较新的 WCF 框架,该框架不使用 ASMX 样式页面中的旧 Web 服务架构。但是,您仍然可以添加旧的服务,只是需要多做一点工作。
当此对话框打开时,页面底部应该有一个按钮,显示“添加 Web 引用”。单击此按钮,它应该公开可用的“旧版”方法。
If I'm following your process, you're using the "Add Service Reference" option through your project in Visual Studio.
By default, the 3.5 apps want to leverage the newer WCF framework, which doesn't use the older web service architecture found in your ASMX style pages. However, you can still add the older services, it just takes a little more work.
When this dialog opens up, there should be a button at the bottom at the page that says "Add Web Reference." Click this button and it should expose the "legacy" methods that are available.
一般来说,没有必要使用“高级”按钮并恢复到 Web 参考。一般来说,使用 VS2005 创建的任何标准 Web 服务都应该可以通过服务引用来使用,没有任何问题。
您的服务是使用 WSE 创建的吗?它是否包含对 Microsoft.Web.Services3 的引用?在这种情况下,您没有标准的 VS2005 Web 服务 - 您有过时的 WSE 服务,并且您需要更仔细地查看问题所在。
In general, it should not be necessary to use the "Advanced" button and to revert to a Web Reference. In general, any standard web service created using VS2005 should be consumable via a Service Reference with no trouble at all.
Is your service created using WSE? Does it contain references to
Microsoft.Web.Services3
? In that case, you don't have a standard VS2005 web service - you have an obsolete WSE service, and you will need to look more closely to see what the problem is.