feat(jdk8): move files to new folder to avoid resources compiled.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
|
||||
import com.sun.xml.internal.ws.api.message.Packet;
|
||||
import com.sun.xml.internal.ws.api.model.JavaMethod;
|
||||
|
||||
public interface ClientCallBridge {
|
||||
|
||||
Packet createRequestPacket(JavaCallInfo call);
|
||||
|
||||
JavaCallInfo readResponse(Packet packet, JavaCallInfo call) throws Throwable;
|
||||
|
||||
Method getMethod();
|
||||
|
||||
JavaMethod getOperationModel();
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import com.sun.xml.internal.ws.api.message.MessageContextFactory;
|
||||
import com.sun.xml.internal.ws.api.message.Packet;
|
||||
import com.sun.xml.internal.ws.api.pipe.ContentType;
|
||||
import com.sun.xml.internal.ws.wsdl.DispatchException;
|
||||
|
||||
/**
|
||||
* {@code Databinding} is the entry point for all the WebService databinding
|
||||
* runtime functionality. Primarily, a Databinding is to serialize/deserialize an
|
||||
* XML(SOAP) message to/from a JAVA method invocation and return value which
|
||||
* are represented as <code>JavaCallInfo</code> instances.
|
||||
* <p>
|
||||
* </p>
|
||||
* Each Databinding is associated with a <code>MessageFactory</code> instance
|
||||
* which can be used to create <code>Message</code> instances that can be
|
||||
* deserialized by the Databinding. The <code>MessageFactory</code> also supports
|
||||
* the conversion of Oracle Fabric Normalized messages.
|
||||
* <p>
|
||||
* </p>
|
||||
* <blockquote> Following is an example that creates a {@code Databinding} which
|
||||
* provides the operations to serialize/deserialize a JavaCallInfo to/from a
|
||||
* SOAP message:<br />
|
||||
*
|
||||
* <pre>
|
||||
* DatabindingFactory wsfac = DatabindingFactory();
|
||||
* Databinding rt = wsfac.createDatabinding(DatabindingConfig);
|
||||
* </pre>
|
||||
*
|
||||
* </blockquote>
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public interface Databinding extends com.oracle.webservices.internal.api.databinding.Databinding {
|
||||
|
||||
/**
|
||||
* Gets the MessageFactory instance associated with this WsRuntime
|
||||
*
|
||||
* @return the MessageFactory instance associated with this WsRuntime
|
||||
*/
|
||||
// MessageFactory getMessageFactory();
|
||||
|
||||
/**
|
||||
* Deserializes a request XML(SOAP) message to a JavaCallInfo instance
|
||||
* representing a JAVA method call.
|
||||
*
|
||||
* @param soap
|
||||
* the request message
|
||||
*
|
||||
* @return the JavaCallInfo representing a method call
|
||||
*/
|
||||
// JavaCallInfo deserializeRequest(Packet req);
|
||||
|
||||
EndpointCallBridge getEndpointBridge(Packet soap) throws DispatchException;
|
||||
|
||||
ClientCallBridge getClientBridge(Method method);
|
||||
|
||||
/**
|
||||
* Serializes a JavaCallInfo instance representing a JAVA method call to a
|
||||
* request XML(SOAP) message.
|
||||
*
|
||||
* @param call
|
||||
* the JavaCallInfo representing a method call
|
||||
*
|
||||
* @return the request XML(SOAP) message
|
||||
*/
|
||||
// Packet serializeRequest(JavaCallInfo call);
|
||||
|
||||
/**
|
||||
* Serializes a JavaCallInfo instance representing the return value or
|
||||
* exception of a JAVA method call to a response XML(SOAP) message.
|
||||
*
|
||||
* @param call
|
||||
* the JavaCallInfo representing the return value or exception of
|
||||
* a JAVA method call
|
||||
*
|
||||
* @return the response XML(SOAP) message
|
||||
*/
|
||||
// Packet serializeResponse(JavaCallInfo call);
|
||||
|
||||
/**
|
||||
* Deserializes a response XML(SOAP) message to a JavaCallInfo instance
|
||||
* representing the return value or exception of a JAVA method call.
|
||||
*
|
||||
* @param soap
|
||||
* the response message
|
||||
*
|
||||
* @param call
|
||||
* the JavaCallInfo instance to be updated
|
||||
*
|
||||
* @return the JavaCallInfo updated with the return value or exception of a
|
||||
* JAVA method call
|
||||
*/
|
||||
// JavaCallInfo deserializeResponse(Packet res, JavaCallInfo call);
|
||||
|
||||
/**
|
||||
* Gets the WSDL operation metadata of the specified JAVA method.
|
||||
*
|
||||
* @param method
|
||||
* the JAVA method
|
||||
* @return the operationMetadata
|
||||
*/
|
||||
// OperationMetadata getOperationMetadata(java.lang.reflect.Method method);
|
||||
|
||||
/**
|
||||
* Gets the WebServiceFeatures of this webservice endpoint.
|
||||
*
|
||||
* @return the features
|
||||
*/
|
||||
// WebServiceFeature[] getFeatures();
|
||||
|
||||
void generateWSDL(WSDLGenInfo info);
|
||||
|
||||
/**
|
||||
* @deprecated use MessageContextFactory
|
||||
*/
|
||||
public ContentType encode( Packet packet, OutputStream out ) throws IOException ;
|
||||
|
||||
/**
|
||||
* @deprecated use MessageContextFactory
|
||||
*/
|
||||
public void decode( InputStream in, String ct, Packet packet ) throws IOException;
|
||||
|
||||
public MessageContextFactory getMessageContextFactory();
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
import org.xml.sax.EntityResolver;
|
||||
|
||||
import com.sun.xml.internal.ws.api.WSBinding;
|
||||
import com.sun.xml.internal.ws.api.WSFeatureList;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
|
||||
|
||||
/**
|
||||
* DatabindingConfig contains the initial states for Databinding. After a Databinding
|
||||
* instance is created, all it's internal states should be considered
|
||||
* 'immutable' and therefore the operations on Databinding are thread-safe.
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public class DatabindingConfig {
|
||||
protected Class contractClass;
|
||||
protected Class endpointClass;
|
||||
protected Set<Class> additionalValueTypes = new HashSet<Class>();
|
||||
protected MappingInfo mappingInfo = new MappingInfo();
|
||||
protected URL wsdlURL;
|
||||
protected ClassLoader classLoader;
|
||||
protected Iterable<WebServiceFeature> features;
|
||||
protected WSBinding wsBinding;
|
||||
protected WSDLPort wsdlPort;
|
||||
protected MetadataReader metadataReader;
|
||||
protected Map<String, Object> properties = new HashMap<String, Object>();
|
||||
protected Source wsdlSource;
|
||||
protected EntityResolver entityResolver;
|
||||
|
||||
public Class getContractClass() {
|
||||
return contractClass;
|
||||
}
|
||||
public void setContractClass(Class contractClass) {
|
||||
this.contractClass = contractClass;
|
||||
}
|
||||
public Class getEndpointClass() {
|
||||
return endpointClass;
|
||||
}
|
||||
public void setEndpointClass(Class implBeanClass) {
|
||||
this.endpointClass = implBeanClass;
|
||||
}
|
||||
public MappingInfo getMappingInfo() {
|
||||
return mappingInfo;
|
||||
}
|
||||
public void setMappingInfo(MappingInfo mappingInfo) {
|
||||
this.mappingInfo = mappingInfo;
|
||||
}
|
||||
public URL getWsdlURL() {
|
||||
return wsdlURL;
|
||||
}
|
||||
public void setWsdlURL(URL wsdlURL) {
|
||||
this.wsdlURL = wsdlURL;
|
||||
}
|
||||
public ClassLoader getClassLoader() {
|
||||
return classLoader;
|
||||
}
|
||||
public void setClassLoader(ClassLoader classLoader) {
|
||||
this.classLoader = classLoader;
|
||||
}
|
||||
public Iterable<WebServiceFeature> getFeatures() {
|
||||
if (features == null && wsBinding != null) return wsBinding.getFeatures();
|
||||
return features;
|
||||
}
|
||||
public void setFeatures(WebServiceFeature[] features) {
|
||||
setFeatures(new WebServiceFeatureList(features));
|
||||
}
|
||||
public void setFeatures(Iterable<WebServiceFeature> features) {
|
||||
this.features = WebServiceFeatureList.toList(features);
|
||||
}
|
||||
public WSDLPort getWsdlPort() {
|
||||
return wsdlPort;
|
||||
}
|
||||
public void setWsdlPort(WSDLPort wsdlPort) {
|
||||
this.wsdlPort = wsdlPort;
|
||||
}
|
||||
public Set<Class> additionalValueTypes() {
|
||||
return additionalValueTypes;
|
||||
}
|
||||
public Map<String, Object> properties() {
|
||||
return properties;
|
||||
}
|
||||
public WSBinding getWSBinding() {
|
||||
return wsBinding;
|
||||
}
|
||||
public void setWSBinding(WSBinding wsBinding) {
|
||||
this.wsBinding = wsBinding;
|
||||
}
|
||||
public MetadataReader getMetadataReader() {
|
||||
return metadataReader;
|
||||
}
|
||||
public void setMetadataReader(MetadataReader reader) {
|
||||
this.metadataReader = reader;
|
||||
}
|
||||
|
||||
public Source getWsdlSource() {
|
||||
return wsdlSource;
|
||||
}
|
||||
public void setWsdlSource(Source wsdlSource) {
|
||||
this.wsdlSource = wsdlSource;
|
||||
}
|
||||
public EntityResolver getEntityResolver() {
|
||||
return entityResolver;
|
||||
}
|
||||
public void setEntityResolver(EntityResolver entityResolver) {
|
||||
this.entityResolver = entityResolver;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* WsFactory is the entry point of all the ws-databinding APIs. A WsFactory
|
||||
* instance can be used to create <code>WsTool</code>, <code>WsRuntime</code>,
|
||||
* <code>XsTool</code>, and <code>XsRuntime</code> instances.
|
||||
* <p>
|
||||
* </P>
|
||||
* <blockquote>
|
||||
* Following is an example that creates a {@code WsTool} which provides the
|
||||
* operations for "WSDL to JAVA" and "JAVA to WSDL":<br />
|
||||
* <pre>
|
||||
* WsFactory wsfac = WsFactory.newInstance();
|
||||
* WsTool tool = wsfac.createTool();
|
||||
* GenerationStatus status = tool.generateWsdl(javaToWsdkInfo);
|
||||
* </pre>
|
||||
* </blockquote>
|
||||
*
|
||||
* <blockquote>
|
||||
* Following is an example that creates a {@code WsRuntime} which provides the
|
||||
* operations to serialize/deserialize a JavaCallInfo to/from a SOAP message:<br />
|
||||
* <pre>
|
||||
* WsFactory wsfac = WsFactory.newInstance();
|
||||
* WsRuntime rt = wsfac.createRuntime(wsRuntimeConfig);
|
||||
* </pre>
|
||||
* </blockquote>
|
||||
*
|
||||
* @see com.sun.xml.internal.ws.api.databinding.Databinding
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public abstract class DatabindingFactory extends com.oracle.webservices.internal.api.databinding.DatabindingFactory {
|
||||
|
||||
/**
|
||||
* Creates a new instance of a <code>WsTool</code>.
|
||||
*
|
||||
* @return New instance of a <code>WsTool</code>
|
||||
*/
|
||||
// abstract public WsTool createTool();
|
||||
|
||||
/**
|
||||
* Creates a new instance of a <code>WsRuntime</code> which is initialized
|
||||
* with the specified configuration object.
|
||||
*
|
||||
* @param config
|
||||
* the EndpointRuntimeConfig to init this WsRuntime
|
||||
* @return New instance of a <code>WsRuntime</code>
|
||||
*/
|
||||
abstract public com.oracle.webservices.internal.api.databinding.Databinding createRuntime(DatabindingConfig config);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a <code>XsTool</code>.
|
||||
*
|
||||
* @return New instance of a <code>XsTool</code>
|
||||
*/
|
||||
// abstract public XsTool createXsTool(String mode);
|
||||
|
||||
/**
|
||||
* Creates a new instance of a <code>XsRuntime</code>.
|
||||
*
|
||||
* @return New instance of a <code>XsRuntime</code>
|
||||
*/
|
||||
// abstract public XsRuntime createXsRuntime(String mode);
|
||||
|
||||
/**
|
||||
* Access properties on the <code>WsFactory</code> instance.
|
||||
*
|
||||
* @return properties of this WsFactory
|
||||
*/
|
||||
abstract public Map<String, Object> properties();
|
||||
|
||||
/**
|
||||
* The default implementation class name.
|
||||
*/
|
||||
static final String ImplClass = com.sun.xml.internal.ws.db.DatabindingFactoryImpl.class.getName();
|
||||
|
||||
/**
|
||||
* Create a new instance of a <code>WsFactory</code>. This static method
|
||||
* creates a new factory instance.
|
||||
*
|
||||
* Once an application has obtained a reference to a <code>WsFactory</code>
|
||||
* it can use the factory to configure and obtain <code>WsTool</code> and
|
||||
* <code>WsRuntime</code> instances.
|
||||
*
|
||||
* @return New instance of a <code>WsFactory</code>
|
||||
*/
|
||||
static public DatabindingFactory newInstance() {
|
||||
try {
|
||||
Class<?> cls = Class.forName(ImplClass);
|
||||
return (DatabindingFactory) cls.newInstance();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
|
||||
import com.sun.xml.internal.ws.api.message.Packet;
|
||||
import com.sun.xml.internal.ws.api.model.JavaMethod;
|
||||
|
||||
public interface EndpointCallBridge {
|
||||
|
||||
public JavaCallInfo deserializeRequest(Packet req);
|
||||
|
||||
//Change the return type to??
|
||||
public Packet serializeResponse(JavaCallInfo call);
|
||||
|
||||
JavaMethod getOperationModel();
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* On the client or service-requestor side, a JavaCallInfo object represents a
|
||||
* method call on the service proxy to be serialized as a SOAP request message
|
||||
* to be sent to the service. A SOAP response message returned to the service
|
||||
* client is deserialized as an update to the JavaCallInfo object which is used
|
||||
* to generated the request.
|
||||
* <p>
|
||||
* </p>
|
||||
* On the server or service provider side, a SOAP request message is
|
||||
* deserialized to a JavaCallInfo object which can be used to determine which
|
||||
* method to call, and get the parameter values to call the back-end service
|
||||
* implementation object. The return value or exception returned from the
|
||||
* service implementation should be set to the JavaCallInfo object which then
|
||||
* can be used to serialize to a A SOAP response or fault message to be sent
|
||||
* back to the service client.
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public class JavaCallInfo implements com.oracle.webservices.internal.api.databinding.JavaCallInfo {
|
||||
|
||||
private Method method;
|
||||
private Object[] parameters;
|
||||
private Object returnValue;
|
||||
private Throwable exception;
|
||||
|
||||
public JavaCallInfo() {
|
||||
}
|
||||
|
||||
public JavaCallInfo(Method m, Object[] args) {
|
||||
method = m;
|
||||
parameters = args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the method of this JavaCallInfo
|
||||
*
|
||||
* @return the method
|
||||
*/
|
||||
public Method getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the method of this JavaCallInfo
|
||||
*
|
||||
* @param method
|
||||
* the method to set
|
||||
*/
|
||||
public void setMethod(Method method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the parameters of this JavaCallInfo
|
||||
*
|
||||
* @return the parameters
|
||||
*/
|
||||
public Object[] getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the parameters of this JavaCallInfo
|
||||
*
|
||||
* @param parameters
|
||||
* the parameters to set
|
||||
*/
|
||||
public void setParameters(Object[] parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the returnValue of this JavaCallInfo
|
||||
*
|
||||
* @return the returnValue
|
||||
*/
|
||||
public Object getReturnValue() {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the returnValue of this JavaCallInfo
|
||||
*
|
||||
* @param returnValue
|
||||
* the returnValue to set
|
||||
*/
|
||||
public void setReturnValue(Object returnValue) {
|
||||
this.returnValue = returnValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exception of this JavaCallInfo
|
||||
*
|
||||
* @return the exception
|
||||
*/
|
||||
public Throwable getException() {
|
||||
return exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the exception of this JavaCallInfo
|
||||
*
|
||||
* @param exception
|
||||
* the exception to set
|
||||
*/
|
||||
public void setException(Throwable exception) {
|
||||
this.exception = exception;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.xml.internal.ws.api.BindingID;
|
||||
|
||||
/**
|
||||
* A MappingInfo object is the collection of all the properties of the mapping
|
||||
* between a JAVA contract class (SEI) and it's corresponding WSDL artifacts
|
||||
* (wsdl:portType and wsdl:binding). A MappingInfo object can be used to provide
|
||||
* additional mapping metadata for WSDL generation and the runtime of WebService
|
||||
* databinding.
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public class MappingInfo {
|
||||
protected String targetNamespace;
|
||||
protected String databindingMode;
|
||||
protected SoapBodyStyle soapBodyStyle;
|
||||
protected BindingID bindingID;
|
||||
protected QName serviceName;
|
||||
protected QName portName;
|
||||
protected String defaultSchemaNamespaceSuffix;
|
||||
|
||||
public String getTargetNamespace() {
|
||||
return targetNamespace;
|
||||
}
|
||||
public void setTargetNamespace(String targetNamespace) {
|
||||
this.targetNamespace = targetNamespace;
|
||||
}
|
||||
public String getDatabindingMode() {
|
||||
return databindingMode;
|
||||
}
|
||||
public void setDatabindingMode(String databindingMode) {
|
||||
this.databindingMode = databindingMode;
|
||||
}
|
||||
public SoapBodyStyle getSoapBodyStyle() {
|
||||
return soapBodyStyle;
|
||||
}
|
||||
public void setSoapBodyStyle(SoapBodyStyle soapBodyStyle) {
|
||||
this.soapBodyStyle = soapBodyStyle;
|
||||
}
|
||||
public BindingID getBindingID() {
|
||||
return bindingID;
|
||||
}
|
||||
public void setBindingID(BindingID bindingID) {
|
||||
this.bindingID = bindingID;
|
||||
}
|
||||
public QName getServiceName() {
|
||||
return serviceName;
|
||||
}
|
||||
public void setServiceName(QName serviceName) {
|
||||
this.serviceName = serviceName;
|
||||
}
|
||||
public QName getPortName() {
|
||||
return portName;
|
||||
}
|
||||
public void setPortName(QName portName) {
|
||||
this.portName = portName;
|
||||
}
|
||||
public String getDefaultSchemaNamespaceSuffix() {
|
||||
return defaultSchemaNamespaceSuffix;
|
||||
}
|
||||
public void setDefaultSchemaNamespaceSuffix(String defaultSchemaNamespaceSuffix) {
|
||||
this.defaultSchemaNamespaceSuffix = defaultSchemaNamespaceSuffix;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* MetadataReader
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public interface MetadataReader {
|
||||
|
||||
public Annotation[] getAnnotations(Method m) ;
|
||||
|
||||
public Annotation[][] getParameterAnnotations(final Method method);
|
||||
|
||||
public <A extends Annotation> A getAnnotation(final Class<A> annType, final Method m);
|
||||
|
||||
public <A extends Annotation> A getAnnotation(final Class<A> annType, final Class<?> cls);
|
||||
|
||||
public Annotation[] getAnnotations(Class<?> c);
|
||||
|
||||
public void getProperties(final Map<String, Object> prop, final Class<?> cls);
|
||||
|
||||
public void getProperties(final Map<String, Object> prop, final Method method);
|
||||
|
||||
public void getProperties(final Map<String, Object> prop, final Method method, int pos);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
/**
|
||||
* The SoapBodyStyle represents the possible choices of the mapping styles
|
||||
* between the SOAP body of a wsdl:operation input/output messages and JAVA
|
||||
* method parameters and return/output values.
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public enum SoapBodyStyle {
|
||||
|
||||
/**
|
||||
* Bare style mapping of a document style with literal use wsdl:operation
|
||||
*/
|
||||
DocumentBare,
|
||||
|
||||
/**
|
||||
* Wrapper style mapping of a document style with literal use wsdl:operation
|
||||
*/
|
||||
DocumentWrapper,
|
||||
|
||||
/**
|
||||
* The mapping style of a RPC style with literal use wsdl:operation
|
||||
*/
|
||||
RpcLiteral,
|
||||
|
||||
/**
|
||||
* The mapping style of a RPC style with encoded use wsdl:operation.
|
||||
*
|
||||
* Note: this is not offically supported in JAX-WS.
|
||||
*/
|
||||
RpcEncoded,
|
||||
|
||||
/**
|
||||
* The mapping style is not specified.
|
||||
*/
|
||||
Unspecificed;
|
||||
|
||||
public boolean isDocument() {
|
||||
return (this.equals(DocumentBare) || this.equals(DocumentWrapper));
|
||||
}
|
||||
|
||||
public boolean isRpc() {
|
||||
return (this.equals(RpcLiteral) || this.equals(RpcEncoded));
|
||||
}
|
||||
|
||||
public boolean isLiteral() {
|
||||
return (this.equals(RpcLiteral) || this.isDocument());
|
||||
}
|
||||
|
||||
public boolean isBare() {
|
||||
return (this.equals(DocumentBare));
|
||||
}
|
||||
|
||||
public boolean isDocumentWrapper() {
|
||||
return (this.equals(DocumentWrapper));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.databinding;
|
||||
|
||||
import com.oracle.webservices.internal.api.databinding.WSDLResolver;
|
||||
import com.sun.xml.internal.ws.api.server.Container;
|
||||
import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
|
||||
|
||||
/**
|
||||
* WSDLGenInfo provides the WSDL generation options
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public class WSDLGenInfo {
|
||||
WSDLResolver wsdlResolver;
|
||||
Container container;
|
||||
boolean inlineSchemas;
|
||||
boolean secureXmlProcessingDisabled;
|
||||
WSDLGeneratorExtension[] extensions;
|
||||
|
||||
public WSDLResolver getWsdlResolver() {
|
||||
return wsdlResolver;
|
||||
}
|
||||
public void setWsdlResolver(WSDLResolver wsdlResolver) {
|
||||
this.wsdlResolver = wsdlResolver;
|
||||
}
|
||||
public Container getContainer() {
|
||||
return container;
|
||||
}
|
||||
public void setContainer(Container container) {
|
||||
this.container = container;
|
||||
}
|
||||
public boolean isInlineSchemas() {
|
||||
return inlineSchemas;
|
||||
}
|
||||
public void setInlineSchemas(boolean inlineSchemas) {
|
||||
this.inlineSchemas = inlineSchemas;
|
||||
}
|
||||
public WSDLGeneratorExtension[] getExtensions() {
|
||||
if (extensions == null) return new WSDLGeneratorExtension[0];
|
||||
return extensions;
|
||||
}
|
||||
public void setExtensions(WSDLGeneratorExtension[] extensions) {
|
||||
this.extensions = extensions;
|
||||
}
|
||||
|
||||
public void setSecureXmlProcessingDisabled(boolean secureXmlProcessingDisabled) {
|
||||
this.secureXmlProcessingDisabled = secureXmlProcessingDisabled;
|
||||
}
|
||||
|
||||
public boolean isSecureXmlProcessingDisabled() {
|
||||
return secureXmlProcessingDisabled;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user