325N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. Oracle designates this 325N/A * particular file as subject to the "Classpath" exception as provided 325N/A * by Oracle in the LICENSE file that accompanied this code. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A * or visit www.oracle.com if you need additional information or have any 325N/A * This class mainly performs the following two tasks: 325N/A * <li>Takes a {@link Message] that represents a request, 325N/A * and extracts the arguments (and updates {@link Holder}s.) 325N/A * <li>Accepts return value and {@link Holder} arguments for a Java method, 325N/A * and creates {@link JAXBMessage} that represents a response message. 325N/A * <h2>Creating {@link JAXBMessage}</h2> 325N/A * At the construction time, we prepare {@link EndpointArgumentsBuilder} that knows how to create endpoint {@link Method} 325N/A * invocation arguments. 325N/A * we also prepare {@link EndpointResponseMessageBuilder} and {@link MessageFiller}s 325N/A * that know how to move arguments into a {@link Message}. 325N/A * Some arguments go to the payload, some go to headers, still others go to attachments. 325N/A * @author Jitendra Kotamraju 325N/A // Converts {@link Message} --> Object[] 325N/A // these objects together create a response message from method parameters 325N/A * It builds EndpointArgumentsBuilder which converts request {@link Message} to endpoint method's invocation 325N/A * @return EndpointArgumentsBuilder 325N/A // creates {@link Holder} arguments for OUT parameters 325N/A * prepare objects for creating response {@link Message} 325N/A // no parameter binds to body. we create an empty message 325N/A // Some transports(like HTTP) may want to send response before envoking endpoint method 325N/A // Doing this here so that after closing the response stream, cannot read 325N/A // request from some transports(light weight http server) 325N/A // Service specific exception 325N/A // Application code may be throwing it intentionally 325N/A // Probably some bug in application code 325N/A * Creates a response {@link JAXBMessage} from method arguments, return value 325N/A * @return response message