数据集和平台依赖性 [英] DataSet and Platform Dependency

查看:65
本文介绍了数据集和平台依赖性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我们正在争论使用DataSet作为网站

服务的返回值类型。


问题是我们不知道Java应用程序是否可以使用DataSet




我们可以依靠java的事实恳求可以使用asp.net web

返回Dataet的服务?


如果答案是否定的,那么最佳做法是什么?什么是将b / b
表格结构数据从asp.net Web服务返回到基于Java的
客户端的最佳方式?


链接到在线资源将解决我们的问题。


任何帮助将不胜感激,


Max

Hi,

We are having a debate over using DataSet as return value type for web
services.

The problem is that we don''t know whether Java applications can use DataSet
or not.

Can we count on the fact that java supplications can consume asp.net web
services that return Dataet?

If the answer is NO, then what is the best practice? What it the best way to
return table structure data from a asp.net web service to a Java based
client?

A link to online resource will solve our problem.

Any help would be appreciated,

Max

推荐答案

Hello Max,


从您的描述中,您正在开发一个将返回的Web服务

来自后端数据库中表格的数据,目前你遇到的问题是确定如何将数据返回给webservice客户端,通过数据集或

其他XML格式,对吗?


正如您提到的,其他非DOTNET

平台将访问您的Web服务,我认为使用DataSet会导致一些互操作性问题。

实际上,你并没有完全禁止使用DataSet,你可以将这些数据作为带有dataTables的DataSet返回,并且它们将被序列化为XML

内容,webservice客户端可以正确接受这样的XML内容

(在SOAP消息中)。但是,这里的问题是那些非dotnet的客户端(比如java)不能拥有像DataSet这样的对应类,所以它不能将数据集derserialize的'b $ b'将XML内容重新转换为对象实例。

在这种情况下,您只能将DataSet用作普通XML文档

并使用XML api(例如DOM)从中查询数据项。


我不确定OR映射是否适用于您的场景。我们创建了一些自定义类(带属性)以表示数据表中的数据表,这是常见的。当我们从数据库表中查询记录时,我们将
转换为自定义类的实例集合,并将这些自定义的

类对象集合返回给客户端。此外,对于dotnet或非dotnet
webservice平台,都有用于将自定义类映射到某种XML格式的接口(就像XML序列化一样)。 net),你可以

定义服务和客户之间的合约,这样你的.net自定义

类将被序列化为某种格式的XML内容和

非dotnet客户端也可以将它们反序列化为类实例。


这里有一些讨论这些主题的网络参考(称为契约优先

webservice design-pattern):


#使用Apache Axis2的契约优先Web服务
http://today.java.net/pub/a/today/20...b -services-wit

h-axis2.html


#合同优先开发技术
http://msdn.microsoft.com/msdnmag/is...erviceStation/


#Contract Microsoft .NET之间的第一个Web服务互操作性和$ / b $ b IBM WebSphere
http://msdn.microsoft.com/vstudio/ja...p/default.aspx

希望这会有所帮助。

此致,


Steven Cheng


Microsoft MSDN在线支持主管


== ================================================ <无线电通信/>

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx


==================================== ==============


此帖子按原样提供。没有保证,也没有赋予任何权利。


Hello Max,

From your description, you''re developing a webservice which will return
datas from tables in backend database and currently you''re meet problem on
determine how to return the data to webservice client, through dataset or
other XML format, correct?

As you mentioned that your webservice will be visited by other non-DOTNET
platform, I think using DataSet does will cause some interopability issue.
Actually, you''re not totally prohibited from using DataSet, you can return
those data as a DataSet with dataTables, and they''ll be serialized as XML
content, and the webservice client can correctly accept such XML content
(in SOAP message). However, the problem here is that those non-dotnet
client(such as java) can not have a corresponding class like DataSet, so it
can not derserialize the DataSet''s XML content back into object instance.
And in such cases, you can only use the DataSet as a normal XML Document
and use XML api(such as DOM) to query data items from it.

I''m not sure whether O-R mapping is adoptable here for your scenario. It is
common that we created some custom classes(with properties) to represent
data tables in datatable. And when we query records from database table, we
convert them as custom class''s instance collection and return those custom
class object collection to client. Also, for both dotnet or non-dotnet
webservice platform, there''re interfaces for mapping custom class to a
certain XML format (just like the XML Serialization in .net), you can
define a contract between service and client so that your .net custom
classes will be serialized as certain format of XML content and the
non-dotnet client can also deserialize them to class instances.

Here are some web reference discussing on such topics(called contract-first
webservice design-pattern):

#Contract-First Web Services with Apache Axis2
http://today.java.net/pub/a/today/20...b-services-wit
h-axis2.html

#Techniques for Contract-First Development
http://msdn.microsoft.com/msdnmag/is...erviceStation/

#Contract First Web Services Interoperability between Microsoft .NET and
IBM WebSphere
http://msdn.microsoft.com/vstudio/ja...p/default.aspx

Hope this helps some.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.




你好,


我最近不得不将.NET Web服务与Progress应用程序集成。

Web服务将DataSet传递给Progress应用程序。其他人照顾了

的Progress方面,但基本上Progress提供了一个名为Open

的客户端允许ceration od引用为dll的,可以是

合并到.NET项目中,允许在.NET和

Progress应用程序之间进行调用。这样可以轻松传递DataSet等对象。它b / b
工作得非常好。可能有一个Java工具可以做类似的事情。事实上,可能更有可能看到Java比现在的进步更受欢迎

,但这只是猜测。


th in some方式,


Best,

David


" Maxwell2006"写道:
Hello,

I recently had to integrate a .NET Web Service with a Progress application.
The Web Service passed a DataSet to the Progress app. Someone else took care
of the Progress side but basically Progress provide a thing called Open
Client which allows the ceration od References as dll''s which can be
incorporated into the .NET project to allow calls to be made between .NET and
Progress apps. This allows for easy passing of objects such as DataSets. It
worked very well. There may well be a tool for Java which does something
similar. In fact, it may be more likely seeing as Java is a bit more popular
than Progress nowadays, however that is just a guess.

hth in some way,

Best ,
David

"Maxwell2006" wrote:




我们正在争论使用DataSet作为网站的返回值类型

服务。


问题是我们不知道Java应用程序是否可以使用DataSet




我们可以指望java请求可以使用asp.net web

返回Dataet的服务吗?


如果答案不是,那么最佳做法是什么?什么是将b / b
表格结构数据从asp.net Web服务返回到基于Java的
客户端的最佳方式?


链接到在线资源将解决我们的问题。


任何帮助将不胜感激,


Max
Hi,

We are having a debate over using DataSet as return value type for web
services.

The problem is that we don''t know whether Java applications can use DataSet
or not.

Can we count on the fact that java supplications can consume asp.net web
services that return Dataet?

If the answer is NO, then what is the best practice? What it the best way to
return table structure data from a asp.net web service to a Java based
client?

A link to online resource will solve our problem.

Any help would be appreciated,

Max


嗨大卫,


谢谢你的帮助。您的场景在Windows平台上运行良好;但是,b $ b但是,我不确定您是否可以在AIX或Solaris中执行相同的操作。我们的

客户不想被Windows平台绑定。


谢谢,


Max


" David ++" < Da *** @ discuss.microsoft.com写信息

新闻:80 ************************* ********* @ microsof t.com ...
Hi David,

Thank you for help. Your scenario works perfect in windows platform;
however, I am not sure that you can do the same in AIX or Solaris. Our
client doesn''t want to be bound to windows platform.

Thank you,

Max

"David++" <Da***@discussions.microsoft.comwrote in message
news:80**********************************@microsof t.com...

您好,


我最近有过将.NET Web服务与Progress

应用程序集成。

Web服务将DataSet传递给Progress应用程序。有人拿了

护理

的Progress方面但基本上Progress提供了一个名为Open

的客户端允许ceration od References as dll'可以将

合并到.NET项目中,以允许在.NET之间进行调用



进度应用程序。这样可以轻松传递DataSet等对象。



工作得非常好。可能有一个Java工具可以做类似的事情。事实上,可能更有可能看到Java比现在的进步更受欢迎

,但这只是猜测。

hth在某种程度上,


Best,

David


" Maxwell2006"写道:
Hello,

I recently had to integrate a .NET Web Service with a Progress
application.
The Web Service passed a DataSet to the Progress app. Someone else took
care
of the Progress side but basically Progress provide a thing called Open
Client which allows the ceration od References as dll''s which can be
incorporated into the .NET project to allow calls to be made between .NET
and
Progress apps. This allows for easy passing of objects such as DataSets.
It
worked very well. There may well be a tool for Java which does something
similar. In fact, it may be more likely seeing as Java is a bit more
popular
than Progress nowadays, however that is just a guess.

hth in some way,

Best ,
David

"Maxwell2006" wrote:

>

我们正在讨论使用DataSet作为web
服务的返回值类型。

问题是我们不知道Java应用程序是否可以使用



我们能指望这样的事实: java恳求可以使用返回Dataet的asp.net web
服务吗?

如果答案是NO,那么最佳做法是什么?将表结构数据从asp.net Web服务返回到基于Java的客户端的最佳方式是什么?

在线资源链接将解决我们的问题。

任何帮助将不胜感激,

>Hi,

We are having a debate over using DataSet as return value type for web
services.

The problem is that we don''t know whether Java applications can use
DataSet
or not.

Can we count on the fact that java supplications can consume asp.net web
services that return Dataet?

If the answer is NO, then what is the best practice? What it the best way
to
return table structure data from a asp.net web service to a Java based
client?

A link to online resource will solve our problem.

Any help would be appreciated,

Max



这篇关于数据集和平台依赖性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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