src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java

Tue, 23 Apr 2013 18:33:20 -0700

author
katleman
date
Tue, 23 Apr 2013 18:33:20 -0700
changeset 374
72e03566f0a6
parent 368
0989ad8c0860
child 637
9c07ef4934dd
permissions
-rw-r--r--

8012643: JDK8 b86 source with GPL header errors
Reviewed-by: dholmes, alanb

     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Oracle in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    24  */
    26 package com.oracle.webservices.internal.api;
    28 import java.lang.annotation.Retention;
    29 import java.lang.annotation.RetentionPolicy;
    31 import javax.xml.ws.http.HTTPBinding;
    32 import javax.xml.ws.soap.SOAPBinding;
    33 import javax.xml.ws.spi.WebServiceFeatureAnnotation;
    35 /**
    36  * The EnvelopeStyle annotation is used to specify the message envelope style(s)
    37  * for a web service endpoint implementation class. To smooth the migration from
    38  * the BindingType annotation to this EnvelopeStyle annotation, each of the
    39  * styles is mapped to a binding identifier defined in JAX-WS specification.
    40  * Though a binding identifier includes both the envelope style and transport,
    41  * an envelope style defined herein does NOT imply or mandate any transport protocol
    42  * to be use together; HTTP is the default transport. An implementation may
    43  * chose to support other transport with any of the envelope styles.
    44  *
    45  * This annotation may be overriden programmatically or via deployment
    46  * descriptors, depending on the platform in use.
    47  *
    48  * @author shih-chang.chen@oracle.com
    49  */
    50 @WebServiceFeatureAnnotation(id="", bean=com.oracle.webservices.internal.api.EnvelopeStyleFeature.class)
    51 @Retention(RetentionPolicy.RUNTIME)
    52 public @interface EnvelopeStyle {
    54     /**
    55      * The envelope styles. If not specified, the default is the SOAP 1.1.
    56      *
    57      * @return The enveloping styles
    58      */
    59     Style[] style() default { Style.SOAP11 };
    61     public enum Style {
    63         /**
    64          * SOAP1.1. For JAX-WS, this is mapped from:
    65          * javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING
    66          */
    67         SOAP11(SOAPBinding.SOAP11HTTP_BINDING),
    69         /**
    70          * SOAP1.2. For JAX-WS, this is mapped from:
    71          * javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING
    72          */
    73         SOAP12(SOAPBinding.SOAP12HTTP_BINDING),
    75         /**
    76          * The raw XML. For JAX-WS, this is mapped from:
    77          * javax.xml.ws.http.HTTPBinding.HTTP_BINDING
    78          */
    79         XML(HTTPBinding.HTTP_BINDING);
    81         /**
    82          * The BindingID used by the BindingType annotation.
    83          */
    84         public final String bindingId;
    86         private Style(String id) {
    87             bindingId = id;
    88         }
    90         /**
    91          * Checks if the style is SOAP 1.1.
    92          *
    93          * @return true if the style is SOAP 1.1.
    94          */
    95         public boolean isSOAP11() { return this.equals(SOAP11); }
    97         /**
    98          * Checks if the style is SOAP 1.2.
    99          *
   100          * @return true if the style is SOAP 1.2.
   101          */
   102         public boolean isSOAP12() { return this.equals(SOAP12); }
   104         /**
   105          * Checks if the style is XML.
   106          *
   107          * @return true if the style is XML.
   108          */
   109         public boolean isXML() { return this.equals(XML); }
   110     }
   111 }

mercurial