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,113 @@
/*
* Copyright (c) 2005, 2010, 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 javax.xml.ws.soap;
import java.lang.annotation.Documented;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
import javax.xml.ws.WebServiceProvider;
import javax.xml.ws.soap.AddressingFeature.Responses;
import javax.xml.ws.spi.WebServiceFeatureAnnotation;
/**
* This annotation represents the use of WS-Addressing with either
* the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this annotation
* with any other binding is undefined.
* <p>
* This annotation MUST only be used in conjunction with the
* {@link javax.jws.WebService}, {@link WebServiceProvider},
* and {@link WebServiceRef} annotations.
* When used with a <code>javax.jws.WebService</code> annotation, this
* annotation MUST only be used on the service endpoint implementation
* class.
* When used with a <code>WebServiceRef</code> annotation, this annotation
* MUST only be used when a proxy instance is created. The injected SEI
* proxy, and endpoint MUST honor the values of the <code>Addressing</code>
* annotation.
* <p>
* This annotation's behaviour is defined by the corresponding feature
* {@link AddressingFeature}.
*
* @since JAX-WS 2.1
*/
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@WebServiceFeatureAnnotation(id=AddressingFeature.ID,bean=AddressingFeature.class)
public @interface Addressing {
/**
* Specifies if this feature is enabled or disabled. If enabled, it means
* the endpoint supports WS-Addressing but does not require its use.
* Corresponding
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyaddressing">
* 3.1.1 Addressing Assertion</a> must be generated in the generated WSDL.
*/
boolean enabled() default true;
/**
* If addressing is enabled, this property determines whether the endpoint
* requires WS-Addressing. If required is true, the endpoint requires
* WS-Addressing and WS-Addressing headers MUST
* be present on incoming messages. A corresponding
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyaddressing">
* 3.1.1 Addressing Assertion</a> must be generated in the WSDL.
*/
boolean required() default false;
/**
* If addressing is enabled, this property determines whether endpoint
* requires the use of anonymous responses, or non-anonymous responses,
* or all.
*
* <p>
* {@link Responses#ALL} supports all response types and this is the
* default value.
*
* <p>
* {@link Responses#ANONYMOUS} requires the use of only anonymous
* responses. It will result into wsam:AnonymousResponses nested assertion
* as specified in
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyanonresponses">
* 3.1.2 AnonymousResponses Assertion</a> in the generated WSDL.
*
* <p>
* {@link Responses#NON_ANONYMOUS} requires the use of only non-anonymous
* responses. It will result into
* wsam:NonAnonymousResponses nested assertion as specified in
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
* 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
*
* @since JAX-WS 2.2
*/
Responses responses() default Responses.ALL;
}

View File

@@ -0,0 +1,277 @@
/*
* Copyright (c) 2005, 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 javax.xml.ws.soap;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Endpoint;
import javax.xml.ws.Service;
/**
* AddressingFeature represents the use of WS-Addressing with either
* the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature
* with any other binding is undefined.
* <p>
* This feature can be used during the creation of SEI proxy, and
* {@link javax.xml.ws.Dispatch} instances on the client side and {@link Endpoint}
* instances on the server side. This feature cannot be used for {@link Service}
* instance creation on the client side.
* <p>
* The following describes the effects of this feature with respect
* to be enabled or disabled:
* <ul>
* <li> ENABLED: In this Mode, WS-Addressing will be enabled. It means
* the endpoint supports WS-Addressing but does not require its use.
* A sender could send messages with WS-Addressing headers or without
* WS-Addressing headers. But a receiver MUST consume both types of
* messages.
* <li> DISABLED: In this Mode, WS-Addressing will be disabled.
* At runtime, WS-Addressing headers MUST NOT be used by a sender or
* receiver.
* </ul>
* <p>
* If the feature is enabled, the <code>required</code> property determines
* whether the endpoint requires WS-Addressing. If it is set true,
* WS-Addressing headers MUST be present on incoming and outgoing messages.
* By default the <code>required</code> property is <code>false</code>.
*
* <p>
* If the web service developer has not explicitly enabled this feature,
* WSDL's wsam:Addressing policy assertion is used to find
* the use of WS-Addressing. By using the feature explicitly, an application
* overrides WSDL's indication of the use of WS-Addressing. In some cases,
* this is really required. For example, if an application has implemented
* WS-Addressing itself, it can use this feature to disable addressing. That
* means a JAX-WS implementation doesn't consume or produce WS-Addressing
* headers.
*
* <p>
* If addressing is enabled, a corresponding wsam:Addressing policy assertion
* must be generated in the WSDL as per
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyassertions">
* 3.1 WS-Policy Assertions</a>
*
* <p>
* <b>Example 1: </b>Possible Policy Assertion in the generated WSDL for
* <code>&#64;Addressing</code>
* <pre>
* &lt;wsam:Addressing wsp:Optional="true">
* &lt;wsp:Policy/>
* &lt;/wsam:Addressing>
* </pre>
*
* <p>
* <b>Example 2: </b>Possible Policy Assertion in the generated WSDL for
* <code>&#64;Addressing(required=true)</code>
* <pre>
* &lt;wsam:Addressing>
* &lt;wsp:Policy/>
* &lt;/wsam:Addressing>
* </pre>
*
* <p>
* <b>Example 3: </b>Possible Policy Assertion in the generated WSDL for
* <code>&#64;Addressing(required=true, responses=Responses.ANONYMOUS)</code>
* <pre>
* &lt;wsam:Addressing>
* &lt;wsp:Policy>
* &lt;wsam:AnonymousResponses/>
* &lt;/wsp:Policy>
* &lt;/wsam:Addressing>
* </pre>
*
* <p>
* See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">
* Web Services Addressing - Core</a>,
* <a href="http://www.w3.org/TR/2006/REC-ws-addr-soap-20060509/">
* Web Services Addressing 1.0 - SOAP Binding</a>,
* and <a href="http://www.w3.org/TR/ws-addr-metadata/">
* Web Services Addressing 1.0 - Metadata</a>
* for more information on WS-Addressing.
*
* @see Addressing
* @since JAX-WS 2.1
*/
public final class AddressingFeature extends WebServiceFeature {
/**
* Constant value identifying the AddressingFeature
*/
public static final String ID = "http://www.w3.org/2005/08/addressing/module";
/**
* If addressing is enabled, this property determines whether the endpoint
* requires WS-Addressing. If required is true, WS-Addressing headers MUST
* be present on incoming and outgoing messages.
*/
// should be private final, keeping original modifier due to backwards compatibility
protected boolean required;
/**
* If addressing is enabled, this property determines if endpoint requires
* the use of only anonymous responses, or only non-anonymous responses, or all.
*
* <p>
* {@link Responses#ALL} supports all response types and this is the default
* value.
*
* <p>
* {@link Responses#ANONYMOUS} requires the use of only anonymous
* responses. It will result into wsam:AnonymousResponses nested assertion
* as specified in
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyanonresponses">
* 3.1.2 AnonymousResponses Assertion</a> in the generated WSDL.
*
* <p>
* {@link Responses#NON_ANONYMOUS} requires the use of only non-anonymous
* responses. It will result into
* wsam:NonAnonymousResponses nested assertion as specified in
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
* 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
*
* @since JAX-WS 2.2
*/
public enum Responses {
/**
* Specifies the use of only anonymous
* responses. It will result into wsam:AnonymousResponses nested assertion
* as specified in
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyanonresponses">
* 3.1.2 AnonymousResponses Assertion</a> in the generated WSDL.
*/
ANONYMOUS,
/**
* Specifies the use of only non-anonymous
* responses. It will result into
* wsam:NonAnonymousResponses nested assertion as specified in
* <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
* 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
*/
NON_ANONYMOUS,
/**
* Supports all response types and this is the default
*/
ALL
}
private final Responses responses;
/**
* Creates and configures an <code>AddressingFeature</code> with the
* use of addressing requirements. The created feature enables
* ws-addressing i.e. supports ws-addressing but doesn't require
* its use. It is also configured to accept all the response types.
*/
public AddressingFeature() {
this(true, false, Responses.ALL);
}
/**
* Creates and configures an <code>AddressingFeature</code> with the
* use of addressing requirements. If <code>enabled</code> is true,
* it enables ws-addressing i.e. supports ws-addressing but doesn't
* require its use. It also configures to accept all the response types.
*
* @param enabled true enables ws-addressing i.e.ws-addressing
* is supported but doesn't require its use
*/
public AddressingFeature(boolean enabled) {
this(enabled, false, Responses.ALL);
}
/**
* Creates and configures an <code>AddressingFeature</code> with the
* use of addressing requirements. If <code>enabled</code> and
* <code>required</code> are true, it enables ws-addressing and
* requires its use. It also configures to accept all the response types.
*
* @param enabled true enables ws-addressing i.e.ws-addressing
* is supported but doesn't require its use
* @param required true means requires the use of ws-addressing .
*/
public AddressingFeature(boolean enabled, boolean required) {
this(enabled, required, Responses.ALL);
}
/**
* Creates and configures an <code>AddressingFeature</code> with the
* use of addressing requirements. If <code>enabled</code> and
* <code>required</code> are true, it enables ws-addressing and
* requires its use. Also, the response types can be configured using
* <code>responses</code> parameter.
*
* @param enabled true enables ws-addressing i.e.ws-addressing
* is supported but doesn't require its use
* @param required true means requires the use of ws-addressing .
* @param responses specifies what type of responses are required
*
* @since JAX-WS 2.2
*/
public AddressingFeature(boolean enabled, boolean required, Responses responses) {
this.enabled = enabled;
this.required = required;
this.responses = responses;
}
/**
* {@inheritDoc}
*/
public String getID() {
return ID;
}
/**
* If addressing is enabled, this property determines whether the endpoint
* requires WS-Addressing. If required is true, WS-Addressing headers MUST
* be present on incoming and outgoing messages.
*
* @return the current required value
*/
public boolean isRequired() {
return required;
}
/**
* If addressing is enabled, this property determines whether endpoint
* requires the use of anonymous responses, or non-anonymous responses,
* or all responses.
*
* <p>
* @return {@link Responses#ALL} when endpoint supports all types of
* responses,
* {@link Responses#ANONYMOUS} when endpoint requires the use of
* only anonymous responses,
* {@link Responses#NON_ANONYMOUS} when endpoint requires the use
* of only non-anonymous responses
*
* @since JAX-WS 2.2
*/
public Responses getResponses() {
return responses;
}
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright (c) 2005, 2010, 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 javax.xml.ws.soap;
import java.lang.annotation.Documented;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.xml.ws.spi.WebServiceFeatureAnnotation;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceProvider;
/**
* This feature represents the use of MTOM with a
* web service.
* <p>
* This annotation MUST only be used in conjunction the
* <code>javax.jws.WebService</code>, {@link WebServiceProvider},
* {@link WebServiceRef} annotations.
* When used with the <code>javax.jws.WebService</code> annotation this
* annotation MUST only be used on the service endpoint implementation
* class.
* When used with a <code>WebServiceRef</code> annotation, this annotation
* MUST only be used when a proxy instance is created. The injected SEI
* proxy, and endpoint MUST honor the values of the <code>MTOM</code>
* annotation.
* <p>
*
* This annotation's behaviour is defined by the corresponding feature
* {@link MTOMFeature}.
*
* @since JAX-WS 2.1
*/
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@WebServiceFeatureAnnotation(id=MTOMFeature.ID,bean=MTOMFeature.class)
public @interface MTOM {
/**
* Specifies if this feature is enabled or disabled.
*/
boolean enabled() default true;
/**
* Property for MTOM threshold value. When MTOM is enabled, binary data above this
* size in bytes will be XOP encoded or sent as attachment. The value of this property
* MUST always be >= 0. Default value is 0.
*/
int threshold() default 0;
}

View File

@@ -0,0 +1,144 @@
/*
* Copyright (c) 2005, 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 javax.xml.ws.soap;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.Endpoint;
import javax.xml.ws.Service;
/**
* This feature represents the use of MTOM with a
* web service.
*
* This feature can be used during the creation of SEI proxy, and
* {@link javax.xml.ws.Dispatch} instances on the client side and {@link Endpoint}
* instances on the server side. This feature cannot be used for {@link Service}
* instance creation on the client side.
*
* <p>
* The following describes the affects of this feature with respect
* to being enabled or disabled:
* <ul>
* <li> ENABLED: In this Mode, MTOM will be enabled. A receiver MUST accept
* both a non-optimized and an optimized message, and a sender MAY send an
* optimized message, or a non-optimized message. The heuristics used by a
* sender to determine whether to use optimization or not are
* implementation-specific.
* <li> DISABLED: In this Mode, MTOM will be disabled
* </ul>
* <p>
* The {@link #threshold} property can be used to set the threshold
* value used to determine when binary data should be XOP encoded.
*
* @since JAX-WS 2.1
*/
public final class MTOMFeature extends WebServiceFeature {
/**
* Constant value identifying the MTOMFeature
*/
public static final String ID = "http://www.w3.org/2004/08/soap/features/http-optimization";
/**
* Property for MTOM threshold value. This property serves as a hint when
* MTOM is enabled, binary data above this size in bytes SHOULD be sent
* as attachment.
* The value of this property MUST always be >= 0. Default value is 0.
*/
// should be changed to private final, keeping original modifier to keep backwards compatibility
protected int threshold;
/**
* Create an <code>MTOMFeature</code>.
* The instance created will be enabled.
*/
public MTOMFeature() {
this.enabled = true;
this.threshold = 0;
}
/**
* Creates an <code>MTOMFeature</code>.
*
* @param enabled specifies if this feature should be enabled or not
*/
public MTOMFeature(boolean enabled) {
this.enabled = enabled;
this.threshold = 0;
}
/**
* Creates an <code>MTOMFeature</code>.
* The instance created will be enabled.
*
* @param threshold the size in bytes that binary data SHOULD be before
* being sent as an attachment.
*
* @throws WebServiceException if threshold is < 0
*/
public MTOMFeature(int threshold) {
if (threshold < 0)
throw new WebServiceException("MTOMFeature.threshold must be >= 0, actual value: "+threshold);
this.enabled = true;
this.threshold = threshold;
}
/**
* Creates an <code>MTOMFeature</code>.
*
* @param enabled specifies if this feature should be enabled or not
* @param threshold the size in bytes that binary data SHOULD be before
* being sent as an attachment.
*
* @throws WebServiceException if threshold is < 0
*/
public MTOMFeature(boolean enabled, int threshold) {
if (threshold < 0)
throw new WebServiceException("MTOMFeature.threshold must be >= 0, actual value: "+threshold);
this.enabled = enabled;
this.threshold = threshold;
}
/**
* {@inheritDoc}
*/
public String getID() {
return ID;
}
/**
* Gets the threshold value used to determine when binary data
* should be sent as an attachment.
*
* @return the current threshold size in bytes
*/
public int getThreshold() {
return threshold;
}
}

View File

@@ -0,0 +1,110 @@
/*
* Copyright (c) 2005, 2011, 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 javax.xml.ws.soap;
import java.util.Set;
import javax.xml.ws.Binding;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.MessageFactory;
/** The <code>SOAPBinding</code> interface is an abstraction for
* the SOAP binding.
*
* @since JAX-WS 2.0
**/
public interface SOAPBinding extends Binding {
/**
* A constant representing the identity of the SOAP 1.1 over HTTP binding.
*/
public static final String SOAP11HTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http";
/**
* A constant representing the identity of the SOAP 1.2 over HTTP binding.
*/
public static final String SOAP12HTTP_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/";
/**
* A constant representing the identity of the SOAP 1.1 over HTTP binding
* with MTOM enabled by default.
*/
public static final String SOAP11HTTP_MTOM_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true";
/**
* A constant representing the identity of the SOAP 1.2 over HTTP binding
* with MTOM enabled by default.
*/
public static final String SOAP12HTTP_MTOM_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true";
/** Gets the roles played by the SOAP binding instance.
*
* @return Set&lt;String> The set of roles played by the binding instance.
**/
public Set<String> getRoles();
/** Sets the roles played by the SOAP binding instance.
*
* @param roles The set of roles played by the binding instance.
* @throws WebServiceException On an error in the configuration of
* the list of roles.
**/
public void setRoles(Set<String> roles);
/**
* Returns <code>true</code> if the use of MTOM is enabled.
*
* @return <code>true</code> if and only if the use of MTOM is enabled.
**/
public boolean isMTOMEnabled();
/**
* Enables or disables use of MTOM.
*
* @param flag A <code>boolean</code> specifying whether the use of MTOM should
* be enabled or disabled.
* @throws WebServiceException If the specified setting is not supported
* by this binding instance.
*
**/
public void setMTOMEnabled(boolean flag);
/**
* Gets the SAAJ <code>SOAPFactory</code> instance used by this SOAP binding.
*
* @return SOAPFactory instance used by this SOAP binding.
**/
public SOAPFactory getSOAPFactory();
/**
* Gets the SAAJ <code>MessageFactory</code> instance used by this SOAP binding.
*
* @return MessageFactory instance used by this SOAP binding.
**/
public MessageFactory getMessageFactory();
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright (c) 2005, 2010, 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 javax.xml.ws.soap;
import javax.xml.soap.SOAPFault;
/** The <code>SOAPFaultException</code> exception represents a
* SOAP 1.1 or 1.2 fault.
*
* <p>A <code>SOAPFaultException</code> wraps a SAAJ <code>SOAPFault</code>
* that manages the SOAP-specific representation of faults.
* The <code>createFault</code> method of
* <code>javax.xml.soap.SOAPFactory</code> may be used to create an instance
* of <code>javax.xml.soap.SOAPFault</code> for use with the
* constructor. <code>SOAPBinding</code> contains an accessor for the
* <code>SOAPFactory</code> used by the binding instance.
*
* <p>Note that the value of <code>getFault</code> is the only part of the
* exception used when searializing a SOAP fault.
*
* <p>Refer to the SOAP specification for a complete
* description of SOAP faults.
*
* @see javax.xml.soap.SOAPFault
* @see javax.xml.ws.soap.SOAPBinding#getSOAPFactory
* @see javax.xml.ws.ProtocolException
*
* @since JAX-WS 2.0
**/
public class SOAPFaultException extends javax.xml.ws.ProtocolException {
private SOAPFault fault;
/** Constructor for SOAPFaultException
* @param fault <code>SOAPFault</code> representing the fault
*
* @see javax.xml.soap.SOAPFactory#createFault
**/
public SOAPFaultException(SOAPFault fault) {
super(fault.getFaultString());
this.fault = fault;
}
/** Gets the embedded <code>SOAPFault</code> instance.
*
* @return <code>javax.xml.soap.SOAPFault</code> SOAP
* fault element
**/
public javax.xml.soap.SOAPFault getFault() {
return this.fault;
}
}