简体   繁体   English

数据集.net无法在Java Web Service客户端上解析

[英]dataset .net cannot resolve on java web service client

I have a web service built in .NET with a dataset as input parameter and another dataset as a response. 我在.NET中构建了一个Web服务,其中一个数据集作为输入参数,另一个数据集作为响应。 I need to consume it from java but this does not work. 我需要从Java上使用它,但这不起作用。

Eclipse show: Eclipse显示:

   Description  Resource    Path    Location    Type
DsClient cannot be resolved to a type   ServiceSoap12Stub.java  /xxxx/src/org/tempuri   line 169    Java Problem

Netbeans show: Netbeans显示:

在此处输入图片说明

The straight and easy answer is that DataSet should never be used for data exchange in open services. 直截了当的简单答案是, 永远不要将DataSet用于开放服务中的数据交换。 So the provider of this non service should provide an API which could be used. 因此,此服务的提供者应提供可以使用的API。

The fact that one can export a service with a click (or wizard, or tool ... ) does not mean that he should not plan carefully how that service will be consumed. 可以通过单击(或向导,工具...)导出服务的事实并不意味着他不应该仔细计划如何使用该服务。

Even succeeding in operating such a service is a workaround in my opinion. 我认为,即使成功运行此类服务也是一种解决方法

That being said, it seems that you are not using the full definition of the service. 话虽这么说,看来您没有使用服务的完整定义。 WSDL could be provided as single file or split in many, often keeping schema information in a separate file. WSDL可以作为单个文件提供,也可以分成多个文件提供,通常将模式信息保存在单独的文件中。

You should be certain to be able to process all files related to the service. 您应该确定能够处理与该服务相关的所有文件。

Analyze the WSDL, there should schemas reference on it, check if those .xsd are available and see if they to refer to other non standard schema. 分析WSDL,应该在上面引用模式,检查那些.xsd是否可用,并查看它们是否引用其他非标准模式。

If you are still stuck, publish the whole WSDL (maybe on some GIST or pastebin) so that we can check and see if something is amiss. 如果仍然遇到问题,请发布整个WSDL(也许在某些GIST或pastebin上),以便我们检查是否有问题。

As I said before, the only true solution to this problem lies with the provider of the service, he should really provide a more interoperable API. 就像我之前说过的那样,该问题的唯一真正解决方案在于服务提供者,他应该提供一个更具互操作性的API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM