aoqi@0: /* aoqi@0: * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. Oracle designates this aoqi@0: * particular file as subject to the "Classpath" exception as provided aoqi@0: * by Oracle in the LICENSE file that accompanied this code. aoqi@0: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). aoqi@0: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: */ aoqi@0: aoqi@0: package com.sun.xml.internal.ws.api.databinding; aoqi@0: aoqi@0: import java.lang.reflect.Method; aoqi@0: aoqi@0: /** aoqi@0: * On the client or service-requestor side, a JavaCallInfo object represents a aoqi@0: * method call on the service proxy to be serialized as a SOAP request message aoqi@0: * to be sent to the service. A SOAP response message returned to the service aoqi@0: * client is deserialized as an update to the JavaCallInfo object which is used aoqi@0: * to generated the request. aoqi@0: *

aoqi@0: *

aoqi@0: * On the server or service provider side, a SOAP request message is aoqi@0: * deserialized to a JavaCallInfo object which can be used to determine which aoqi@0: * method to call, and get the parameter values to call the back-end service aoqi@0: * implementation object. The return value or exception returned from the aoqi@0: * service implementation should be set to the JavaCallInfo object which then aoqi@0: * can be used to serialize to a A SOAP response or fault message to be sent aoqi@0: * back to the service client. aoqi@0: * aoqi@0: * @author shih-chang.chen@oracle.com aoqi@0: */ aoqi@0: public class JavaCallInfo implements com.oracle.webservices.internal.api.databinding.JavaCallInfo { aoqi@0: aoqi@0: private Method method; aoqi@0: private Object[] parameters; aoqi@0: private Object returnValue; aoqi@0: private Throwable exception; aoqi@0: aoqi@0: public JavaCallInfo() { aoqi@0: } aoqi@0: aoqi@0: public JavaCallInfo(Method m, Object[] args) { aoqi@0: method = m; aoqi@0: parameters = args; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Gets the method of this JavaCallInfo aoqi@0: * aoqi@0: * @return the method aoqi@0: */ aoqi@0: public Method getMethod() { aoqi@0: return method; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Sets the method of this JavaCallInfo aoqi@0: * aoqi@0: * @param method aoqi@0: * the method to set aoqi@0: */ aoqi@0: public void setMethod(Method method) { aoqi@0: this.method = method; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Gets the parameters of this JavaCallInfo aoqi@0: * aoqi@0: * @return the parameters aoqi@0: */ aoqi@0: public Object[] getParameters() { aoqi@0: return parameters; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Sets the parameters of this JavaCallInfo aoqi@0: * aoqi@0: * @param parameters aoqi@0: * the parameters to set aoqi@0: */ aoqi@0: public void setParameters(Object[] parameters) { aoqi@0: this.parameters = parameters; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Gets the returnValue of this JavaCallInfo aoqi@0: * aoqi@0: * @return the returnValue aoqi@0: */ aoqi@0: public Object getReturnValue() { aoqi@0: return returnValue; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Sets the returnValue of this JavaCallInfo aoqi@0: * aoqi@0: * @param returnValue aoqi@0: * the returnValue to set aoqi@0: */ aoqi@0: public void setReturnValue(Object returnValue) { aoqi@0: this.returnValue = returnValue; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Gets the exception of this JavaCallInfo aoqi@0: * aoqi@0: * @return the exception aoqi@0: */ aoqi@0: public Throwable getException() { aoqi@0: return exception; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Sets the exception of this JavaCallInfo aoqi@0: * aoqi@0: * @param exception aoqi@0: * the exception to set aoqi@0: */ aoqi@0: public void setException(Throwable exception) { aoqi@0: this.exception = exception; aoqi@0: } aoqi@0: }