Data Integrity in Web Services 1)-Web_Service development-

Source: Internet
Author: User

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 und 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>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.