<?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:beans="http://www.springframework.org/schema/beans" 
           xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
           elementFormDefault="qualified" 
           attributeFormDefault="unqualified"
           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
           jaxb:version="2.0">

    <xs:include schemaLocation="http://cxf.apache.org/schemas/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://www.springframework.org/schema/beans" 
               schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.0.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="basicAuthSupplier"   type="cxf-beans:ClassOrBeanType"/>
    
    
    <xs:element name="conduit">
      <xs:complexType>
        <xs:complexContent>
          <xs:extension base="beans:identifiedType">
            <xs:all>
                <xs:element ref="http-conf:client" minOccurs="0">
                   <xs:annotation>
                     <xs:documentation>
                       This element holds the parameters that configure
                       the client side of an Http connection.
                     </xs:documentation>
                   </xs:annotation>
                </xs:element>
                <xs:element ref="http-conf:authorization" minOccurs="0">
                   <xs:annotation>
                     <xs:documentation>
                       This element holds the parameters that configure
                       the Basic Authentication that will be premptively
                       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>
                       This element 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>
                       This element 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:basicAuthSupplier" 
                			minOccurs="0" maxOccurs="1">
                   <xs:annotation>
                     <xs:documentation>
                       This element holds the bean reference or class name
                       of an object that supplies Basic Auth information
                       both prememptively and in response to a 401 Http
                       Challenge. This class must extend the abstract class 
                       org.apache.cxf.transport.http.BasicAuthSupplier.
                     </xs:documentation>
                   </xs:annotation>
                </xs:element>
                <xs:element ref="http-conf:trustDecider" 
                			minOccurs="0" maxOccurs="1">
                   <xs:annotation>
                     <xs:documentation>
                       This element 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="beans:identifiedType">
            <xs:all>
	            <xs:element ref="http-conf:server" minOccurs="0">
	               <xs:annotation>
	                 <xs:documentation>
	                   This element holds the parameters that configure
	                   the server side of an Http connection.
	                 </xs:documentation>
	               </xs:annotation>
	            </xs:element>
	            <xs:element ref="http-conf:contextMatchStrategy" minOccurs="0">
	               <xs:annotation>
	                 <xs:documentation>
	                   This element 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>
	                   This element 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>
