Fri, 04 Oct 2013 16:21:34 +0100
8025054: Update JAX-WS RI integration to 2.2.9-b130926.1035
Reviewed-by: chegar
alanb@368 | 1 | /* |
katleman@374 | 2 | * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
katleman@374 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
alanb@368 | 4 | * |
katleman@374 | 5 | * This code is free software; you can redistribute it and/or modify it |
katleman@374 | 6 | * under the terms of the GNU General Public License version 2 only, as |
katleman@374 | 7 | * published by the Free Software Foundation. Oracle designates this |
katleman@374 | 8 | * particular file as subject to the "Classpath" exception as provided |
katleman@374 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
alanb@368 | 10 | * |
katleman@374 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
katleman@374 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
katleman@374 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
katleman@374 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
katleman@374 | 15 | * accompanied this code). |
alanb@368 | 16 | * |
katleman@374 | 17 | * You should have received a copy of the GNU General Public License version |
katleman@374 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
katleman@374 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
alanb@368 | 20 | * |
katleman@374 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
katleman@374 | 22 | * or visit www.oracle.com if you need additional information or have any |
katleman@374 | 23 | * questions. |
alanb@368 | 24 | */ |
alanb@368 | 25 | |
alanb@368 | 26 | package com.oracle.webservices.internal.api.databinding; |
alanb@368 | 27 | |
alanb@368 | 28 | import java.lang.reflect.Method; |
alanb@368 | 29 | import java.net.URL; |
alanb@368 | 30 | |
alanb@368 | 31 | import javax.xml.namespace.QName; |
alanb@368 | 32 | import javax.xml.transform.Source; |
alanb@368 | 33 | import javax.xml.ws.WebServiceFeature; |
alanb@368 | 34 | |
alanb@368 | 35 | import org.xml.sax.EntityResolver; |
alanb@368 | 36 | |
alanb@368 | 37 | import com.oracle.webservices.internal.api.message.MessageContext; |
alanb@368 | 38 | |
alanb@368 | 39 | /** |
alanb@368 | 40 | * {@code Databinding} is the entry point for all the WebService Databinding |
alanb@368 | 41 | * functionality. Primarily, a Databinding is to serialize/deserialize an |
alanb@368 | 42 | * XML(SOAP) message to/from a JAVA method invocation and return which are |
alanb@368 | 43 | * represented as <code>JavaCallInfo</code> instances. A WSDLGenerator can |
alanb@368 | 44 | * be created from a Databinding object to genreate WSDL representation of |
alanb@368 | 45 | * a JAVA service endpoint interface. |
alanb@368 | 46 | * <p> |
alanb@368 | 47 | * </p> |
alanb@368 | 48 | * The supported databinding modes(flavors) are: |
alanb@368 | 49 | * <ul> |
alanb@368 | 50 | * <li>"toplink.jaxb"</li> |
alanb@368 | 51 | * <li>"glassfish.jaxb"</li> |
alanb@368 | 52 | * </ul> |
alanb@368 | 53 | * <blockquote> Following is an example that creates a {@code Databinding} which |
alanb@368 | 54 | * provides the operations to serialize/deserialize a JavaCallInfo to/from a |
alanb@368 | 55 | * SOAP message:<br/> |
alanb@368 | 56 | * |
alanb@368 | 57 | * <pre> |
alanb@368 | 58 | * DatabindingFactory factory = DatabindingFactory.newInstance(); |
alanb@368 | 59 | * Databinding.Builder builder = factory.createBuilder(seiClass, endpointClass); |
alanb@368 | 60 | * Databinding databinding = builder.build(); |
alanb@368 | 61 | * </pre> |
alanb@368 | 62 | * |
alanb@368 | 63 | * </blockquote> |
alanb@368 | 64 | * |
alanb@368 | 65 | * @see com.oracle.webservices.internal.api.databinding.DatabindingFactory |
alanb@368 | 66 | * |
alanb@368 | 67 | * @author shih-chang.chen@oracle.com |
alanb@368 | 68 | */ |
alanb@368 | 69 | public interface Databinding { |
alanb@368 | 70 | |
alanb@368 | 71 | /** |
alanb@368 | 72 | * Creates a new instance of a <code>JavaCallInfo</code>. |
alanb@368 | 73 | * |
alanb@368 | 74 | * @param method The JAVA method |
alanb@368 | 75 | * @param args The parameter objects |
alanb@368 | 76 | * |
alanb@368 | 77 | * @return New instance of a <code>JavaCallInfo</code> |
alanb@368 | 78 | */ |
alanb@368 | 79 | JavaCallInfo createJavaCallInfo(Method method, Object[] args); |
alanb@368 | 80 | |
alanb@368 | 81 | /** |
alanb@368 | 82 | * Serializes a JavaCallInfo instance representing a JAVA method call to a |
alanb@368 | 83 | * request XML(SOAP) message. |
alanb@368 | 84 | * |
alanb@368 | 85 | * @param call The JavaCallInfo representing a method call |
alanb@368 | 86 | * |
alanb@368 | 87 | * @return The request XML(SOAP) message |
alanb@368 | 88 | */ |
alanb@368 | 89 | MessageContext serializeRequest(JavaCallInfo call); |
alanb@368 | 90 | |
alanb@368 | 91 | /** |
alanb@368 | 92 | * Deserializes a response XML(SOAP) message to a JavaCallInfo instance |
alanb@368 | 93 | * representing the return value or exception of a JAVA method call. |
alanb@368 | 94 | * |
alanb@368 | 95 | * @param message The response message |
alanb@368 | 96 | * @param call The JavaCallInfo instance to be updated |
alanb@368 | 97 | * |
alanb@368 | 98 | * @return The JavaCallInfo updated with the return value or exception of a |
alanb@368 | 99 | * JAVA method call |
alanb@368 | 100 | */ |
alanb@368 | 101 | JavaCallInfo deserializeResponse(MessageContext message, JavaCallInfo call); |
alanb@368 | 102 | |
alanb@368 | 103 | /** |
alanb@368 | 104 | * Deserializes a request XML(SOAP) message to a JavaCallInfo instance |
alanb@368 | 105 | * representing a JAVA method call. |
alanb@368 | 106 | * |
alanb@368 | 107 | * @param message The request message |
alanb@368 | 108 | * |
alanb@368 | 109 | * @return The JavaCallInfo representing a method call |
alanb@368 | 110 | */ |
alanb@368 | 111 | JavaCallInfo deserializeRequest(MessageContext message); |
alanb@368 | 112 | |
alanb@368 | 113 | /** |
alanb@368 | 114 | * Serializes a JavaCallInfo instance representing the return value or |
alanb@368 | 115 | * exception of a JAVA method call to a response XML(SOAP) message. |
alanb@368 | 116 | * |
alanb@368 | 117 | * @param call The JavaCallInfo representing the return value or exception |
alanb@368 | 118 | * of a JAVA method call |
alanb@368 | 119 | * |
alanb@368 | 120 | * @return The response XML(SOAP) message |
alanb@368 | 121 | */ |
alanb@368 | 122 | MessageContext serializeResponse(JavaCallInfo call); |
alanb@368 | 123 | |
alanb@368 | 124 | /** |
alanb@368 | 125 | * Gets the MessageContextFactory |
alanb@368 | 126 | * |
alanb@368 | 127 | * @return The MessageContextFactory |
alanb@368 | 128 | */ |
alanb@368 | 129 | //Wait for WLS/src1212 - wls.jaxrpc wrapper |
alanb@368 | 130 | // MessageContextFactory getMessageContextFactory(); |
alanb@368 | 131 | |
alanb@368 | 132 | /** |
alanb@368 | 133 | * {@code Databinding.Builder}, created from the DatabindingFactory, is used to |
alanb@368 | 134 | * configure how a Databinding instance is to be built from this builder. |
alanb@368 | 135 | * |
alanb@368 | 136 | * @see com.oracle.webservices.internal.api.databinding.DatabindingFactory |
alanb@368 | 137 | * @author shih-chang.chen@oracle.com |
alanb@368 | 138 | */ |
alanb@368 | 139 | public interface Builder { |
alanb@368 | 140 | |
alanb@368 | 141 | /** |
alanb@368 | 142 | * Sets the targetNamespace of the WSDL |
alanb@368 | 143 | * |
alanb@368 | 144 | * @param targetNamespace The targetNamespace to set |
alanb@368 | 145 | * |
alanb@368 | 146 | * @return this Builder instance |
alanb@368 | 147 | */ |
alanb@368 | 148 | Builder targetNamespace(String targetNamespace); |
alanb@368 | 149 | |
alanb@368 | 150 | /** |
alanb@368 | 151 | * Sets the service name of the WSDL |
alanb@368 | 152 | * |
alanb@368 | 153 | * @param serviceName The serviceName to set |
alanb@368 | 154 | * |
alanb@368 | 155 | * @return this Builder instance |
alanb@368 | 156 | */ |
alanb@368 | 157 | Builder serviceName(QName serviceName); |
alanb@368 | 158 | |
alanb@368 | 159 | /** |
alanb@368 | 160 | * Sets the port name of the WSDL |
alanb@368 | 161 | * |
alanb@368 | 162 | * @param portName The portName to set |
alanb@368 | 163 | * |
alanb@368 | 164 | * @return this Builder instance |
alanb@368 | 165 | */ |
alanb@368 | 166 | Builder portName(QName portName); |
alanb@368 | 167 | |
alanb@368 | 168 | /** |
alanb@368 | 169 | * @deprecated - no replacement - this was never implemented |
alanb@368 | 170 | * |
alanb@368 | 171 | * Sets the WSDL URL where the WSDL can be read from |
alanb@368 | 172 | * |
alanb@368 | 173 | * @param wsdlURL The wsdlURL to set |
alanb@368 | 174 | * |
alanb@368 | 175 | * @return this Builder instance |
alanb@368 | 176 | */ |
alanb@368 | 177 | Builder wsdlURL(URL wsdlURL); |
alanb@368 | 178 | |
alanb@368 | 179 | /** |
alanb@368 | 180 | * @deprecated - no replacement - this was never implemented |
alanb@368 | 181 | * |
alanb@368 | 182 | * Sets the WSDL Source where the WSDL can be read from |
alanb@368 | 183 | * |
alanb@368 | 184 | * @param wsdlSource The wsdlSource to set |
alanb@368 | 185 | * |
alanb@368 | 186 | * @return this Builder instance |
alanb@368 | 187 | */ |
alanb@368 | 188 | Builder wsdlSource(Source wsdlSource); |
alanb@368 | 189 | |
alanb@368 | 190 | /** |
alanb@368 | 191 | * @deprecated - no replacement - this was never implemented |
alanb@368 | 192 | * |
alanb@368 | 193 | * Sets the {@link EntityResolver} for reading the WSDL |
alanb@368 | 194 | * |
alanb@368 | 195 | * @param entityResolver The {@link EntityResolver} to set |
alanb@368 | 196 | * |
alanb@368 | 197 | * @return this Builder instance |
alanb@368 | 198 | */ |
alanb@368 | 199 | Builder entityResolver(EntityResolver entityResolver); |
alanb@368 | 200 | |
alanb@368 | 201 | /** |
alanb@368 | 202 | * Sets the ClassLoader which is used to load the service endpoint |
alanb@368 | 203 | * interface, implementation bean, and all the value types. If this |
alanb@368 | 204 | * value is not set, the default it uses contractClass.getClassLoader(). |
alanb@368 | 205 | * |
alanb@368 | 206 | * @param classLoader The classLoader to set |
alanb@368 | 207 | * |
alanb@368 | 208 | * @return this Builder instance |
alanb@368 | 209 | */ |
alanb@368 | 210 | Builder classLoader(ClassLoader classLoader); |
alanb@368 | 211 | |
alanb@368 | 212 | /** |
alanb@368 | 213 | * Sets A list of WebServiceFeatures |
alanb@368 | 214 | * |
alanb@368 | 215 | * @param features The list of WebServiceFeatures |
alanb@368 | 216 | * |
alanb@368 | 217 | * @return this Builder instance |
alanb@368 | 218 | */ |
alanb@368 | 219 | Builder feature(WebServiceFeature... features); |
alanb@368 | 220 | |
alanb@368 | 221 | /** |
alanb@368 | 222 | * Sets A property of the Databinding object to be created |
alanb@368 | 223 | * |
alanb@368 | 224 | * @param name The name of the property |
alanb@368 | 225 | * @param value The value of the property |
alanb@368 | 226 | * |
alanb@368 | 227 | * @return this Builder instance |
alanb@368 | 228 | */ |
alanb@368 | 229 | Builder property(String name, Object value); |
alanb@368 | 230 | |
alanb@368 | 231 | /** |
alanb@368 | 232 | * Builds a new Databinding instance |
alanb@368 | 233 | * |
alanb@368 | 234 | * @return The Builder instance |
alanb@368 | 235 | */ |
alanb@368 | 236 | Databinding build(); |
alanb@368 | 237 | |
alanb@368 | 238 | /** |
alanb@368 | 239 | * Creates the WSDLGenerator which can be used to generate the WSDL |
alanb@368 | 240 | * representation of the service endpoint interface of this Databinding |
alanb@368 | 241 | * object. |
alanb@368 | 242 | * |
alanb@368 | 243 | * @return WSDLGenerator The WSDLGenerator |
alanb@368 | 244 | */ |
alanb@368 | 245 | com.oracle.webservices.internal.api.databinding.WSDLGenerator createWSDLGenerator(); |
alanb@368 | 246 | } |
alanb@368 | 247 | } |