Tue, 06 Mar 2012 16:09:35 -0800
7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom
ohair@286 | 1 | /* |
ohair@286 | 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
ohair@286 | 3 | * |
ohair@286 | 4 | * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. |
ohair@286 | 5 | * |
ohair@286 | 6 | * The contents of this file are subject to the terms of either the GNU |
ohair@286 | 7 | * General Public License Version 2 only ("GPL") or the Common Development |
ohair@286 | 8 | * and Distribution License("CDDL") (collectively, the "License"). You |
ohair@286 | 9 | * may not use this file except in compliance with the License. You can |
ohair@286 | 10 | * obtain a copy of the License at |
ohair@286 | 11 | * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html |
ohair@286 | 12 | * or packager/legal/LICENSE.txt. See the License for the specific |
ohair@286 | 13 | * language governing permissions and limitations under the License. |
ohair@286 | 14 | * |
ohair@286 | 15 | * When distributing the software, include this License Header Notice in each |
ohair@286 | 16 | * file and include the License file at packager/legal/LICENSE.txt. |
ohair@286 | 17 | * |
ohair@286 | 18 | * GPL Classpath Exception: |
ohair@286 | 19 | * Oracle designates this particular file as subject to the "Classpath" |
ohair@286 | 20 | * exception as provided by Oracle in the GPL Version 2 section of the License |
ohair@286 | 21 | * file that accompanied this code. |
ohair@286 | 22 | * |
ohair@286 | 23 | * Modifications: |
ohair@286 | 24 | * If applicable, add the following below the License Header, with the fields |
ohair@286 | 25 | * enclosed by brackets [] replaced by your own identifying information: |
ohair@286 | 26 | * "Portions Copyright [year] [name of copyright owner]" |
ohair@286 | 27 | * |
ohair@286 | 28 | * Contributor(s): |
ohair@286 | 29 | * If you wish your version of this file to be governed by only the CDDL or |
ohair@286 | 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] |
ohair@286 | 31 | * elects to include this software in this distribution under the [CDDL or GPL |
ohair@286 | 32 | * Version 2] license." If you don't indicate a single choice of license, a |
ohair@286 | 33 | * recipient has the option to distribute your version of this file under |
ohair@286 | 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to |
ohair@286 | 35 | * its licensees as provided above. However, if you add GPL Version 2 code |
ohair@286 | 36 | * and therefore, elected the GPL Version 2 license, then the option applies |
ohair@286 | 37 | * only if the new code is made subject to such option by the copyright |
ohair@286 | 38 | * holder. |
ohair@286 | 39 | */ |
ohair@286 | 40 | |
ohair@286 | 41 | package com.sun.xml.internal.org.jvnet.ws; |
ohair@286 | 42 | |
ohair@286 | 43 | import java.lang.annotation.Retention; |
ohair@286 | 44 | import java.lang.annotation.RetentionPolicy; |
ohair@286 | 45 | |
ohair@286 | 46 | import javax.xml.ws.http.HTTPBinding; |
ohair@286 | 47 | import javax.xml.ws.soap.SOAPBinding; |
ohair@286 | 48 | import javax.xml.ws.spi.WebServiceFeatureAnnotation; |
ohair@286 | 49 | |
ohair@286 | 50 | /** |
ohair@286 | 51 | * The EnvelopeStyle annotation is used to specify the message envelope style(s) |
ohair@286 | 52 | * for a web service endpoint implementation class. To smooth the migration from |
ohair@286 | 53 | * the BindingType annotation to this EnvelopeStyle annotation, each of the |
ohair@286 | 54 | * styles is mapped to a binding identifier defined in JAX-WS specification. |
ohair@286 | 55 | * Though a binding identifier includes both the envelope style and transport, |
ohair@286 | 56 | * an envelope style defined herein does NOT imply or mandate any transport protocol |
ohair@286 | 57 | * to be use together; HTTP is the default transport. An implementation may |
ohair@286 | 58 | * chose to support other transport with any of the envelope styles. |
ohair@286 | 59 | * |
ohair@286 | 60 | * This annotation may be overriden programmatically or via deployment |
ohair@286 | 61 | * descriptors, depending on the platform in use. |
ohair@286 | 62 | * |
ohair@286 | 63 | * @author shih-chang.chen@oracle.com |
ohair@286 | 64 | */ |
ohair@286 | 65 | @WebServiceFeatureAnnotation(id="", bean=com.sun.xml.internal.org.jvnet.ws.EnvelopeStyleFeature.class) |
ohair@286 | 66 | @Retention(RetentionPolicy.RUNTIME) |
ohair@286 | 67 | public @interface EnvelopeStyle { |
ohair@286 | 68 | |
ohair@286 | 69 | /** |
ohair@286 | 70 | * The envelope styles. If not specified, the default is the SOAP 1.1. |
ohair@286 | 71 | * |
ohair@286 | 72 | * @return The enveloping styles |
ohair@286 | 73 | */ |
ohair@286 | 74 | Style[] style() default { Style.SOAP11 }; |
ohair@286 | 75 | |
ohair@286 | 76 | public enum Style { |
ohair@286 | 77 | |
ohair@286 | 78 | /** |
ohair@286 | 79 | * SOAP1.1. For JAX-WS, this is mapped from: |
ohair@286 | 80 | * javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING |
ohair@286 | 81 | */ |
ohair@286 | 82 | SOAP11(SOAPBinding.SOAP11HTTP_BINDING), |
ohair@286 | 83 | |
ohair@286 | 84 | /** |
ohair@286 | 85 | * SOAP1.2. For JAX-WS, this is mapped from: |
ohair@286 | 86 | * javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING |
ohair@286 | 87 | */ |
ohair@286 | 88 | SOAP12(SOAPBinding.SOAP11HTTP_BINDING), |
ohair@286 | 89 | |
ohair@286 | 90 | /** |
ohair@286 | 91 | * The raw XML. For JAX-WS, this is mapped from: |
ohair@286 | 92 | * javax.xml.ws.http.HTTPBinding.HTTP_BINDING |
ohair@286 | 93 | */ |
ohair@286 | 94 | XML(HTTPBinding.HTTP_BINDING); |
ohair@286 | 95 | |
ohair@286 | 96 | /** |
ohair@286 | 97 | * The BindingID used by the BindingType annotation. |
ohair@286 | 98 | */ |
ohair@286 | 99 | public final String bindingId; |
ohair@286 | 100 | |
ohair@286 | 101 | private Style(String id) { |
ohair@286 | 102 | bindingId = id; |
ohair@286 | 103 | } |
ohair@286 | 104 | |
ohair@286 | 105 | /** |
ohair@286 | 106 | * Checks if the style is SOAP 1.1. |
ohair@286 | 107 | * |
ohair@286 | 108 | * @return true if the style is SOAP 1.1. |
ohair@286 | 109 | */ |
ohair@286 | 110 | public boolean isSOAP11() { return this.equals(SOAP11); } |
ohair@286 | 111 | |
ohair@286 | 112 | /** |
ohair@286 | 113 | * Checks if the style is SOAP 1.2. |
ohair@286 | 114 | * |
ohair@286 | 115 | * @return true if the style is SOAP 1.2. |
ohair@286 | 116 | */ |
ohair@286 | 117 | public boolean isSOAP12() { return this.equals(SOAP12); } |
ohair@286 | 118 | |
ohair@286 | 119 | /** |
ohair@286 | 120 | * Checks if the style is XML. |
ohair@286 | 121 | * |
ohair@286 | 122 | * @return true if the style is XML. |
ohair@286 | 123 | */ |
ohair@286 | 124 | public boolean isXML() { return this.equals(XML); } |
ohair@286 | 125 | } |
ohair@286 | 126 | } |