src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/EnvelopeStyle.java

Thu, 08 Mar 2012 18:20:15 -0800

author
ohair
date
Thu, 08 Mar 2012 18:20:15 -0800
changeset 292
c46e0b6e3f98
parent 286
f50545b5e2f1
permissions
-rw-r--r--

7152425: Fix copyright notices on 12 files in jaxws
Reviewed-by: mbykov

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

mercurial