<?xml version="1.0" encoding="UTF-8" ?>
<jaxws:bindings
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
(perhaps using maven-jaxb2-plugin with episodes)
-->
<jaxws:bindings
- node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://gumartinm.name/spring-ws/example']">
+ node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://gumartinm.name/spring-ws/example']">
<!--
Perhaps it would be better to relay on the package generated automatically from WSDL
<jaxb:package name="de.spring.webservices.client.auto"/>
</jaxb:schemaBindings>
- <jaxb:bindings node="//xs:element[@name='CustomBindingExampleRequest']/xs:complextype">
+ <jaxb:bindings node="//xsd:element[@name='CustomBindingExampleRequest']/xsd:complextype">
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
<annox:annotate>@java.lang.suppresswarnings({"unchecked","rawtypes"})</annox:annotate>
</jaxb:bindings>
- <jaxb:bindings node="//xs:element[@name='CustomBindingExampleResponse']/xs:complextype">
+ <jaxb:bindings node="//xsd:element[@name='CustomBindingExampleResponse']/xsd:complextype">
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
<annox:annotate>@java.lang.suppresswarnings({"unchecked","rawtypes"})</annox:annotate>
</jaxb:bindings>
<jaxb:globalBindings>
<xjc:javaType adapter="de.spring.webservices.binders.XSDateTimeCustomBinder"
- name="java.util.Date" xmlType="xs:dateTime" />
+ name="java.util.Date" xmlType="xsd:dateTime" />
</jaxb:globalBindings>
</jaxws:bindings>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://gumartinm.name/spring-ws/example" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://gumartinm.name/spring-ws/exampleService" targetNamespace="http://gumartinm.name/spring-ws/exampleService">
<wsdl:types>
- <xs:schema xmlns:annox="http://annox.dev.java.net" xmlns:example="http://gumartinm.name/spring-ws/example" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://gumartinm.name/spring-ws/parent" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://gumartinm.name/spring-ws/example">
+ <xsd:schema xmlns="http://gumartinm.name/spring-ws/example" xmlns:annox="http://annox.dev.java.net" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://gumartinm.name/spring-ws/parent" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://gumartinm.name/spring-ws/example">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
<!--
We are going to use catalog.cat in order to avoid downloading parent.xsd from remote server
when creating Java objects from examples.xsd.
-->
- <xs:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd"/>
+ <xsd:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd"/>
<!-- Spring requires the following:
The same for CustomBindingExample.
-->
<!-- Using inheritance and annox plugin -->
- <xs:element name="ExampleRequest">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ <xsd:element name="ExampleRequest">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="parent:limitedString"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleResponse">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="parent:limitedString"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleResponse">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Using custombinding.xjb instead of inheritance plugin.
Useful when you can not modify your xsd files because they are provided
by another person or company
-->
- <xs:element name="CustomBindingExampleRequest">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xs:dateTime"/>
- <xs:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleResponse">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xs:dateTime"/>
- <xs:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="CustomBindingExampleRequest">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xsd:dateTime"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleResponse">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xsd:dateTime"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Example of creating array list by means of XSD -->
- <xs:complexType name="car">
- <xs:sequence>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="100" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="truck">
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:all>
- </xs:complexType>
- <xs:element name="vehicles">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" name="cars" type="example:car"/>
- <xs:element maxOccurs="100" minOccurs="0" name="trucks" type="example:truck"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:complexType name="car">
+ <xsd:sequence>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="100" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="truck">
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:element name="vehicles">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" name="cars" type="car"/>
+ <xsd:element maxOccurs="100" minOccurs="0" name="trucks" type="truck"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>
</wsdl:types>
<wsdl:message name="ExampleFault">
<wsdl:part element="sch:ExampleFault" name="ExampleFault">
<?xml version="1.0" encoding="UTF-8" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:parent="http://gumartinm.name/spring-ws/parent"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
xmlns:annox="http://annox.dev.java.net"
- xmlns:example="http://gumartinm.name/spring-ws/example"
jaxb:version="2.1"
jaxb:extensionBindingPrefixes="inheritance annox"
+ targetNamespace="http://gumartinm.name/spring-ws/example"
elementFormDefault="qualified"
- targetNamespace="http://gumartinm.name/spring-ws/example">
+ attributeFormDefault="unqualified">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
<!--
We are going to use catalog.cat in order to avoid downloading parent.xsd from remote server
when creating Java objects from examples.xsd.
-->
- <xs:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
+ <xsd:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
<!-- Spring requires the following:
The same for CustomBindingExample.
-->
<!-- Using inheritance and annox plugin -->
- <xs:element name="ExampleRequest">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ <xsd:element name="ExampleRequest">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="parent:limitedString" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleResponse">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="parent:limitedString" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleResponse">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Using custombinding.xjb instead of inheritance plugin.
Useful when you can not modify your xsd files because they are provided
by another person or company
-->
- <xs:element name="CustomBindingExampleRequest">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleResponse">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="CustomBindingExampleRequest">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleResponse">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Example of creating array list by means of XSD -->
- <xs:complexType name="car">
- <xs:sequence>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="truck">
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- <xs:element name="vehicles">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="cars" type="example:car" maxOccurs="unbounded" />
- <xs:element name="trucks" type="example:truck" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:complexType name="car">
+ <xsd:sequence>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="truck">
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:element name="vehicles">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="cars" type="car" maxOccurs="unbounded" />
+ <xsd:element name="trucks" type="truck" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>
-<?xml version="1.0" encoding="UTF-8" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:parent="http://gumartinm.name/spring-ws/parent"
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsd:schema xmlns="http://gumartinm.name/spring-ws/parent"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
targetNamespace="http://gumartinm.name/spring-ws/parent">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
- <xs:simpleType name="parentEnumType">
- <xs:restriction base="xs:token">
- <xs:enumeration value="FIRST"/>
- <xs:enumeration value="SECOND"/>
- <xs:enumeration value="THIRD"/>
- <xs:enumeration value="FOURTH"/>
- <xs:enumeration value="FIVETH"/>
- </xs:restriction>
- </xs:simpleType>
+ <xsd:simpleType name="parentEnumType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="FIRST"/>
+ <xsd:enumeration value="SECOND"/>
+ <xsd:enumeration value="THIRD"/>
+ <xsd:enumeration value="FOURTH"/>
+ <xsd:enumeration value="FIVETH"/>
+ </xsd:restriction>
+ </xsd:simpleType>
- <xs:simpleType name="limitedString">
- <xs:restriction base="xs:string">
- <xs:maxLength value="30" />
- </xs:restriction>
- </xs:simpleType>
+ <xsd:simpleType name="limitedString">
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="30" />
+ </xsd:restriction>
+ </xsd:simpleType>
- <xs:complexType name="element">
- <xs:sequence>
- <xs:element name="message" type="xs:string"/>
- <xs:element name="messageArgs" type="xs:string" minOccurs="0" maxOccurs="100"/>
- </xs:sequence>
- </xs:complexType>
+ <xsd:complexType name="element">
+ <xsd:sequence>
+ <xsd:element name="message" type="xsd:string"/>
+ <xsd:element name="messageArgs" type="xsd:string" minOccurs="0" maxOccurs="100"/>
+ </xsd:sequence>
+ </xsd:complexType>
- <xs:element name="GeneralFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="technicalError" type="xs:string" />
- <xs:element name="elements" type="parent:element" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="GeneralFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="technicalError" type="xsd:string" />
+ <xsd:element name="elements" type="element" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>
<!-- The same applies to annotate. If you do not want or you may not modify your xsd files you can
modify instead this file with your custom binding :) -->
- <!-- Custom xs:dateTime adapter
+ <!-- Custom xsd:dateTime adapter
See: https://jaxb.java.net/2.2.4/docs/vendorCustomizations.html#javaType
-->
<jaxb:globalBindings>
<xjc:javaType adapter="de.spring.webservices.binders.XSDateTimeCustomBinder"
- name="java.util.Date" xmlType="xs:dateTime" />
+ name="java.util.Date" xmlType="xsd:dateTime" />
</jaxb:globalBindings>
</jaxb:bindings>
<?xml version="1.0" encoding="UTF-8" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:parent="http://gumartinm.name/spring-ws/parent"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
xmlns:annox="http://annox.dev.java.net"
- xmlns:example="http://gumartinm.name/spring-ws/example"
jaxb:version="2.1"
jaxb:extensionBindingPrefixes="inheritance annox"
+ targetNamespace="http://gumartinm.name/spring-ws/example"
elementFormDefault="qualified"
- targetNamespace="http://gumartinm.name/spring-ws/example">
+ attributeFormDefault="unqualified">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
<!--
We are going to use catalog.cat in order to avoid downloading parent.xsd from remote server
when creating Java objects from examples.xsd.
-->
- <xs:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
+ <xsd:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
<!-- Spring requires the following:
The same for CustomBindingExample.
-->
<!-- Using inheritance and annox plugin -->
- <xs:element name="ExampleRequest">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ <xsd:element name="ExampleRequest">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="parent:limitedString" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleResponse">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="parent:limitedString" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleResponse">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Using custombinding.xjb instead of inheritance plugin.
Useful when you can not modify your xsd files because they are provided
by another person or company
-->
- <xs:element name="CustomBindingExampleRequest">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleResponse">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="CustomBindingExampleRequest">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleResponse">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Example of creating array list by means of XSD -->
- <xs:complexType name="car">
- <xs:sequence>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="truck">
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- <xs:element name="vehicles">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="cars" type="example:car" maxOccurs="unbounded" />
- <xs:element name="trucks" type="example:truck" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:complexType name="car">
+ <xsd:sequence>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="truck">
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:element name="vehicles">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="cars" type="car" maxOccurs="unbounded" />
+ <xsd:element name="trucks" type="truck" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://gumartinm.name/spring-ws/example" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://gumartinm.name/spring-ws/exampleService" targetNamespace="http://gumartinm.name/spring-ws/exampleService">
<wsdl:types>
- <xs:schema xmlns:annox="http://annox.dev.java.net" xmlns:example="http://gumartinm.name/spring-ws/example" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://gumartinm.name/spring-ws/parent" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://gumartinm.name/spring-ws/example">
+ <xsd:schema xmlns="http://gumartinm.name/spring-ws/example" xmlns:annox="http://annox.dev.java.net" xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:parent="http://gumartinm.name/spring-ws/parent" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:extensionBindingPrefixes="inheritance annox" jaxb:version="2.1" targetNamespace="http://gumartinm.name/spring-ws/example">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
<!--
We are going to use catalog.cat in order to avoid downloading parent.xsd from remote server
when creating Java objects from examples.xsd.
-->
- <xs:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd"/>
+ <xsd:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd"/>
<!-- Spring requires the following:
The same for CustomBindingExample.
-->
<!-- Using inheritance and annox plugin -->
- <xs:element name="ExampleRequest">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ <xsd:element name="ExampleRequest">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="parent:limitedString"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleResponse">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="parent:limitedString"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleResponse">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Using custombinding.xjb instead of inheritance plugin.
Useful when you can not modify your xsd files because they are provided
by another person or company
-->
- <xs:element name="CustomBindingExampleRequest">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xs:dateTime"/>
- <xs:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleResponse">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xs:dateTime"/>
- <xs:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="CustomBindingExampleRequest">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xsd:dateTime"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleResponse">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="exampleDate" type="xsd:dateTime"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Example of creating array list by means of XSD -->
- <xs:complexType name="car">
- <xs:sequence>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="100" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="truck">
- <xs:all>
- <xs:element name="data" type="xs:string"/>
- <xs:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
- </xs:all>
- </xs:complexType>
- <xs:element name="vehicles">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" name="cars" type="example:car"/>
- <xs:element maxOccurs="100" minOccurs="0" name="trucks" type="example:truck"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:complexType name="car">
+ <xsd:sequence>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="100" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="truck">
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string"/>
+ <xsd:element maxOccurs="1" minOccurs="0" name="parentEnum" type="parent:parentEnumType"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:element name="vehicles">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" name="cars" type="car"/>
+ <xsd:element maxOccurs="100" minOccurs="0" name="trucks" type="truck"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>
</wsdl:types>
<wsdl:message name="ExampleFault">
<wsdl:part element="sch:ExampleFault" name="ExampleFault">
<?xml version="1.0" encoding="UTF-8" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:parent="http://gumartinm.name/spring-ws/parent"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
xmlns:annox="http://annox.dev.java.net"
- xmlns:example="http://gumartinm.name/spring-ws/example"
jaxb:version="2.1"
jaxb:extensionBindingPrefixes="inheritance annox"
+ targetNamespace="http://gumartinm.name/spring-ws/example"
elementFormDefault="qualified"
- targetNamespace="http://gumartinm.name/spring-ws/example">
+ attributeFormDefault="unqualified">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
<!--
We are going to use catalog.cat in order to avoid downloading parent.xsd from remote server
when creating Java objects from examples.xsd.
-->
- <xs:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
+ <xsd:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
<!-- Spring requires the following:
The same for CustomBindingExample.
-->
<!-- Using inheritance and annox plugin -->
- <xs:element name="ExampleRequest">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ <xsd:element name="ExampleRequest">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="parent:limitedString" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleResponse">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="parent:limitedString" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleResponse">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Using custombinding.xjb instead of inheritance plugin.
Useful when you can not modify your xsd files because they are provided
by another person or company
-->
- <xs:element name="CustomBindingExampleRequest">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleResponse">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="CustomBindingExampleRequest">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleResponse">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Example of creating array list by means of XSD -->
- <xs:complexType name="car">
- <xs:sequence>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="truck">
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- <xs:element name="vehicles">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="cars" type="example:car" maxOccurs="unbounded" />
- <xs:element name="trucks" type="example:truck" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:complexType name="car">
+ <xsd:sequence>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="truck">
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:element name="vehicles">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="cars" type="car" maxOccurs="unbounded" />
+ <xsd:element name="trucks" type="truck" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>
-<?xml version="1.0" encoding="UTF-8" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:parent="http://gumartinm.name/spring-ws/parent"
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsd:schema xmlns="http://gumartinm.name/spring-ws/parent"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
targetNamespace="http://gumartinm.name/spring-ws/parent">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
- <xs:simpleType name="parentEnumType">
- <xs:restriction base="xs:token">
- <xs:enumeration value="FIRST"/>
- <xs:enumeration value="SECOND"/>
- <xs:enumeration value="THIRD"/>
- <xs:enumeration value="FOURTH"/>
- <xs:enumeration value="FIVETH"/>
- </xs:restriction>
- </xs:simpleType>
+ <xsd:simpleType name="parentEnumType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="FIRST"/>
+ <xsd:enumeration value="SECOND"/>
+ <xsd:enumeration value="THIRD"/>
+ <xsd:enumeration value="FOURTH"/>
+ <xsd:enumeration value="FIVETH"/>
+ </xsd:restriction>
+ </xsd:simpleType>
- <xs:simpleType name="limitedString">
- <xs:restriction base="xs:string">
- <xs:maxLength value="30" />
- </xs:restriction>
- </xs:simpleType>
+ <xsd:simpleType name="limitedString">
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="30" />
+ </xsd:restriction>
+ </xsd:simpleType>
- <xs:complexType name="element">
- <xs:sequence>
- <xs:element name="message" type="xs:string"/>
- <xs:element name="messageArgs" type="xs:string" minOccurs="0" maxOccurs="100"/>
- </xs:sequence>
- </xs:complexType>
+ <xsd:complexType name="element">
+ <xsd:sequence>
+ <xsd:element name="message" type="xsd:string"/>
+ <xsd:element name="messageArgs" type="xsd:string" minOccurs="0" maxOccurs="100"/>
+ </xsd:sequence>
+ </xsd:complexType>
- <xs:element name="GeneralFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="technicalError" type="xs:string" />
- <xs:element name="elements" type="parent:element" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="GeneralFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="technicalError" type="xsd:string" />
+ <xsd:element name="elements" type="element" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>
<!-- The same applies to annotate. If you do not want or you may not modify your xsd files you can
modify instead this file with your custom binding :) -->
- <!-- Custom xs:dateTime adapter
+ <!-- Custom xsd:dateTime adapter
See: https://jaxb.java.net/2.2.4/docs/vendorCustomizations.html#javaType
-->
<jaxb:globalBindings>
<xjc:javaType adapter="de.spring.webservices.binders.XSDateTimeCustomBinder"
- name="java.util.Date" xmlType="xs:dateTime" />
+ name="java.util.Date" xmlType="xsd:dateTime" />
</jaxb:globalBindings>
</jaxb:bindings>
<?xml version="1.0" encoding="UTF-8" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xsd:schema xmlns="http://gumartinm.name/spring-ws/example"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:parent="http://gumartinm.name/spring-ws/parent"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
xmlns:annox="http://annox.dev.java.net"
- xmlns:example="http://gumartinm.name/spring-ws/example"
jaxb:version="2.1"
jaxb:extensionBindingPrefixes="inheritance annox"
+ targetNamespace="http://gumartinm.name/spring-ws/example"
elementFormDefault="qualified"
- targetNamespace="http://gumartinm.name/spring-ws/example">
+ attributeFormDefault="unqualified">
<!--
When should an item be declared as an element versus when should it be defined as a type?
When in doubt, make it a type. You can always create an element from the type, if needed. With a type, other elements can reuse that type.
- <xs:all> specifies that the child elements can appear in any order.
+ <xsd:all> specifies that the child elements can appear in any order.
- <xs:sequence> specifies child elements can only appear in the order mentioned.
+ <xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
<!--
We are going to use catalog.cat in order to avoid downloading parent.xsd from remote server
when creating Java objects from examples.xsd.
-->
- <xs:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
+ <xsd:import namespace="http://gumartinm.name/spring-ws/parent" schemaLocation="http://gumartinm.name/spring-ws/parent/parent.xsd" />
<!-- Spring requires the following:
The same for CustomBindingExample.
-->
<!-- Using inheritance and annox plugin -->
- <xs:element name="ExampleRequest">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ <xsd:element name="ExampleRequest">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="parent:limitedString" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleResponse">
- <xs:complexType>
- <xs:annotation>
- <xs:appinfo>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="parent:limitedString" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleResponse">
+ <xsd:complexType>
+ <xsd:annotation>
+ <xsd:appinfo>
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
- </xs:appinfo>
- </xs:annotation>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="ExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Using custombinding.xjb instead of inheritance plugin.
Useful when you can not modify your xsd files because they are provided
by another person or company
-->
- <xs:element name="CustomBindingExampleRequest">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleResponse">
- <xs:complexType>
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="exampleDate" type="xs:dateTime" minOccurs="0" maxOccurs="1" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="CustomBindingExampleFault">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="parent:GeneralFault" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:element name="CustomBindingExampleRequest">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleResponse">
+ <xsd:complexType>
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="exampleDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CustomBindingExampleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parent:GeneralFault" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
<!-- Example of creating array list by means of XSD -->
- <xs:complexType name="car">
- <xs:sequence>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="truck">
- <xs:all>
- <xs:element name="data" type="xs:string" />
- <xs:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
- </xs:all>
- </xs:complexType>
- <xs:element name="vehicles">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="cars" type="example:car" maxOccurs="unbounded" />
- <xs:element name="trucks" type="example:truck" minOccurs="0" maxOccurs="100" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xsd:complexType name="car">
+ <xsd:sequence>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="truck">
+ <xsd:all>
+ <xsd:element name="data" type="xsd:string" />
+ <xsd:element name="parentEnum" type="parent:parentEnumType" minOccurs="0" maxOccurs="1" />
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:element name="vehicles">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="cars" type="car" maxOccurs="unbounded" />
+ <xsd:element name="trucks" type="truck" minOccurs="0" maxOccurs="100" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
-</xs:schema>
+</xsd:schema>