001: /*
002: * Copyright (c) 1998-2004 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Scott Ferguson
028: */
029:
030: package javax.xml.rpc;
031:
032: import javax.xml.namespace.QName;
033: import java.util.Iterator;
034: import java.util.List;
035: import java.util.Map;
036:
037: /**
038: * Represents the base interface for client calls.
039: */
040: public interface Call {
041: public static final String USERNAME_PROPERTY = "javax.xml.rpc.security.auth.username";
042: public static final String PASSWORD_PROPERTY = "javax.xml.rpc.security.auth.password";
043: public static final String OPERATION_STYLE_PROPERTY = "javax.xml.rpc.soap.operation.style";
044: public static final String SOAPACTION_USE_PROPERTY = "javax.xml.rpc.soap.http.soapaction.use";
045: public static final String SOAPACTION_URI_PROPERTY = "javax.xml.rpc.soap.http.soapaction.uri";
046: public static final String ENCODINGSTYLE_URI_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
047: public static final String SESSION_MAINTAIN_PROPERTY = "javax.xml.rpc.session.maintain";
048:
049: /**
050: * Returns true if the parameter and return type should be invoked.
051: */
052: public boolean isParameterAndReturnSpecRequired(QName operationName);
053:
054: /**
055: * Adds a parameter type and mode for the operation.
056: */
057: public void addParameter(String paramName, QName xmlType,
058: ParameterMode parameterMode) throws JAXRPCException;
059:
060: /**
061: * Adds a parameter type and mode for the operation.
062: */
063: public void addParameter(String paramName, QName xmlType,
064: Class javaType, ParameterMode parameterMode)
065: throws JAXRPCException;
066:
067: /**
068: * Adds Returns the XML type of a parameter.
069: */
070: public QName getParameterTypeByName(String paramName);
071:
072: /**
073: * Sets the return type.
074: */
075: public void setReturnType(QName xmlType) throws JAXRPCException;
076:
077: /**
078: * Sets the return type.
079: */
080: public void setReturnType(QName xmlType, Class javaType)
081: throws JAXRPCException;
082:
083: /**
084: * Returns the return type.
085: */
086: public QName getReturnType();
087:
088: /**
089: * Removes the parameters.
090: */
091: public void removeAllParameters() throws JAXRPCException;
092:
093: /**
094: * Returns the operation name.
095: */
096: public QName getOperationName();
097:
098: /**
099: * Returns the port type.
100: */
101: public QName getPortTypeName();
102:
103: /**
104: * Sets the port type.
105: */
106: public void setPortTypeName(QName portType);
107:
108: /**
109: * Sets the target endpoing.
110: */
111: public void setTargetEndpointAddress(String address);
112:
113: /**
114: * Gets the target endpoing.
115: */
116: public String getTargetEndpointAddress();
117:
118: /**
119: * Sets a property.
120: */
121: public void setProperty(String name, Object value)
122: throws JAXRPCException;
123:
124: /**
125: * Gets a property.
126: */
127: public Object getProperty(String name) throws JAXRPCException;
128:
129: /**
130: * Removes a property.
131: */
132: public void removeProperty(String name) throws JAXRPCException;
133:
134: /**
135: * Iterates over the property names.
136: */
137: public Iterator getPropertyNames();
138:
139: /**
140: * Invokes the operation
141: */
142: public Object invoke(Object[] params)
143: throws java.rmi.RemoteException;
144:
145: /**
146: * Invokes the operation
147: */
148: public Object invoke(QName operationName, Object[] params)
149: throws java.rmi.RemoteException;
150:
151: /**
152: * Invokes the operation in one-way mode.
153: */
154: public void invokeOneWay(Object[] params);
155:
156: /**
157: * Returns the Map of the output parameters.
158: */
159: public Map getOutputParams();
160:
161: /**
162: * Returns a list of theoutput parameters.
163: */
164: public List getOutputValues();
165: }
|