<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2011 by Graz University of Technology, Austria
  MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
  initiative of the Federal Chancellery Austria and Graz University of Technology.

  Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
  the European Commission - subsequent versions of the EUPL (the "Licence");
  You may not use this work except in compliance with the Licence.
  You may obtain a copy of the Licence at:
  http://www.osor.eu/eupl/

  Unless required by applicable law or agreed to in writing, software
  distributed under the Licence is distributed on an "AS IS" basis,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the Licence for the specific language governing permissions and
  limitations under the Licence.

  This product combines work with different licenses. See the "NOTICE" text
  file for details on the various modules and licenses.
  The "NOTICE" text file is part of the distribution. Any derivative works
  that you distribute must include a readable copy of the "NOTICE" text file.
-->
<!--
    Binding customization for STAL service (stal.wsdl)
    JAX-WS does not yet support "schema component designator"s (SCD, http://www.w3.org/TR/xmlschema-ref/)
-->
<bindings xmlns="http://java.sun.com/xml/ns/jaxws"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        wsdlLocation="../wsdl/stal-service.wsdl">
    
            
    <!-- default settings 
    <enableWrapperStyle>true</enableWrapperStyle>
    <enableAsyncMapping>false</enableAsyncMapping-->
    <package name="at.gv.egiz.stal.service" />

    <!-- wsdl:portType customization -->
    <bindings node="wsdl:definitions/wsdl:portType[@name='STALPortType']">
        <!-- change generated SEI class -->
        <!--class name="STALServiceI" /-->
        
        <!-- override default settings -->
        <enableWrapperStyle>true</enableWrapperStyle>
        <enableAsyncMapping>false</enableAsyncMapping>
    </bindings>
    
    <!-- wsdl:portType operation customization -->
    <bindings node="wsdl:definitions/wsdl:portType[@name='STALPortType']/wsdl:operation[@name='connect']">
        <!-- rename method name -->
        <method name="connect">
            <javadoc>Initial connection, get the first request.</javadoc>
        </method>
        
        <!-- rename method params -->
        <parameter part="wsdl:definitions/wsdl:message[@name='ConnectRequest']/wsdl:part[@name='part1']" name="sessionId" />
        
        <!-- override default settings -->
        <enableWrapperStyle>true</enableWrapperStyle>
        <enableAsyncMapping>false</enableAsyncMapping>
    </bindings>
    
    <bindings node="wsdl:definitions/wsdl:portType[@name='STALPortType']/wsdl:operation[@name='nextRequest']">
        <!-- rename method name -->
        <method name="getNextRequest">
            <javadoc>Fetch the next request.</javadoc>
        </method>
        
        <!-- rename method params -->
        <parameter part="wsdl:definitions/wsdl:message[@name='NextRequestRequest']/wsdl:part[@name='part1']" name="request" />
        
        <!-- override default settings -->
        <enableWrapperStyle>true</enableWrapperStyle>
        <enableAsyncMapping>false</enableAsyncMapping>
    </bindings>
    
    <bindings node="wsdl:definitions/wsdl:portType[@name='STALPortType']/wsdl:operation[@name='getHashDataInput']">
        <!-- rename method name -->
        <method name="getHashDataInput">
            <javadoc>Fetch the signed references corresponding to the previous SignatureRequest.</javadoc>
        </method>
        
        <!-- rename method params -->
        <parameter part="wsdl:definitions/wsdl:message[@name='GetHashDataInputRequest']/wsdl:part[@name='part1']" name="request" />
        
        <!-- override default settings -->
        <enableWrapperStyle>true</enableWrapperStyle>
        <enableAsyncMapping>false</enableAsyncMapping>
    </bindings>
    
    <!-- wsdl:service customization -->
    <!--bindings node="wsdl:definitions/wsdl:service[@name='STALService']">
        <class name="STALService"/>
    </bindings-->
    
    <!-- change the port accessor method -->
    <!-- bindings node="wsdl:definitions/wsdl:service[@name='STALService']/wsdl:port[@name='STALPort']">
        <method name="getSTALServicePort"/>
    </bindings -->    
    
    <!-- INLINED SCHEMA CUSTOMIZATION 
    <bindings node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://danu.iaik.tugraz.at/xml']">
        <jaxb:schemaBindings>
            <jaxb:package name="iaik.ws.sample.sandbox.generated.service.jaxb" />
        </jaxb:schemaBindings>
    </bindings-->
    
    <!-- EXTERNAL SCHEMA CUSTOMIZATION in custom-jaxb.xml -->
    
    <!--bindings node="wsdl:definitions" xmlns:jws="http://java.sun.com/xml/ns/javaee">
        <jws:handler-chains>
            <jws:handler-chain>
                <jws:handler>
                    <jws:handler-class>fromwsdlhandler.common.LoggingHandler</jws:handler-class>
                </jws:handler>
            </jws:handler-chain>
        </jws:handler-chains>
    </bindings-->
    
</bindings>