001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common Development
008: * and Distribution License("CDDL") (collectively, the "License"). You
009: * may not use this file except in compliance with the License. You can obtain
010: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
012: * language governing permissions and limitations under the License.
013: *
014: * When distributing the software, include this License Header Notice in each
015: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016: * Sun designates this particular file as subject to the "Classpath" exception
017: * as provided by Sun in the GPL Version 2 section of the License file that
018: * accompanied this code. If applicable, add the following below the License
019: * Header, with the fields enclosed by brackets [] replaced by your own
020: * identifying information: "Portions Copyrighted [year]
021: * [name of copyright owner]"
022: *
023: * Contributor(s):
024: *
025: * If you wish your version of this file to be governed by only the CDDL or
026: * only the GPL Version 2, indicate your decision by adding "[Contributor]
027: * elects to include this software in this distribution under the [CDDL or GPL
028: * Version 2] license." If you don't indicate a single choice of license, a
029: * recipient has the option to distribute your version of this file under
030: * either the CDDL, the GPL Version 2 or to extend the choice of license to
031: * its licensees as provided above. However, if you add GPL Version 2 code
032: * and therefore, elected the GPL Version 2 license, then the option applies
033: * only if the new code is made subject to such option by the copyright
034: * holder.
035: */
036:
037: package com.sun.xml.ws.api.model.wsdl;
038:
039: import com.sun.istack.NotNull;
040: import com.sun.istack.Nullable;
041:
042: import javax.jws.WebParam.Mode;
043: import javax.xml.namespace.QName;
044: import java.util.Map;
045:
046: /**
047: * Abstracts wsdl:binding/wsdl:operation. It can be used to determine the parts and their binding.
048: *
049: * @author Vivek Pandey
050: */
051: public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible {
052: /**
053: * Short-cut for {@code getOperation().getName()}
054: */
055: @NotNull
056: QName getName();
057:
058: /**
059: * Gives soapbinding:operation@soapAction value. soapbinding:operation@soapAction is optional attribute.
060: * If not present an empty String is returned as per BP 1.1 R2745.
061: */
062: @NotNull
063: String getSOAPAction();
064:
065: /**
066: * Gets the wsdl:portType/wsdl:operation model - {@link WSDLOperation},
067: * associated with this binding operation.
068: *
069: * @return always same {@link WSDLOperation}
070: */
071: @NotNull
072: WSDLOperation getOperation();
073:
074: /**
075: * Gets the soapbinding:binding/operation/wsaw:Anonymous. A default value of OPTIONAL is returned.
076: *
077: * @return Anonymous value of the operation
078: */
079: ANONYMOUS getAnonymous();
080:
081: enum ANONYMOUS {
082: optional, required, prohibited
083: }
084:
085: /**
086: * Gets {@link WSDLPart} for the given wsdl:input or wsdl:output part
087: *
088: * @return null if no part is found
089: */
090: @Nullable
091: WSDLPart getPart(@NotNull
092: String partName, @NotNull
093: Mode mode);
094:
095: /**
096: * Gets all inbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
097: */
098: @NotNull
099: Map<String, WSDLPart> getInParts();
100:
101: /**
102: * Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
103: */
104: @NotNull
105: Map<String, WSDLPart> getOutParts();
106:
107: /**
108: * Gets all the {@link WSDLFault} bound to this operation.
109: */
110: @NotNull
111: Iterable<? extends WSDLBoundFault> getFaults();
112:
113: /**
114: * Gets the payload QName of the request message.
115: *
116: * <p>
117: * It's possible for an operation to define no body part, in which case
118: * this method returns null.
119: */
120: @Nullable
121: QName getReqPayloadName();
122:
123: }
|