1 /* 2 * Copyright (c) 1997, 2012, 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 */ 25 26 package com.sun.xml.internal.ws.api.model.wsdl; 27 28 import com.sun.istack.internal.NotNull; 29 import com.sun.istack.internal.Nullable; 30 31 import javax.jws.WebParam.Mode; 32 import javax.xml.namespace.QName; 33 import java.util.Map; 34 35 /** 36 * Abstracts wsdl:binding/wsdl:operation. It can be used to determine the parts and their binding. 37 * 38 * @author Vivek Pandey 39 */ 40 public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible { 41 /** 42 * Short-cut for {@code getOperation().getName()} 43 */ 44 @NotNull QName getName(); 45 46 /** 47 * Gives soapbinding:operation@soapAction value. soapbinding:operation@soapAction is optional attribute. 48 * If not present an empty String is returned as per BP 1.1 R2745. 49 */ 50 @NotNull String getSOAPAction(); 51 52 /** 53 * Gets the wsdl:portType/wsdl:operation model - {@link WSDLOperation}, 54 * associated with this binding operation. 55 * 56 * @return always same {@link WSDLOperation} 57 */ 58 @NotNull WSDLOperation getOperation(); 59 60 /** 61 * Gives the owner {@link WSDLBoundPortType} 62 */ 63 @NotNull WSDLBoundPortType getBoundPortType(); 64 65 /** 66 * Gets the soapbinding:binding/operation/wsaw:Anonymous. A default value of OPTIONAL is returned. 67 * 68 * @return Anonymous value of the operation 69 */ 70 ANONYMOUS getAnonymous(); 71 72 enum ANONYMOUS { optional, required, prohibited } 73 74 /** 75 * Gets {@link WSDLPart} for the given wsdl:input or wsdl:output part 76 * 77 * @return null if no part is found 78 */ 79 @Nullable WSDLPart getPart(@NotNull String partName, @NotNull Mode mode); 80 81 /** 82 * Gets all inbound {@link WSDLPart} by its {@link WSDLPart#getName() name}. 83 */ 84 @NotNull Map<String,WSDLPart> getInParts(); 85 86 /** 87 * Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}. 88 */ 89 @NotNull Map<String,WSDLPart> getOutParts(); 90 91 /** 92 * Gets all the {@link WSDLFault} bound to this operation. 93 */ 94 @NotNull Iterable<? extends WSDLBoundFault> getFaults(); 95 96 /** 97 * Gets the payload QName of the request message. 98 * 99 * <p> 100 * It's possible for an operation to define no body part, in which case 101 * this method returns null. 102 */ 103 @Nullable QName getReqPayloadName(); 104 105 /** 106 * Gets the payload QName of the response message. 107 * 108 * <p> 109 * It's possible for an operation to define no body part, in which case 110 * this method returns null. 111 */ 112 @Nullable QName getResPayloadName(); 113 114 /** 115 * Gets the namespace of request payload. 116 */ 117 String getRequestNamespace(); 118 119 /** 120 * Gets the namespace of response payload. 121 */ 122 String getResponseNamespace(); 123 124 }