问题标签 [wcf-interoperability]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
534 浏览

wcf - WCF 到 Java 端点/合同问题

找不到名称为“CaseJacketPort”和合同“GrandJuryService.CaseJacket”的端点元素时出错

从我的 App.config:

不知道为什么他们看不见对方?
错误提示“这可能是因为找不到您的应用程序的配置文件,或者因为在客户端元素中找不到与此名称匹配的端点元素。”

当 i ^F 并搜索指针时,它们看起来都指向彼此。

有任何想法吗?

TIA

__斯蒂芬

0 投票
1 回答
2565 浏览

java - WCF 服务、Java JApplet 客户端、传输错误 405

我在使用 WCF 服务和 Java 客户端时遇到问题,我会尽力提供尽可能多的信息,感谢您抽出宝贵时间。

服务器的端点是 BasicHttpBinding,我尝试将服务器托管为 Windows 服务并在 IIS 中,但没有任何改变。奇怪的是,如果我使用一个简单的类,客户端工作得很好,在我将类切换到 JApplet 的那一刻,我得到了提到的问题。

我使用 Eclipse 作为 IDE,我尝试使用 Axis 和 Metro 来生成具有相同不良结果的存根。

这是一切正常的 Java 类的示例

这是我收到错误的 JApplet 示例:

在小程序加载的那一刻,我得到了错误,是完全相同的调用,所以我不明白为什么我使用小程序得到异常。我还尝试从 Silverlight 客户端调用它,但遇到了安全异常,这是我发现 clientaccesspolicy.xml 和 crossdomain.xml 的地方,我将 clientaccesspolicy.xml 添加到服务中,Silverlight 客户端运行良好,所以我决定尝试crossdomain.xml 并没有,Applet 仍然无法正常工作。我会将堆栈跟踪放在最后,谢谢大家的时间。

胡安·扎穆迪奥

0 投票
3 回答
2838 浏览

wcf - 开发可互操作的 WCF Web 服务时我应该知道什么?

我正在启动此 Wiki 以收集有关在 WCF 中创建可互操作的 Web 服务(而不是客户端)的最佳实践。如果您知道任何通常不可互操作或无法与特定平台互操作的功能,请分享您的经验。

0 投票
3 回答
2767 浏览

wcf - WCF/WebService:可互操作的异常处理

我知道 WCF 会将异常转换为错误并将其作为 SOAP 消息发送回来,但我想知道这是否真的可以互操作。我想我很难弄清楚这种可能的情况:

  1. 客户端 (Java) 调用 WCF 服务 (LoginService)。
  2. 服务器检查授权是否正确,用户授权失败。
  3. 服务器抛出 UnauthorizedAccessException。
  4. WCF 以某种方式将其转换为故障。(* - 也见下文)
  5. 客户端必须能够知道如何读取此故障。

我想我只是很难理解这如何仍然是可互操作的,因为它期望 Java 知道如何翻译 .NET 从 UnauthorizedAccessException 编码的 SOAP 错误。

  • 此外,.NET 如何实际将异常转换为故障,故障代码、名称等内容。有些事情似乎是“duh”,比如故障名称可能是“UnauthorizedAccessException”,但我宁可确定也不要猜测。
0 投票
2 回答
1503 浏览

wcf - WCF:使用 WsHttpBinding 是否可互操作?

顾名思义......现在我正在使用 BasicHttpBinding,但我想知道是否可以切换到 WSHttpBinding 并且仍然可以与例如 Java 进行互操作。

0 投票
1 回答
134 浏览

wcf - Advantages of having non interoperable services in WCF?

We are having some discussions about use of WCF and creation of services and client support.

Currently we support a silverlight client by providing silverlight versions of our service libraries client side, so that we can keep the strong typing of our service contract which is defined using interfaces.

This is ok, but having the service defined with interfaces makes it awkward for other clients as the WSDL has a lot of methods return ArrayOfAnyType and everything is just objects at the client end (which can be cast to the correct type, but as I said, its awkward).

We could rewrite our services to use explicit DTOs for the message transfer and recreate our business objects using similar client side libraries, which would make our service much more interoperable.

Doing this though would seem to block off some options for us, such as using EntityFramework and the self tracking entities it provides as these require the same libraries to be shared on client and server and are not interoperable (correct me if I've got this wrong)

It seems like there is a trade off between being interoperable and having access to more functionality out of the box, allowing for quicker development of solutions.

So my question is what advantages do we gain by deciding to be non interoperable and only supporting .net and silverlight client (if supporting silverlight clients can be considered non interoperable)? And what useful .net features do we block ourselves off from by deciding to be interoperable?

Are there standard techniques for allowing both types of solution to co exist, so you can support .net clients using the full range of features available to you, but still support other non .net clients well?

0 投票
1 回答
722 浏览

wcf - 让 WCF 接受未签名的“收件人”标头

我有一个使用 WSHttpBinding 的 WCF Web 服务。安全性是 TransportWithMessageCredential。我有一个客户端连接到我,它正在发送带有未签名标头中的 To 元素的 Soap 消息。我的服务不喜欢这样,并抛出 System.ServiceModel.Security.MessageSecurityException 消息“通过传输安全接收的消息具有未签名的 'To' 标头”。我无法找到在 WS-Security 规范中特别指定的元素的签名,但我已经看到建议使用它来防止重定向攻击。

那么有谁知道我是否可以配置我的 Web 服务不检查要签名的 To 元素?也是问题的另一面,但我无法更改此客户端与我的连接方式。

0 投票
1 回答
166 浏览

arrays - WCF - 数组或集合(它们都是可互操作的)?

基本上,它们都是可互操作的还是仅仅是数组?

0 投票
3 回答
646 浏览

wcf - WCF - 异步服务可以互操作吗?

基本上正如问题所述,如果我使我的服务异步,这是否意味着它们不再可互操作?

0 投票
1 回答
144 浏览

wcf - #Id/#Ref 未解决

我使用 WCF/.NET 框架 4.0 (C#) 创建了一个非常简单的 Web 服务。我使用 svcutil.exe 实用程序生成了一个 WSDL 文件。当我使用 Eclipse (Java EE) 导入 WSDL 文件时,出现以下错误:

XSD:属性引用“http://schemas.microsoft.com/2003/10/Serialization/#Id”未解决 XSD:属性引用“http://schemas.microsoft.com/2003/10/Serialization/#Ref”未解决

我正在使用 DataContractSerializer 并使用以下方法打开参考保存:

[DataContract(IsReference = true)]

当我关闭此选项时,上面的错误就会消失。我还按照 SO 上的另一个线程中的建议展平了我的 WSDL 文件。