Creating Simple XSD
In SOA or OSB, starting part of any communication is protocol and message, in a normal SOAP message, message has to follow a structure. In SOA this structure is defined by the XSD,
Let first consider we want to develop a structure of an employee, which is pass information like firstname,lastName, salary, dataofJoining,email and type. In jave world we can think of it as a java class having attribute mentioned.
Now in XSD this can be a type, in xsd we have two kind of types, simple which are nothing but native types and other is complex which is a combination of simple types. Hence for this employee we are defining a complex type, which has every attribute defined.
To create this lets first think all the six information will be stored in six different attributes and we can easily identified its type. now first lets think our process will take all these inputs.
This is where we have structure defined, simply. Now its a type defined.
Now we can defined a complex type and then can assign it to and employee. Its something creating a class and then use a variable to assign.
But now you want to keep finance information separate and person information separate, so you want to change the model something like
Employee --- Person
-- Financial Details
Here first we need to create the structure and then we need to assign it to elements as type. Its can very well understand defining variable as a different class.
Its the source code of the the xsd.
In the next blog we will talk about some other complex technique of the xml structure.
No comments:
Post a Comment