具有从 java 访问的两个端点的 WCF
我有一个 WCF,它有两个端点,一个用于 https,一个用于 http。
在java中,我通过输入如下内容来访问此服务:
这将如何既然有两个端点就可以工作吗?只需将地址中的 http 更改为 https 是否会更改端点?或者还有什么我需要做的吗?
I have a WCF that has two endpoints, one for https one for http.
In java I access this service by typing in something like this:
How will this work now that there are two endpoints? Does simply changing it from http to https in the address change the endpoint? Or is there something more I need to do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
端点定义为远程调用公开的地址。如果您有两个端点(一个用于 HTTP,一个用于 HTTPS),并且定义了默认地址(空),您的服务将公开在:
但这并不意味着元数据会暴露在http 和 https 也是如此。元数据公开在单独的 Mex 端点上,这些端点也必须用于 HTTP 或HTTPS。通过浏览器访问元数据需要启用
serviceMetadata
行为,该行为提供单独的属性httpGetEnabled
和httpsGetEnabled
以允许从 HTTP 和 HTTPS 访问 ?wsdl 地址。Endpoint defines address exposed for remote calls. If you have two endpoints (one for HTTP and one for HTTPS) with default address defined (empty) your service will be exposed on:
But it doesn't mean that metadata will be exposed on both http and https as well. Metadata are exposed on separate Mex endpoints which again must be either for HTTP or HTTPS. Accessing Metadata through browser requires enabling
serviceMetadata
behaviour which provides separate propertieshttpGetEnabled
andhttpsGetEnabled
to allow accessing ?wsdl address from HTTP and HTTPS.