DataSet Vs Xml字符串 [英] DataSet Vs Xml string

查看:81
本文介绍了DataSet Vs Xml字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我对网络服务很陌生,所以我很难理解我在回报等方面做了什么。我已经完成了设计和开发一项网络服务的任务,该服务将允许外部公司,b
访问我们的信息。对我来说,问题是这些公司将使用不同的平台来消费我们的网络服务。我的

问题是我应该用作更复杂数据的返回类型

结构。我是否应该使用内部数据集对象并返回它,

我应该创建一个类型化数据集,因为一个明确的XML Schema将会生成,或者我应该只构建和XML我从数据库中返回信息的字符串

并将其发送回来。


我知道所有的返回类型都被序列化为XML,但是这样做了是什么意思

当他们到达另一端时可以访问它们?我真的会在这里欣赏一些输入,如果有人能帮我理解这个,那将是很好的!


谢谢,


Rob

解决方案

首先参加Christian Weyer WS-Contract,它'对你来说很好的工具

开始设计Web服务。记住服务依赖于

架构作为合同而不是类型。


BTW,不惜一切代价避免使用ADO.Net数据集。它不起作用,因为数据集

与.Net密切相关。


问候

erymuzuan mustapa


Modica82写道:

大家好,

我对网络服务很新,所以我很难理解我到底是什么关于其退货等问题我已经完成了设计和开发网络服务的任务,该服务将允许外部公司访问我们的信息。对我来说,问题是这些公司将使用不同的平台来使用我们的Web服务。我的
问题是我应该用作更复杂数据结构的返回类型。我应该使用内部数据集对象并返回它,我应该创建一个类型化数据集,然后生成一个确定的XML模式,或者我应该从我返回的信息中构建和XML字符串
从数据库中传回来。

我知道所有的返回类型都被序列化为XML,但这是否意味着当他们到达另一端时可以访问它们??我真的很感激这里的一些意见,如果有人能帮我理解这将是伟大的!

谢谢,

Rob


嗨Erymuzuan,


这是否意味着我应该生成我自己的XML发送回来,我还没有

完成了XML的加载,所以这需要做一些事情,最好用模式发回

XML,或者只是将XML作为字符串发送到网上?


Rob


" erymuzuan"写道:

首先参加Christian Weyer WS-Contract,这是开始设计Web服务的好工具。请记住,服务依赖于
模式作为合同而不是类型。

BTW,不惜一切代价避免使用ADO.Net数据集。由于数据集
与.Net密切相关,因此不起作用。

erymuzuan mustapa



Modica82写道:


我对网络服务很陌生,所以我很难理解我在回报方面做了什么。我已经接到了<设计和开发一个允许外部公司访问我们信息的Web服务。对我来说,问题是这些公司将使用不同的平台来使用我们的Web服务。我的
问题是我应该用作更复杂数据结构的返回类型。我应该使用内部数据集对象并返回它,我应该创建一个类型化数据集,然后生成一个确定的XML模式,或者我应该从我返回的信息中构建和XML字符串
从数据库中传回来。

我知道所有的返回类型都被序列化为XML,但这是否意味着当他们到达另一端时可以访问它们??我真的很感激这里的一些意见,如果有人能帮我理解这将是伟大的!

谢谢,

Rob



Rob,


在我看来,你应该构建并返回一个XML字符串。实际上,最好的方法是构建你的xml字符串并将其作为字节数组返回,以便快速获得
的性能。如果你想要一个代码示例,请告诉我。我用这种方式构建了几个Web服务。事实上,我有一些问题,比如你和我。

直接去了Francesco Balena(如果你知道他是谁),这个方法是强烈推荐的




通过这种方式,任何公司或客户都可以阅读它并且您不依赖于任何

平台或语言,这就是XML之美。


HOpe这有帮助。


Scott


" Modica82"写道:

大家好,

我对网络服务很新,所以我很难理解我正在做什么与关于我的任务是设计和开发一个允许外部公司访问我们信息的网络服务。对我来说,问题是这些公司将使用不同的平台来使用我们的Web服务。我的
问题是我应该用作更复杂数据结构的返回类型。我应该使用内部数据集对象并返回它,我应该创建一个类型化数据集,然后生成一个确定的XML模式,或者我应该从我返回的信息中构建和XML字符串
从数据库中传回来。

我知道所有的返回类型都被序列化为XML,但这是否意味着当他们到达另一端时可以访问它们??我真的很感激这里的一些意见,如果有人能帮我理解这将是伟大的!

谢谢,

Rob


Hi All,

I am very new to web services, so am struggling to understand exactly what I
am doing with regards to its returns etc. I have been given the task of
designing and developing a web service which will allow external companies,
access to our information. The problem for me is that these companies will
be using different platforms from which to consume our web service. My
question is what I should use as the return type for more complex data
structures. Should I use the intrinsic dataset object and return that,
should I create a typed dataset as then a definitive XML Schema will be
produced, or should I just build and XML string from the information I return
from the database and send that back across.

I know that all the return types are serialized into XML, but does this mean
that they can be accessed when they get to other end?? I would really
appreciate some input here, if anyone can help me understand this that would
be great!

Thanks,

Rob

解决方案

Take alook at Christian Weyer WS-Contract first, it''s good tool for you
to get started in designing web services. Remember services rely on
schema as a contract not type.

BTW, avoid ADO.Net dataset at all cost. It will not work since dataset
is a strongly related to .Net.

regards
erymuzuan mustapa

Modica82 wrote:

Hi All,

I am very new to web services, so am struggling to understand exactly what I
am doing with regards to its returns etc. I have been given the task of
designing and developing a web service which will allow external companies,
access to our information. The problem for me is that these companies will
be using different platforms from which to consume our web service. My
question is what I should use as the return type for more complex data
structures. Should I use the intrinsic dataset object and return that,
should I create a typed dataset as then a definitive XML Schema will be
produced, or should I just build and XML string from the information I return
from the database and send that back across.

I know that all the return types are serialized into XML, but does this mean
that they can be accessed when they get to other end?? I would really
appreciate some input here, if anyone can help me understand this that would
be great!

Thanks,

Rob



Hi Erymuzuan,

Does this mean i should generate my own XML to send back, again i have not
done loads of XML so this will take some doing, would it be best to send the
XML back with a schema, or just send the XML down the wire as a string?

Rob

"erymuzuan" wrote:

Take alook at Christian Weyer WS-Contract first, it''s good tool for you
to get started in designing web services. Remember services rely on
schema as a contract not type.

BTW, avoid ADO.Net dataset at all cost. It will not work since dataset
is a strongly related to .Net.

regards
erymuzuan mustapa

Modica82 wrote:

Hi All,

I am very new to web services, so am struggling to understand exactly what I
am doing with regards to its returns etc. I have been given the task of
designing and developing a web service which will allow external companies,
access to our information. The problem for me is that these companies will
be using different platforms from which to consume our web service. My
question is what I should use as the return type for more complex data
structures. Should I use the intrinsic dataset object and return that,
should I create a typed dataset as then a definitive XML Schema will be
produced, or should I just build and XML string from the information I return
from the database and send that back across.

I know that all the return types are serialized into XML, but does this mean
that they can be accessed when they get to other end?? I would really
appreciate some input here, if anyone can help me understand this that would
be great!

Thanks,

Rob



Rob,

In my opinion you should build and return an XML string. In fact, the best
way to do it is to build your xml string and return it as a byte array for
quick performance. Let me know if you''d like a code sample. I have build
several Web Services this way. In fact, I had questions such as yours and I
went straight to Francesco Balena (if you know who he is) and this method was
highly recommended.

This way any company or customer can read it and you are not tied to any
platform or language, that is the beauty of XML.

HOpe this helps.

Scott

"Modica82" wrote:

Hi All,

I am very new to web services, so am struggling to understand exactly what I
am doing with regards to its returns etc. I have been given the task of
designing and developing a web service which will allow external companies,
access to our information. The problem for me is that these companies will
be using different platforms from which to consume our web service. My
question is what I should use as the return type for more complex data
structures. Should I use the intrinsic dataset object and return that,
should I create a typed dataset as then a definitive XML Schema will be
produced, or should I just build and XML string from the information I return
from the database and send that back across.

I know that all the return types are serialized into XML, but does this mean
that they can be accessed when they get to other end?? I would really
appreciate some input here, if anyone can help me understand this that would
be great!

Thanks,

Rob



这篇关于DataSet Vs Xml字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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