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;
038:
039: import com.sun.istack.NotNull;
040: import com.sun.istack.Nullable;
041: import com.sun.xml.ws.api.model.soap.SOAPBinding;
042:
043: import javax.xml.namespace.QName;
044: import java.lang.reflect.Method;
045:
046: /**
047: * Abstracts the annotated {@link Method} of a SEI.
048: *
049: * @author Vivek Pandey
050: */
051: public interface JavaMethod {
052:
053: /**
054: * Gets the root {@link SEIModel} that owns this model.
055: */
056: SEIModel getOwner();
057:
058: /**
059: * On the server side, it uses this for invocation of the web service
060: *
061: * <p>
062: * {@link @WebService}(endpointInterface="I")
063: * class A { }
064: *
065: * In this case, it retuns A's method
066: *
067: * <p>
068: * {@link @WebService}(endpointInterface="I")
069: * class A implements I { }
070: * In this case, it returns A's method
071: *
072: * <p>
073: * {@link @WebService}
074: * class A { }
075: * In this case, it returns A's method
076: *
077: * @return Returns the java {@link Method}
078: */
079: @NotNull
080: Method getMethod();
081:
082: /**
083: * This should be used if you want to access annotations on WebMethod
084: * Returns the SEI method if there is one.
085: *
086: * <p>
087: * {@link @WebService}(endpointInterface="I")
088: * class A { }
089: * In this case, it retuns I's method
090: *
091: * <p>
092: * {@link @WebService}(endpointInterface="I")
093: * class A implements I { }
094: * In this case, it returns I's method
095: *
096: * <p>
097: * {@link @WebService}
098: * class A { }
099: * In this case, it returns A's method
100: *
101: * @return Returns the java {@link Method}
102: */
103: @NotNull
104: Method getSEIMethod();
105:
106: /**
107: * @return Returns the {@link MEP}.
108: */
109: MEP getMEP();
110:
111: /**
112: * Binding object - a {@link SOAPBinding} isntance.
113: *
114: * @return the Binding object
115: */
116: SOAPBinding getBinding();
117:
118: /**
119: * Gives the wsdl:operation@name value
120: */
121: @NotNull
122: String getOperationName();
123:
124: /**
125: * Gives the request wsdl:message@name value
126: */
127: @NotNull
128: String getRequestMessageName();
129:
130: /**
131: * Gives the response wsdl:messageName value
132: * @return null if its a oneway operation that is getMEP().isOneWay()==true.
133: * @see com.sun.xml.ws.api.model.MEP#isOneWay()
134: */
135: @Nullable
136: String getResponseMessageName();
137:
138: /**
139: * Gives soap:Body's first child's name for request message.
140: *
141: * @return
142: * null if this operation doesn't have any request parameter bound to the body.
143: */
144: @Nullable
145: QName getRequestPayloadName();
146:
147: /**
148: * Gives soap:Body's first child's name for response message.
149: *
150: * @return
151: * null if this operation doesn't have any response parameter bound to the body.
152: */
153: @Nullable
154: QName getResponsePayloadName();
155:
156: }
|