1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java Wed Apr 27 01:27:09 2016 +0800 1.3 @@ -0,0 +1,195 @@ 1.4 +/* 1.5 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 + 1.29 +package com.sun.xml.internal.ws.api.model.wsdl; 1.30 + 1.31 +import com.sun.istack.internal.NotNull; 1.32 +import com.sun.istack.internal.Nullable; 1.33 +import com.sun.xml.internal.ws.api.model.ParameterBinding; 1.34 + 1.35 +import javax.jws.WebParam.Mode; 1.36 +import javax.xml.namespace.QName; 1.37 + 1.38 +import java.util.Map; 1.39 + 1.40 +/** 1.41 + * Abstracts wsdl:binding/wsdl:operation. It can be used to determine the parts and their binding. 1.42 + * 1.43 + * @author Vivek Pandey 1.44 + */ 1.45 +public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible { 1.46 + /** 1.47 + * Short-cut for {@code getOperation().getName()} 1.48 + */ 1.49 + @NotNull QName getName(); 1.50 + 1.51 + /** 1.52 + * Gives soapbinding:operation@soapAction value. soapbinding:operation@soapAction is optional attribute. 1.53 + * If not present an empty String is returned as per BP 1.1 R2745. 1.54 + */ 1.55 + @NotNull String getSOAPAction(); 1.56 + 1.57 + /** 1.58 + * Gets the wsdl:portType/wsdl:operation model - {@link WSDLOperation}, 1.59 + * associated with this binding operation. 1.60 + * 1.61 + * @return always same {@link WSDLOperation} 1.62 + */ 1.63 + @NotNull WSDLOperation getOperation(); 1.64 + 1.65 + /** 1.66 + * Gives the owner {@link WSDLBoundPortType} 1.67 + */ 1.68 + @NotNull WSDLBoundPortType getBoundPortType(); 1.69 + 1.70 + /** 1.71 + * Gets the soapbinding:binding/operation/wsaw:Anonymous. A default value of OPTIONAL is returned. 1.72 + * 1.73 + * @return Anonymous value of the operation 1.74 + */ 1.75 + ANONYMOUS getAnonymous(); 1.76 + 1.77 + enum ANONYMOUS { optional, required, prohibited } 1.78 + 1.79 + /** 1.80 + * Gets {@link WSDLPart} for the given wsdl:input or wsdl:output part 1.81 + * 1.82 + * @return null if no part is found 1.83 + */ 1.84 + @Nullable WSDLPart getPart(@NotNull String partName, @NotNull Mode mode); 1.85 + 1.86 + /** 1.87 + * Gets {@link ParameterBinding} for a given wsdl part in wsdl:input 1.88 + * 1.89 + * @param part Name of wsdl:part, must be non-null 1.90 + * @return null if the part is not found. 1.91 + */ 1.92 + public ParameterBinding getInputBinding(String part); 1.93 + 1.94 + /** 1.95 + * Gets {@link ParameterBinding} for a given wsdl part in wsdl:output 1.96 + * 1.97 + * @param part Name of wsdl:part, must be non-null 1.98 + * @return null if the part is not found. 1.99 + */ 1.100 + public ParameterBinding getOutputBinding(String part); 1.101 + 1.102 + /** 1.103 + * Gets {@link ParameterBinding} for a given wsdl part in wsdl:fault 1.104 + * 1.105 + * @param part Name of wsdl:part, must be non-null 1.106 + * @return null if the part is not found. 1.107 + */ 1.108 + public ParameterBinding getFaultBinding(String part); 1.109 + 1.110 + /** 1.111 + * Gets the MIME type for a given wsdl part in wsdl:input 1.112 + * 1.113 + * @param part Name of wsdl:part, must be non-null 1.114 + * @return null if the part is not found. 1.115 + */ 1.116 + public String getMimeTypeForInputPart(String part); 1.117 + 1.118 + /** 1.119 + * Gets the MIME type for a given wsdl part in wsdl:output 1.120 + * 1.121 + * @param part Name of wsdl:part, must be non-null 1.122 + * @return null if the part is not found. 1.123 + */ 1.124 + public String getMimeTypeForOutputPart(String part); 1.125 + 1.126 + /** 1.127 + * Gets the MIME type for a given wsdl part in wsdl:fault 1.128 + * 1.129 + * @param part Name of wsdl:part, must be non-null 1.130 + * @return null if the part is not found. 1.131 + */ 1.132 + public String getMimeTypeForFaultPart(String part); 1.133 + 1.134 + /** 1.135 + * Gets all inbound {@link WSDLPart} by its {@link WSDLPart#getName() name}. 1.136 + */ 1.137 + @NotNull Map<String,? extends WSDLPart> getInParts(); 1.138 + 1.139 + /** 1.140 + * Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}. 1.141 + */ 1.142 + @NotNull Map<String,? extends WSDLPart> getOutParts(); 1.143 + 1.144 + /** 1.145 + * Gets all the {@link WSDLFault} bound to this operation. 1.146 + */ 1.147 + @NotNull Iterable<? extends WSDLBoundFault> getFaults(); 1.148 + 1.149 + /** 1.150 + * Map of wsdl:input part name and the binding as {@link ParameterBinding} 1.151 + * 1.152 + * @return empty Map if there is no parts 1.153 + */ 1.154 + public Map<String, ParameterBinding> getInputParts(); 1.155 + 1.156 + /** 1.157 + * Map of wsdl:output part name and the binding as {@link ParameterBinding} 1.158 + * 1.159 + * @return empty Map if there is no parts 1.160 + */ 1.161 + public Map<String, ParameterBinding> getOutputParts(); 1.162 + 1.163 + /** 1.164 + * Map of wsdl:fault part name and the binding as {@link ParameterBinding} 1.165 + * 1.166 + * @return empty Map if there is no parts 1.167 + */ 1.168 + public Map<String, ParameterBinding> getFaultParts(); 1.169 + 1.170 + /** 1.171 + * Gets the payload QName of the request message. 1.172 + * 1.173 + * <p> 1.174 + * It's possible for an operation to define no body part, in which case 1.175 + * this method returns null. 1.176 + */ 1.177 + @Nullable QName getRequestPayloadName(); 1.178 + 1.179 + /** 1.180 + * Gets the payload QName of the response message. 1.181 + * 1.182 + * <p> 1.183 + * It's possible for an operation to define no body part, in which case 1.184 + * this method returns null. 1.185 + */ 1.186 + @Nullable QName getResponsePayloadName(); 1.187 + 1.188 + /** 1.189 + * Gets the namespace of request payload. 1.190 + */ 1.191 + String getRequestNamespace(); 1.192 + 1.193 + /** 1.194 + * Gets the namespace of response payload. 1.195 + */ 1.196 + String getResponseNamespace(); 1.197 + 1.198 +}