<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
            targetNamespace="urn:jboss:jaxws-config:2.0"
            xmlns:tns="urn:jboss:jaxws-config:2.0"
            xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb"
            xmlns:javaee="http://java.sun.com/xml/ns/javaee"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">

   <xsd:annotation>
      <xsd:documentation>
         <![CDATA[
            This is the schema definition for JBossWS configurations JAXWS.
            It relies on the handler definitions that are part of the standard J2EE-1.5 deployment descriptors.
         ]]>
      </xsd:documentation>
   </xsd:annotation>

   <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="javaee_web_services_1_2.xsd"/>

   <xsd:element name="jaxws-config" type="tns:jaxwsConfigType"/>
   <xsd:complexType name="jaxwsConfigType">
      <xsd:choice>
         <xsd:element name="endpoint-config" type="tns:endpointConfigType" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="client-config" type="tns:clientConfigType" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:choice>
   </xsd:complexType>

   <xsd:complexType name="endpointConfigType">
      <xsd:complexContent>
         <xsd:extension base="tns:commonConfigType"/>
      </xsd:complexContent>
   </xsd:complexType>

   <!-- client config -->
   <xsd:complexType name="clientConfigType">
      <xsd:complexContent>
         <xsd:extension base="tns:commonConfigType"/>
      </xsd:complexContent>
   </xsd:complexType>

   <xsd:complexType name="commonConfigType">
      <xsd:sequence>
         <xsd:element name="config-name" type="xsd:string"/>
         <xsd:element name="pre-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
         <xsd:element name="post-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
         <xsd:element name="feature" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="property" type="tns:propertyType" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="propertyType">
      <xsd:annotation>
         <xsd:documentation>

            A property models name value pairs.

         </xsd:documentation>
      </xsd:annotation>
      <xsd:sequence>
         <xsd:element name="property-name" type="xsd:anyURI"/>
         <xsd:element name="property-value" type="xsd:string"/>
      </xsd:sequence>
   </xsd:complexType>

</xsd:schema>
