教程集 www.jiaochengji.com
教程集 >  脚本编程  >  Vb.net  >  正文 Data Integrity in Web Services (转一)-Web_Service开发-

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

发布时间:2018-09-08   编辑:jiaochengji.com
教程集为您提供Data Integrity in Web Services (转一)-Web,Service开发-等资源,欢迎您收藏本站,我们将为您提供最新的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>

您可能感兴趣的文章:
Data Integrity in Web Services (转一)-Web_Service开发-
基于jQuery的ajax功能实现web service的json转化
用vs.net创建webservice flash简易计算器-Web_Service开发-.NET教
XML Web Service 基础 (转微软MSDN)-Web_Service开发-.NET教程-
A Study of WebRTC Security
Linux高可用(HA)之Heartbeat Nginx MySQL NFS实现WEB SQL服务高可用
centos7使用基础教程_如何在CentOS 7上使用Metricbeat收集基础结构指标
轻松实现JavaBeans到XML的相互转换
一个修改web.config中appSettings配置节的函数-Web_Service开发-.NE
WCF4.0新特性体验(1):WCF4.0新特性预览及学习资源推荐

[关闭]
~ ~