001: /*
002: *
003: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
004: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License version
008: * 2 only, as published by the Free Software Foundation.
009: *
010: * This program is distributed in the hope that it will be useful, but
011: * WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * General Public License version 2 for more details (a copy is
014: * included at /legal/license.txt).
015: *
016: * You should have received a copy of the GNU General Public License
017: * version 2 along with this work; if not, write to the Free Software
018: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
019: * 02110-1301 USA
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
022: * Clara, CA 95054 or visit www.sun.com if you need additional
023: * information or have any questions.
024: */
025:
026: package javax.microedition.xml.rpc;
027:
028: import javax.xml.namespace.QName;
029: import javax.xml.rpc.JAXRPCException;
030: import java.util.Hashtable;
031:
032: /**
033: * The <code>javax.microedition.xml.rpc.Operation</code>
034: * class corresponds to a wsdl:operation defined for a
035: * target service endpoint.
036: *
037: * @version 0.1
038: */
039: public class Operation {
040:
041: protected Operation() {
042: };
043:
044: /**
045: * Standard property for SOAPAction. Indicates the SOAPAction
046: * URI if the <code>javax.xml.rpc.soap.http.soapaction.use</code>
047: * property is set to <code>true</code>.
048: * <p>Type: <code>java.lang.String</code>
049: **/
050: public static final String SOAPACTION_URI_PROPERTY = "javax.xml.rpc.soap.http.soapaction.uri";
051:
052: /**
053: * Creates an <code>Operation</code> corresponding to the
054: * operation that is being performed.
055: *
056: * @param input the Element describing the input parameter to
057: * this operation.
058: * @param output the Element describing the return result to this
059: * operation. NULL indicates there is no return
060: * value.
061: * @return a new <code>Operation</code> with the given input
062: * and output Type characteristics
063: */
064: public static Operation newInstance(QName name, Element input,
065: Element output) {
066: return new com.sun.j2mews.xml.rpc.OperationImpl(name, input,
067: output);
068: }
069:
070: /**
071: * Creates an <code>Operation</code> corresponding to the
072: * operation that is being performed. The <code>faultDetailHandler</code>
073: * parameter is passed to the runtime and used to map custom SOAP faults.
074: *
075: * @param input the Element describing the input parameter to
076: * this operation.
077: * @param output the Element describing the return result to this
078: * operation. NULL indicates there is no return
079: * value.
080: * @param faultDetailHandler the FaultDetailHandler to be called
081: * to handle custom faults thrown by this <code>
082: Operation</code>.
083: * @return a new <code>Operation</code> with the given input
084: * and output Type characteristics
085: */
086: public static Operation newInstance(QName name, Element input,
087: Element output, FaultDetailHandler faultDetailHandler) {
088: return new com.sun.j2mews.xml.rpc.OperationImpl(name, input,
089: output, faultDetailHandler);
090: }
091:
092: /**
093: * Sets the property <code>name</code> to the value,
094: * <code>value</code>.
095: *
096: * @param name the name of the property to be set
097: * @param value the value the property is to be set
098: *
099: * @throws IllegalArgumentException
100: * <UL>
101: * <LI>if an error occurs setting the property
102: * </UL>
103: */
104: public void setProperty(String name, String value)
105: throws IllegalArgumentException {
106: }
107:
108: /**
109: * Invokes the wsdl:operation defined by this
110: * <code>Operation</code> and returns the result.
111: *
112: * @param inParams an <code>Object</code> representing the input
113: * parameter value(s) to this operation
114: *
115: * @return a <code>Object</code> representing the output
116: * value(s) for this operation. Can be <code>null</code>
117: * if this operation returns no value.
118: *
119: * @throws JAXRPCException
120: * <UL>
121: * <LI>if an error occurs while excuting the operation.
122: * </UL>
123: * @see javax.microedition.xml.rpc.Operation
124: */
125: public Object invoke(Object inParams) throws JAXRPCException {
126: return null;
127: }
128:
129: }
|