Data Integrity in Web Services (转一)-Web_Service开发-

Abstract
Web Services bring with them great possibilities and with these possibilities are some pitfalls. One such pitfall is passing complex data types to and from Web Services without losing data integrity. The clearest thing to keep in mind when passing objects to Web Services is the data is passed for your object's fields, but the code is not.
What happens when I have an object that my web service passes as a return value?
WSDL does some magic when a programmer creates a referance to your web service. Visual Studio.NET creates wrapper objects around foreign data types.
The struct you create inside your Web Service looks like this:
public    struct PersonData
{
    private int yearsExperience;
    public int YearsExperience
    {
        get { return yearsExperience; }
        set
        {
       if(value<2) { throw new Exception("You're unemployable!"); }
       yearsExperience = value;
        }
    }
    public String FirstName;
    public String LastName;
}

...Which then gets translated into WSDL which looks like this:
<s:complexType name="PersonData">
    <s:sequence>

时间: 2024-08-03 13:47:56

Data Integrity in Web Services (转一)-Web_Service开发-的相关文章

Data Integrity in Web Services (转二)

services|web Although you can create any client you desire for the web service, in this example I have chosen to create a Windows Application. To do so, simply go to File->New Project and choose Windows Application. Drag and drop the items on the for

Data Integrity in Web Services (转一)

services|web AbstractWeb Services bring with them great possibilities and with these possibilities are some pitfalls. One such pitfall is passing complex data types to and from Web Services without losing data integrity. The clearest thing to keep in

J2EE vs. Microsoft.NET 之 Web Services

j2ee|services|web J2EE vs. Microsoft.NET 之 Web Services             --建置XML架构的Web Services之比较作者:佚名    本文选自:CNJSP  2002年04月30日 I. 序 在本文中,我们将深入的比较两种可用来建置商业XML Web Services的平台,分别是Sun Microsystems 所提供的Java 2 Enterprise Edition (J2EE)以及Microsoft所提供的 .NET平

COM+ Web 服务:通过复选框路由到 XML Web Services (转)9

services|web|xml|复选框 编译并运行此 Visual Basic .NET 应用程序,将产生与前面两个 VBScript CAO 示例相同的输出内容. 因为服务器应用程序将组件发布为 CAO 和 WKO 两种形式,所以由远程客户端选择激活方法.虽然可能只对学术研究有意义,但是单一客户端计算机确实可以使用同一组件的两种远程激活方法,访问远程服务器上同一个 SOAP 发布的虚拟根. SOAP 与 DCOM 的局限性和区别.NET Remoting 的目的之一是提供丰富的分布式环境,使

COM+ Web 服务:通过复选框路由到 XML Web Services(3) (微软中国)

services|web|xml|复选框|微软 SOAP 与 DCOM 的局限性和区别 .NET Remoting 的目的之一是提供丰富的分布式环境,使开发人员能够在此环境中对序列化协议(格式化程序)和网络协议(频道)进行组合与匹配..NET 框架 1.0 版本中的 COM+ Web 服务仅支持一种格式化程序 (SOAP) 和一种频道 (HTTP).这并不是说其他频道和格式化程序不能使用 ServicedComponents 或 COM+,而是说没有自动配置为这些备用频道和格式化程序提供客户端和

Java 与 .NET 的基于 WS-Security的Web Services集成实现(上)

services|web Java 与 .NET 的基于 WS-Security的Web Services集成实现 rottenapple 本文适用读者: Web Services开发人员 应具备的知识: 使用过VS.NET2003 +WSE开发过Web Services,会使用Jbuilder9开发简单的java应用程序. 一:内容简介 WS-Security描述通过消息完整性,消息机密性和单独消息认证提供保护质量的SOAP消息传递增强.适用于下列场合: 1. 客户必须能够确定消息来自哪个人并

vs.net中web services入门

services|web services 入门摘要:Microsoft Visual Studio .NET 和 XML Web services 提供了一个简单.灵活且基于标准的模型,开发人员无论使用何种平台.编程语言或对象模型均可以编写组合应用程序.本文将帮助您快速学习使用 Visual Studio .NET 创建并访问 XML Web services.本文包含一些指向英文站点的链接. 目录简介 用托管代码编写的 XML Web services 使用 Visual Studio 创建

在Rational Application Developer平台上基于JAX-WS开发Web services

引言 Web Services 是一种面向服务的技术,通过标准的 Web 协议提供服务,目的是保证不同平台 的应用服务可以互操作.依据 web services 规范实施的应用之间,无论它们所使用的语言. 平台或内部协 议是什么,都可以相互交换数据,这就是 web services 的好处.本文选择 IBM WebSphere Application Server 作为 web services 的运行环境,并选择 IBM Rational Application Developer(以下简称

全方位解析Web Services开发步骤

简介:Web Services 的发展是持续的,是有顽强生命力的,它扮演的角色将越来越受到重视,与此同 时 Web Services 的实现方式也多了起来,这样导致了很多想学习 Web Services 的开发人员不知道如何 下手,本教程选择了当下最流行的几种实现 Web Services 的方式,通过具体实例来全方位阐述 Web Services 的开发过程. 基本开发环境 操作系统:本教程使用的为 Windows Vista Enterprise, 如果您的系统是 Linux 的,请选择下载