<?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.
-->

<xs:schema targetNamespace="http://cxf.apache.org/transports/http/configuration"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:xsd="http://www.w3.org/2001/XMLSchema"
           xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
           xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
           xmlns:sec="http://cxf.apache.org/configuration/security"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
           jaxb:version="3.0">

    <xs:include schemaLocation="../wsdl/http-conf.xsd"/>
    <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
               schemaLocation="http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd"/>
    <xs:import namespace="http://cxf.apache.org/configuration/security"
               schemaLocation="http://cxf.apache.org/schemas/configuration/security.xsd"/>
    <xs:import namespace="http://cxf.apache.org/configuration/beans"
               schemaLocation="http://cxf.apache.org/schemas/configuration/cxf-beans.xsd"/>

    <!-- Conduit Specific Items -->

    <xs:element name="authorization"       type="sec:AuthorizationPolicy"/>
    <xs:element name="proxyAuthorization"  type="sec:ProxyAuthorizationPolicy"/>
    <xs:element name="tlsClientParameters" type="sec:TLSClientParametersType"/>
    <xs:element name="trustDecider"        type="cxf-beans:ClassOrBeanType"/>
    <xs:element name="authSupplier"        type="cxf-beans:ClassOrBeanType"/>

    <xs:element name="conduit">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="cxf-beans:identifiedType">
                    <xs:all>
                        <xs:element ref="http-conf:client" minOccurs="0">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the parameters that configure
                                    a client-side HTTP connection.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="http-conf:authorization" minOccurs="0">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the parameters that configure
                                    the Basic Authentication that will be preemptively
                                    used. Note, supplying a Basic Auth Supplier object
                                    is the preferred approach.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="http-conf:proxyAuthorization" minOccurs="0">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the parameters that configure
                                    the Basic Authentication for an outgoing HTTP
                                    Proxy Server.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="http-conf:tlsClientParameters" minOccurs="0">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the parameters that configure
                                    the underlying SSL/TLS JSSE client-side
                                    of an HTTPS connection.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="http-conf:authSupplier"
                                    minOccurs="0" maxOccurs="1">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the bean reference or class name
                                    of an object that supplies Auth information
                                    both preemptively and in response to a 401 HTTP
                                    Challenge. This class must extend the abstract class
                                    org.apache.cxf.transport.http.HttpBasicAuthSupplier.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="http-conf:trustDecider"
                                    minOccurs="0" maxOccurs="1">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the bean reference or class name
                                    of an object that checks the Http(s)URLConnection
                                    that will establish trust for a connection with an
                                    HTTP(S) server, before any information is sent to the
                                    server, namely Basic Auth information. This class
                                    must extend the abstract class
                                    org.apache.cxf.transport.http.MessageTrustDecider.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                    </xs:all>
                    <xs:attributeGroup ref="cxf-beans:beanAttributes"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="destination">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="cxf-beans:identifiedType">
                    <xs:all>
                        <xs:element ref="http-conf:server" minOccurs="0">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the parameters that configure
                                    a server-side HTTP connection.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="http-conf:contextMatchStrategy" minOccurs="0">
                            <xs:annotation>
                                <xs:documentation>
                                    Holds the parameters that configure
                                    the context match strategy for processing an HTTP request.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element ref="http-conf:fixedParameterOrder" minOccurs="0">
                            <xs:annotation>
                                <xs:documentation>
                                    Signifies whether the parameter order of
                                    an HTTP request handled by this destination is fixed.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:element>
                    </xs:all>
                    <xs:attributeGroup ref="cxf-beans:beanAttributes"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

</xs:schema>