feat(jdk8): move files to new folder to avoid resources compiled.

This commit is contained in:
2025-09-07 15:25:52 +08:00
parent 3f0047bf6f
commit 8c35cfb1c0
17415 changed files with 217 additions and 213 deletions

View File

@@ -0,0 +1,247 @@
/*
* 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.oracle.webservices.internal.api.databinding;
import java.lang.reflect.Method;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import javax.xml.ws.WebServiceFeature;
import org.xml.sax.EntityResolver;
import com.oracle.webservices.internal.api.message.MessageContext;
/**
* {@code Databinding} is the entry point for all the WebService Databinding
* functionality. Primarily, a Databinding is to serialize/deserialize an
* XML(SOAP) message to/from a JAVA method invocation and return which are
* represented as <code>JavaCallInfo</code> instances. A WSDLGenerator can
* be created from a Databinding object to genreate WSDL representation of
* a JAVA service endpoint interface.
* <p>
* </p>
* The supported databinding modes(flavors) are:
* <ul>
* <li>"toplink.jaxb"</li>
* <li>"glassfish.jaxb"</li>
* </ul>
* <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 factory = DatabindingFactory.newInstance();
* Databinding.Builder builder = factory.createBuilder(seiClass, endpointClass);
* Databinding databinding = builder.build();
* </pre>
*
* </blockquote>
*
* @see com.oracle.webservices.internal.api.databinding.DatabindingFactory
*
* @author shih-chang.chen@oracle.com
*/
public interface Databinding {
/**
* Creates a new instance of a <code>JavaCallInfo</code>.
*
* @param method The JAVA method
* @param args The parameter objects
*
* @return New instance of a <code>JavaCallInfo</code>
*/
JavaCallInfo createJavaCallInfo(Method method, Object[] args);
/**
* 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
*/
MessageContext serializeRequest(JavaCallInfo call);
/**
* Deserializes a response XML(SOAP) message to a JavaCallInfo instance
* representing the return value or exception of a JAVA method call.
*
* @param message 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(MessageContext message, JavaCallInfo call);
/**
* Deserializes a request XML(SOAP) message to a JavaCallInfo instance
* representing a JAVA method call.
*
* @param message The request message
*
* @return The JavaCallInfo representing a method call
*/
JavaCallInfo deserializeRequest(MessageContext message);
/**
* 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
*/
MessageContext serializeResponse(JavaCallInfo call);
/**
* Gets the MessageContextFactory
*
* @return The MessageContextFactory
*/
//Wait for WLS/src1212 - wls.jaxrpc wrapper
// MessageContextFactory getMessageContextFactory();
/**
* {@code Databinding.Builder}, created from the DatabindingFactory, is used to
* configure how a Databinding instance is to be built from this builder.
*
* @see com.oracle.webservices.internal.api.databinding.DatabindingFactory
* @author shih-chang.chen@oracle.com
*/
public interface Builder {
/**
* Sets the targetNamespace of the WSDL
*
* @param targetNamespace The targetNamespace to set
*
* @return this Builder instance
*/
Builder targetNamespace(String targetNamespace);
/**
* Sets the service name of the WSDL
*
* @param serviceName The serviceName to set
*
* @return this Builder instance
*/
Builder serviceName(QName serviceName);
/**
* Sets the port name of the WSDL
*
* @param portName The portName to set
*
* @return this Builder instance
*/
Builder portName(QName portName);
/**
* @deprecated - no replacement - this was never implemented
*
* Sets the WSDL URL where the WSDL can be read from
*
* @param wsdlURL The wsdlURL to set
*
* @return this Builder instance
*/
Builder wsdlURL(URL wsdlURL);
/**
* @deprecated - no replacement - this was never implemented
*
* Sets the WSDL Source where the WSDL can be read from
*
* @param wsdlSource The wsdlSource to set
*
* @return this Builder instance
*/
Builder wsdlSource(Source wsdlSource);
/**
* @deprecated - no replacement - this was never implemented
*
* Sets the {@link EntityResolver} for reading the WSDL
*
* @param entityResolver The {@link EntityResolver} to set
*
* @return this Builder instance
*/
Builder entityResolver(EntityResolver entityResolver);
/**
* Sets the ClassLoader which is used to load the service endpoint
* interface, implementation bean, and all the value types. If this
* value is not set, the default it uses contractClass.getClassLoader().
*
* @param classLoader The classLoader to set
*
* @return this Builder instance
*/
Builder classLoader(ClassLoader classLoader);
/**
* Sets A list of WebServiceFeatures
*
* @param features The list of WebServiceFeatures
*
* @return this Builder instance
*/
Builder feature(WebServiceFeature... features);
/**
* Sets A property of the Databinding object to be created
*
* @param name The name of the property
* @param value The value of the property
*
* @return this Builder instance
*/
Builder property(String name, Object value);
/**
* Builds a new Databinding instance
*
* @return The Builder instance
*/
Databinding build();
/**
* Creates the WSDLGenerator which can be used to generate the WSDL
* representation of the service endpoint interface of this Databinding
* object.
*
* @return WSDLGenerator The WSDLGenerator
*/
com.oracle.webservices.internal.api.databinding.WSDLGenerator createWSDLGenerator();
}
}

View File

@@ -0,0 +1,105 @@
/*
* 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.oracle.webservices.internal.api.databinding;
import java.util.Map;
/**
* {@code DatabindingFactory} is the entry point of all the WebService
* Databinding APIs. A DatabindingFactory instance can be used to create
* <code>Databinding.Builder</code> instances, and <code>Databinding.Builder</code>
* instances are used to configure and build <code>Databinding</code> instances.
* <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 factory = DatabindingFactory.newInstance();
* Databinding.Builder builder = factory.createBuilder(seiClass, endpointClass);
* Databinding databinding = builder.build();
* </pre>
* </blockquote>
*
* @see com.oracle.webservices.internal.api.databinding.Databinding
*
* @author shih-chang.chen@oracle.com
*/
public abstract class DatabindingFactory {
/**
* Creates a new instance of a <code>Databinding.Builder</code> which is
* initialized with the specified contractClass and endpointClass. The most
* importance initial states of a Builder object is the contract class which
* is also called "service endpoint interface" or "SEI" in JAX-WS and JAX-RPC,
* and the implementation bean class (endpointClass). The the implementation
* bean class (endpointClass) should be null if the Builder is to create
* the client side proxy databinding.
*
* @param contractClass The service endpoint interface class
* @param endpointClass The service implementation bean class
*
* @return New instance of a <code>Databinding.Builder</code>
*/
abstract public Databinding.Builder createBuilder(Class<?> contractClass, Class<?> endpointClass);
/**
* Access properties on the <code>DatabindingFactory</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";
/**
* Create a new instance of a <code>DatabindingFactory</code>. This static method
* creates a new factory instance.
*
* Once an application has obtained a reference to a <code>DatabindingFactory</code>
* it can use the factory to obtain and configure a <code>Databinding.Builder</code>
* to build a <code>Databinding</code> instances.
*
* @return New instance of a <code>DatabindingFactory</code>
*/
static public DatabindingFactory newInstance() {
try {
Class<?> cls = Class.forName(ImplClass);
return convertIfNecessary(cls);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
@SuppressWarnings("deprecation")
private static DatabindingFactory convertIfNecessary(Class<?> cls) throws InstantiationException, IllegalAccessException {
return (DatabindingFactory) cls.newInstance();
}
}

View File

@@ -0,0 +1,37 @@
/*
* 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.oracle.webservices.internal.api.databinding;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.xml.ws.spi.WebServiceFeatureAnnotation;
@WebServiceFeatureAnnotation(id="", bean=com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class)
@Retention(RetentionPolicy.RUNTIME)
public @interface DatabindingMode {
String value();
}

View File

@@ -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.oracle.webservices.internal.api.databinding;
import java.util.HashMap;
import java.util.Map;
import javax.xml.ws.WebServiceFeature;
public class DatabindingModeFeature extends WebServiceFeature implements com.sun.xml.internal.ws.api.ServiceSharedFeatureMarker {
/**
* Constant value identifying the DatabindingFeature
*/
static public final String ID = "http://jax-ws.java.net/features/databinding";
static public final String GLASSFISH_JAXB = "glassfish.jaxb";
//These constants should be defined in the corresponding plugin package
// static public final String ECLIPSELINK_JAXB = "eclipselink.jaxb";
// static public final String ECLIPSELINK_SDO = "eclipselink.sdo";
// static public final String TOPLINK_JAXB = "toplink.jaxb";
// static public final String TOPLINK_SDO = "toplink.sdo";
private String mode;
private Map<String, Object> properties;
public DatabindingModeFeature(String mode) {
super();
this.mode = mode;
properties = new HashMap<String, Object>();
}
public String getMode() {
return mode;
}
public String getID() {
return ID;
}
public Map<String, Object> getProperties() {
return properties;
}
public static Builder builder() { return new Builder(new DatabindingModeFeature(null)); }
public final static class Builder {
final private DatabindingModeFeature o;
Builder(final DatabindingModeFeature x) { o = x; }
public DatabindingModeFeature build() { return o; }
// public DatabindingModeFeature build() { return (DatabindingModeFeature) FeatureValidator.validate(o); }
public Builder value(final String x) { o.mode = x; return this; }
}
}

View File

@@ -0,0 +1,163 @@
/*
* 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.oracle.webservices.internal.api.databinding;
import com.sun.xml.internal.ws.api.databinding.MetadataReader;
import com.sun.xml.internal.ws.model.ExternalMetadataReader;
import javax.xml.ws.WebServiceFeature;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* WebServiceFeature allowing to define either on server or client side external xml descriptors replacing/supplementing
* WS metadata provided by class annotations. This can be useful if those annotations are missing (existing non-WS
* components) or if it is necessary to override those.
*
* @author Miroslav Kos (miroslav.kos at oracle.com)
*/
public class ExternalMetadataFeature extends WebServiceFeature {
private static final String ID = "com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature";
/**
* Enable this feature. Defaults to true.
*/
private boolean enabled = true;
private List<String> resourceNames;
private List<File> files;
private MetadataReader reader;
private ExternalMetadataFeature() {
}
public void addResources(String... resourceNames) {
if (this.resourceNames == null) {
this.resourceNames = new ArrayList<String>();
}
Collections.addAll(this.resourceNames, resourceNames);
}
public List<String> getResourceNames() { return resourceNames; }
public void addFiles(File... files) {
if (this.files == null) {
this.files = new ArrayList<File>();
}
Collections.addAll(this.files, files);
}
public List<File> getFiles() { return files; }
public boolean isEnabled() {
return enabled;
}
private void setEnabled(final boolean x) {
enabled = x;
}
@Override
public String getID() {
return ID;
}
public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableXmlSecurity) {
if (reader != null && enabled) return reader;
return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableXmlSecurity) : null;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ExternalMetadataFeature that = (ExternalMetadataFeature) o;
if (enabled != that.enabled) return false;
if (files != null ? !files.equals(that.files) : that.files != null) return false;
if (resourceNames != null ? !resourceNames.equals(that.resourceNames) : that.resourceNames != null)
return false;
return true;
}
@Override
public int hashCode() {
int result = (enabled ? 1 : 0);
result = 31 * result + (resourceNames != null ? resourceNames.hashCode() : 0);
result = 31 * result + (files != null ? files.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "[" + getID() +
", enabled=" + enabled +
", resourceNames=" + resourceNames +
", files=" + files +
']';
}
public static Builder builder() {
return new Builder(new ExternalMetadataFeature());
}
public final static class Builder {
final private ExternalMetadataFeature o;
Builder(final ExternalMetadataFeature x) {
o = x;
}
public ExternalMetadataFeature build() {
return o;
}
public Builder addResources(String... res) {
o.addResources(res);
return this;
}
public Builder addFiles(File... files) {
o.addFiles(files);
return this;
}
public Builder setEnabled(boolean enabled) {
o.setEnabled(enabled);
return this;
}
public Builder setReader( MetadataReader r ) {
o.reader = r;
return this;
}
}
}

View File

@@ -0,0 +1,108 @@
/*
* 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.oracle.webservices.internal.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 interface JavaCallInfo {
/**
* Gets the method of this JavaCallInfo
*
* @return the method
*/
public Method getMethod();
// /**
// * Sets the method of this JavaCallInfo
// *
// * @param method The method to set
// */
// public void setMethod(Method method);
/**
* Gets the parameters of this JavaCallInfo
*
* @return The parameters
*/
public Object[] getParameters();
// /**
// * Sets the parameters of this JavaCallInfo
// *
// * @param parameters
// * the parameters to set
// */
// public void setParameters(Object[] parameters);
/**
* Gets the returnValue of this JavaCallInfo
*
* @return the returnValue
*/
public Object getReturnValue();
/**
* Sets the returnValue of this JavaCallInfo
*
* @param returnValue
* the returnValue to set
*/
public void setReturnValue(Object returnValue);
/**
* Gets the exception of this JavaCallInfo
*
* @return the exception
*/
public Throwable getException();
/**
* Sets the exception of this JavaCallInfo
*
* @param exception
* the exception to set
*/
public void setException(Throwable exception);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright (c) 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.oracle.webservices.internal.api.databinding;
import java.io.File;
/**
* WSDLGenerator is used to generate the WSDL representation of the service
* endpoint interface of the parent Databinding object.
*/
public interface WSDLGenerator {
/**
* Sets the inlineSchema boolean. When the inlineSchema is true, the
* generated schema documents are embedded within the type element of
* the generated WSDL. When the inlineSchema is false, the generated
* schema documents are generated as standalone schema documents and
* imported into the generated WSDL.
*
* @param inline the inlineSchema boolean.
* @return
*/
WSDLGenerator inlineSchema(boolean inline);
/**
* Sets A property of the WSDLGenerator
*
* @param name The name of the property
* @param value The value of the property
*
* @return this WSDLGenerator instance
*/
WSDLGenerator property(String name, Object value);
/**
* Generates the WSDL using the wsdlResolver to output the generated
* documents.
*
* @param wsdlResolver The WSDLResolver
*/
void generate(com.oracle.webservices.internal.api.databinding.WSDLResolver wsdlResolver);
/**
* Generates the WSDL into the file directory
*
* @param outputDir The output file directory
* @param name The file name of the main WSDL document
*/
void generate(File outputDir, String name);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright (c) 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.oracle.webservices.internal.api.databinding;
import javax.xml.transform.Result;
import javax.xml.ws.Holder;
/**
* WSDLResolver is used by WSDLGenerator while generating WSDL and its associated
* documents. It is used to control what documents need to be generated and what
* documents need to be picked from metadata. If endpont's document metadata
* already contains some documents, their systemids may be used for wsdl:import,
* and schema:import. The suggested filenames are relative urls(for e.g: EchoSchema1.xsd)
* The Result object systemids are also relative urls(for e.g: AbsWsdl.wsdl).
*
* @author Jitendra Kotamraju
*/
public interface WSDLResolver {
/**
* Create a Result object into which concrete WSDL is to be generated.
*
* @return Result for the concrete WSDL
*/
public Result getWSDL(String suggestedFilename);
/**
* Create a Result object into which abstract WSDL is to be generated. If the the
* abstract WSDL is already in metadata, it is not generated.
*
* Update filename if the suggested filename need to be changed in wsdl:import.
* This needs to be done if the metadata contains abstract WSDL, and that systemid
* needs to be reflected in concrete WSDL's wsdl:import
*
* @return null if abstract WSDL need not be generated
*/
public Result getAbstractWSDL(Holder<String> filename);
/**
* Create a Result object into which schema doc is to be generated. Typically if
* there is a schema doc for namespace in metadata, then it is not generated.
*
* Update filename if the suggested filename need to be changed in xsd:import. This
* needs to be done if the metadata contains the document, and that systemid
* needs to be reflected in some other document's xsd:import
*
* @return null if schema need not be generated
*/
public Result getSchemaOutput(String namespace, Holder<String> filename);
}