/**
 * OW2 Specifications
 * Copyright (C) 2007 Bull S.A.S.
 * Contact: easybeans@objectweb.org
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 *
 * --------------------------------------------------------------------------
 * $Id: SOAPBinding.java 4359 2008-12-10 10:24:40Z sauthieg $
 * --------------------------------------------------------------------------
 */

package javax.jws.soap;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Specifies the mapping of the Web Service onto the SOAP message protocol.
 * @author Guillaume Sauthier
 */
@Retention(value=RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface SOAPBinding {

    /**
     * The style of mapping parameters onto SOAP messages.
     */
    public static enum ParameterStyle {
        BARE, WRAPPED
    }

    /**
     * The SOAP binding style.
     */
    public static enum Style {
        DOCUMENT, RPC
    }

    /**
     * The SOAP binding use.
     */
    public static enum Use {
        ENCODED, LITERAL
    }

    /**
     * Determines whether method parameters represent the entire
     * message body, or whether the parameters are elements wrapped
     * inside a top-level element named after the operation.
     */
    ParameterStyle parameterStyle() default ParameterStyle.WRAPPED;

    /**
     * Defines the encoding style for messages send to and from
     * the Web Service.
     */
    Style style() default Style.DOCUMENT;

    /**
     * Defines the formatting style for messages sent to and from
     * the Web Service.
     */
    Use use() default Use.LITERAL;
}
