Thu, 31 Aug 2017 15:18:52 +0800
merge
1 /*
2 * Copyright (c) 1997, 2013, 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 */
26 package com.sun.xml.internal.ws.api.model.wsdl;
28 import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtensible;
29 import com.sun.istack.internal.NotNull;
30 import com.sun.istack.internal.Nullable;
32 import javax.xml.namespace.QName;
34 /**
35 * Provides abstraction of wsdl:portType/wsdl:operation.
36 *
37 * @author Vivek Pandey
38 */
39 public interface WSDLOperation extends WSDLObject, WSDLExtensible {
40 /**
41 * Gets the name of the wsdl:portType/wsdl:operation@name attribute value as local name and wsdl:definitions@targetNamespace
42 * as the namespace uri.
43 */
44 @NotNull QName getName();
46 /**
47 * Gets the wsdl:input of this operation
48 */
49 @NotNull WSDLInput getInput();
51 /**
52 * Gets the wsdl:output of this operation.
53 *
54 * @return
55 * null if this is an one-way operation.
56 */
57 @Nullable WSDLOutput getOutput();
59 /**
60 * Returns true if this operation is an one-way operation.
61 */
62 boolean isOneWay();
64 /**
65 * Gets the {@link WSDLFault} corresponding to wsdl:fault of this operation.
66 */
67 Iterable<? extends WSDLFault> getFaults();
69 /**
70 * Gives {@link WSDLFault} for the given soap fault detail value.
71 *
72 * <pre>
73 *
74 * Given a wsdl fault:
75 *
76 * <wsdl:message nae="faultMessage">
77 * <wsdl:part name="fault" element="<b>ns:myException</b>/>
78 * </wsdl:message>
79 *
80 * <wsdl:portType>
81 * <wsdl:operation ...>
82 * <wsdl:fault name="aFault" message="faultMessage"/>
83 * </wsdl:operation>
84 * <wsdl:portType>
85 *
86 *
87 * For example given a soap 11 soap message:
88 *
89 * <soapenv:Fault>
90 * ...
91 * <soapenv:detail>
92 * <<b>ns:myException</b>>
93 * ...
94 * </ns:myException>
95 * </soapenv:detail>
96 *
97 * QName faultQName = new QName(ns, "myException");
98 * WSDLFault wsdlFault = getFault(faultQName);
99 *
100 * The above call will return a WSDLFault that abstracts wsdl:portType/wsdl:operation/wsdl:fault.
101 *
102 * </pre>
103 *
104 * @param faultDetailName tag name of the element inside soaenv:Fault/detail/, must be non-null.
105 * @return returns null if a wsdl fault corresponding to the detail entry name not found.
106 */
107 @Nullable WSDLFault getFault(QName faultDetailName);
109 /**
110 * Gives the enclosing wsdl:portType@name attribute value.
111 */
112 @NotNull QName getPortTypeName();
114 /**
115 * Returns parameter order
116 * @return Parameter order
117 */
118 public String getParameterOrder();
119 }