需要在Web服务中阐明 [英] Need to clarify in webservices

查看:69
本文介绍了需要在Web服务中阐明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,
我正在使用Asp.Net 2.0应用程序.我在应用程序中使用Web服务.在这里,我需要您的建议来回答3个问题.我在这里列出我的问题.
1.用Java开发的Web服务.我必须从.net进行什么配置才能使用Java ws?
2.我没有WS访问权限.我只是一个人而已.我需要启动平行的
开发,直到获得客户的ws访问.如何理解输出类型和...
3.据我了解,服务是使用JAX-WS编程API开发的.
我相信这ws将返回输出为xml.
4.是否有任何我可以将此xml转换为数据集的选项.有助于将其分配为数据

问候
Guvera

Hi friends,
I am using Asp.Net 2.0 application. I am using web services in my application. Here i need your suggestion to answer for 3 questions. I list out my questions here.
1. Web services developed in Java. what configuration i have to do from .net to use java ws?
2. I don''t have WS access. I just have wsdl alone only. I need to start the paralled
development until I get ws access from customer. How to understand the ouput type and....
3. As per my understanding Services are developed using JAX-WS programming APIs.
I believe this ws will return the output as xml.
4.Is there any option that i can convert this xml to dataset. that will be helpful to assign this as data

Regards
Guvera

推荐答案

1.用Java开发的Web服务.我必须从.net进行什么配置才能使用Java ws?
如果编写正确,Web服务将不在乎客户端是用什么编写的,它只是提供答案,而多数情况下,答案是采用称为SOAP的XML格式.您将需要配置才能连接到服务器. *

2.我没有WS访问权限.我只是一个人而已.我需要启动平行的
开发,直到获得客户的ws访问.如何理解输出类型和...

向后工程很棘手.请与客户联系以查看他们是否具有测试服务器,如果没有,则您的时间将花费在研究Web Service基础上更好(无论如何这可能是正确的).在.net中编写一个简单的Web服务并使用它,周围有很多示例.完成此操作后,您可以根据可复制原始WSDL的WSDL在.net中编写自己的存根服务,但不要对服务内部的工作方式做任何假设 *

3.据我了解,服务是使用JAX-WS编程API开发的.
我相信这是ws会将输出返回为xml.

我从未使用过JAX-WS,请简要阅读文档此处 [ ^ ],它看起来不仅将支持XML,而且还将提供SOAP(XML的服务目标子集),因为.net框架已经可以理解SOAP(请参见答案4).*

4.是否有任何我可以将此xml转换为数据集的选项.有助于将其分配为数据
不需要,您已经获得了wsdl,这里有一个名为 WSDL.exe的MS工具 [ ^ ]生成用于调用服务的代理类,并将SOAP XML直接序列化/反序列化为请求和响应的对象.因此,在调用Web服务方法时,您将打开一个连接,并在客户端上就像在本地运行该方法一样调用该方法,然后关闭该连接(如果未重新使用).

*我所有的答案都带有警告,您可能会遇到一些意想不到的困难,因为服务器使用Java,而客户端是.net.这些大致上应该兼容,但是您可能会发现吸引您的东西.
1. Web services developed in Java. what configuration i have to do from .net to use java ws?
If properly written, the web service doesn''t care what the client was written in, it just serves up answers, more often than not these are in an XML format called SOAP. You will need configuration to connect to the server. *

2. I don''t have WS access. I just have wsdl alone only. I need to start the paralled
development until I get ws access from customer. How to understand the ouput type and....

Backwards engineering is tricky. Contact the customer to see if they have a test server, if not your time will be better spend researching Web Service basics (this is probably true anyway). Write a simple web service in .net and consume it, there are plenty of examples around. Once you''ve done this you could write your own stub service in .net based on the WSDL that replicates the original, but do not make any assumptions about how the internals of the service will work*

3. As per my understanding Services are developed using JAX-WS programming APIs.
I believe this ws will return the output as xml.

I''ve never used JAX-WS, a brief look at the documentation here[^] and it looks like it will not merely serve up XML, but SOAP (a Service targeted subset of XML) which is good, as the .net framework already understands SOAP (see answer 4).*

4.Is there any option that i can convert this xml to dataset. that will be helpful to assign this as data
No need, you have been given a wsdl, there is an MS tool called WSDL.exe [^] which generates a proxy class for calling the service, and serializes/deserializes the SOAP XML directly into objects for request and response. So in calling a web service method you open a connection, and call a method on the client as if it were running locally, then close the connection (if not re-used).

* All my answers come with the caveat that you could well experience some unexpected difficulties because the server uses Java and the client is .net. Broadly these should be compatible, but you might find stuff that catches you out.


这篇关于需要在Web服务中阐明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆