<?xml version="1.0" encoding="UTF-8"?>
<!--
  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.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:beans="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:ptp="http://cxf.apache.org/configuration/parameterized-types"

            targetNamespace="http://cxf.apache.org/blueprint/core"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified"  >

    <xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0" schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"/>
    <xsd:import namespace="http://cxf.apache.org/configuration/beans" schemaLocation="http://cxf.apache.org/schemas/configuration/cxf-beans.xsd"/>
    <xsd:import namespace="http://cxf.apache.org/configuration/parameterized-types"
                schemaLocation="http://cxf.apache.org/schemas/configuration/parameterized-types.xsd"/>

    <xsd:annotation>
        <xsd:documentation>
            This schema defines beans representing the CXF bus and its core features.
        </xsd:documentation>
    </xsd:annotation>

    <xsd:element name="logging">
        <xsd:annotation>
            <xsd:documentation>
                The logging feature enables you to log the content of inbound and outbound messages and faults.
                The content is logged by all log handlers configured in your java.util.logging configuration file,
                provided the log level for classes org.apache.cxf.interceptor.LoggingInInterceptor and
                org.apache.cxf.interceptor.LoggingOutInterceptor is at least INFO.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence />
            <xsd:attribute name="limit" type="xsd:int" use="optional" default="102400"/>
            <xsd:attribute name="id" type="xsd:string" use="optional"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="fastinfoset">
        <xsd:annotation>
            <xsd:documentation>
                The fastinfoset feature enables you to turn on using fastinfoset encoding of
                xml payloads.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence />
            <xsd:attribute name="force" type="xsd:boolean" use="optional" default="false"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="workqueue">
        <xsd:annotation>
            <xsd:documentation>
                Configuration for workqueues that CXF uses
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence />
            <xsd:attribute name="highWaterMark" type="ptp:ParameterizedInt" use="optional"/>
            <xsd:attribute name="lowWaterMark" type="ptp:ParameterizedInt" use="optional"/>
            <xsd:attribute name="initialSize" type="ptp:ParameterizedInt" use="optional"/>
            <xsd:attribute name="queueSize" type="ptp:ParameterizedInt" use="optional"/>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
            <xsd:attribute name="dequeueTimeout" type="ptp:ParameterizedLong" use="optional"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="bus">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="features" type="xsd:anyType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>
                            The list of features that are applied to the bus.
                            Child elements of this element must be beans whose bean class extends
                            org.apache.cxf.AbstractFeature, or references to such beans.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="inInterceptors" type="xsd:anyType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>
                            The list of interceptors that the bus contributes to all inbound message interceptor chains.
                            Child elements of this element must be beans whose bean class implements
                            org.apache.cxf.Interceptor, or references to such beans.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>
                            The list of interceptors that the bus contributes to all inbound fault interceptor chains.
                            Child elements of this element must be beans whose bean class implements
                            org.apache.cxf.Interceptor, or references to such beans.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="outInterceptors" type="xsd:anyType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>
                            The list of interceptors that the bus contributes to all outbound message interceptor chains.
                            Child elements of this element must be beans whose bean class implements
                            org.apache.cxf.Interceptor, or references to such beans.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="outFaultInterceptors" type="xsd:anyType" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>
                            The list of interceptors that the bus contributes to all outbound fault interceptor chains.
                            Child elements of this element must be beans whose bean class implements
                            org.apache.cxf.Interceptor, or references to such beans.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="properties" type="beans:Tmap" minOccurs="0">
                    <xsd:annotation>
                        <xsd:documentation>Specifies a map of properties that are passed to the bus.</xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
            </xsd:all>
            <xsd:attributeGroup ref="cxf-beans:beanAttributes"/>
            <xsd:attribute name="bus" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Name of the bus that is being configured.  Defaults to "cxf", but can
                        be used to specify a different bus to allow for multiple Bus instances
                        within an application.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>
            <xsd:attribute name="id" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Unique identifier for the particular Bus instance.  Mostly used by the
                        JMX management and OSGi service registry to provide some level of
                        persitent naming to the Bus instances.  The default is "cxf" + random number.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>