Databases Reference
In-Depth Information
</xsd:element>
<xsd:elementname="name">
<xsd:complexType>
<xsd:sequence>
<xsd:elementname="title"type="xsd:string"/>
<xsd:elementname="firstName"type="xsd:string"/>
<xsd:elementname="lastName"type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:elementname="address">
<xsd:complexType>
<xsd:sequence>
<xsd:elementname="line1"type="xsd:string"/>
<xsd:elementname="line2"type="xsd:string"/>
<xsd:elementname="city"type="xsd:string"/>
<xsd:elementname="state"type="xsd:string"/>
<xsd:elementname="zip"type="xsd:string"/>
<xsd:elementname="country"type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
With this approach shipTo , name , and address are globally declared. Therefore, the
elements name and address are also reusable now.
You could always go a step further and separately define all the simple
types such as title, first name, and so on as global elements.
The temptation may be to define elements you wish to reuse within your schema
as global and have the rest as local definitions. However, you should consider the
following point:
Any element you may wish to use as a parameter for a web service operation
must be globally defined
BPEL variables can only be declared for global elements, not local elements
As at the point of schema definition, it's not always easy to determine where an
element may need to be reused. We would recommend always declaring your
components as global.
 
Search WWH ::




Custom Search