使用 java 通过 TransportWithMessageCredentials (UserName) 访问 WCF 服务

发布于 2024-10-03 14:02:25 字数 181 浏览 0 评论 0原文

我开发了一个 WCF 服务,该服务使用 BasicHttpBinding 与 TransportWithMessageCredentials 以及自定义用户名和密码验证。我有一个客户端需要与我的服务交互,但该客户端使用 Java。我自己不是 Java 程序员,我帮不了他太多。所以我想我应该将这个问题扩展到 SO 社区。你们能在这里透露一些信息吗?

I have developed a WCF service that uses BasicHttpBinding with TransportWithMessageCredentials and custom username and password validation. I have a client who needs to interface with my service, but the client uses Java. Not being a Java programmer myself, I can't help him much. So I thought I would extend the question to the SO community. Can you guys shed some light here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

墨落画卷 2024-10-10 14:02:25

我认为这应该不难。对于 BasicHttpBinding TransportWithMessageCredentials 意味着它受 HTTPS 保护(因此通过 HTTPS 而不是 HTTP 调用服务)和身份验证,这只是添加到 SOAP 标头中。要获取示例,您可以关闭传输安全性(切换到 HTTP),捕获使用嗅探器(如 WireShark)传递的实际数据,并使 Java 应用程序以该形式发送数据。

I think that should not be hard. For BasicHttpBinding TransportWithMessageCredentials means that it is protected by HTTPS (so call service via HTTPS not HTTP) and authentication, that is just added to SOAP headers. To get a sample you can switch off Transport security (switch to HTTP), capture actual data passed with sniffer (like WireShark) and make Java app send data in that form.

撩起发的微风 2024-10-10 14:02:25

尝试使用 Java 库 Axis 与 WCF 服务交互。

我认为 Axis 有能力基于 生成 Java 服务交互代码在 WSDL (WSDL2Java) 上。

Try using the Java library Axis to interact with the WCF service.

I think Axis has the ability to generate Java service interaction code based on a WSDL (WSDL2Java).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文