alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Axis 2 example source code file (union.xsd)

This example Axis 2 source code file (union.xsd) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Axis 2 tags/keywords

a-z, apache, apache, asf, asf, dateordatetimetype, fooopenenum, foundation, license, license, see, see, unionqnametest, you

The Axis 2 union.xsd source code

<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements. See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership. The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License. You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<s:schema elementFormDefault="qualified"
          xmlns:s="http://www.w3.org/2001/XMLSchema"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:s0="http://tempuri.org/union"
          targetNamespace="http://tempuri.org/union">
    <s:import namespace="http://www.w3.org/2001/XMLSchema"/>

    <s:simpleType name="FooEnum">
        <s:restriction base="s:anyURI">
            <s:enumeration value="http://A"/>
            <s:enumeration value="http://B"/>
            <s:enumeration value="http://C"/>
        </s:restriction>
    </s:simpleType>
    <s:simpleType name="FooOpenEnum">
        <s:union memberTypes="s0:FooEnum s:anyURI"/>
    </s:simpleType>
    <s:simpleType name="DateOrDateTimeType">
        <s:union memberTypes="s:boolean s:int s:date s:dateTime"/>
    </s:simpleType>
    <s:element name="Record1">
        <s:complexType>
            <s:sequence>
                <s:element name="elem1" type="s0:FooOpenEnum"/>
            </s:sequence>
        </s:complexType>
    </s:element>
    <s:element name="Record2">
        <s:complexType>
            <s:sequence>
                <s:element name="elem1" type="s0:DateOrDateTimeType"/>
            </s:sequence>
        </s:complexType>
    </s:element>
    <s:simpleType name="UnionQNameTest">
        <s:union memberTypes="s:QName s:string"/>
    </s:simpleType>
    <s:element name="UnionQNameTestElement" type="s0:UnionQNameTest"/>

    <xsd:simpleType name="PackingType_T">
        <xsd:union>
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:pattern value="MINOR_([a-z]|[A-Z]|[0-9]|(_|-))*"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:pattern value="PROP_([a-z]|[A-Z]|[0-9]|(_|-))*"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="NO_PACKING"/>
                    <xsd:enumeration value="ZIP"/>
                    <xsd:enumeration value="TAR"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:union>
    </xsd:simpleType>

    <s:element name="TestInnerUnionType" type="s0:PackingType_T"/>


</s:schema>

Other Axis 2 examples (source code examples)

Here is a short list of links related to this Axis 2 union.xsd source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.