feat(jdk8): move files to new folder to avoid resources compiled.
This commit is contained in:
87
jdkSrc/jdk8/javax/xml/ws/handler/Handler.java
Normal file
87
jdkSrc/jdk8/javax/xml/ws/handler/Handler.java
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.handler;
|
||||
|
||||
import javax.xml.ws.ProtocolException;
|
||||
import javax.xml.ws.handler.MessageContext;
|
||||
|
||||
/** The <code>Handler</code> interface
|
||||
* is the base interface for JAX-WS handlers.
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
**/
|
||||
public interface Handler<C extends MessageContext> {
|
||||
|
||||
/** The <code>handleMessage</code> method is invoked for normal processing
|
||||
* of inbound and outbound messages. Refer to the description of the handler
|
||||
* framework in the JAX-WS specification for full details.
|
||||
*
|
||||
* @param context the message context.
|
||||
* @return An indication of whether handler processing should continue for
|
||||
* the current message
|
||||
* <ul>
|
||||
* <li>Return <code>true</code> to continue
|
||||
* processing.</li>
|
||||
* <li>Return <code>false</code> to block
|
||||
* processing.</li>
|
||||
* </ul>
|
||||
* @throws RuntimeException Causes the JAX-WS runtime to cease
|
||||
* handler processing and generate a fault.
|
||||
* @throws ProtocolException Causes the JAX-WS runtime to switch to
|
||||
* fault message processing.
|
||||
**/
|
||||
public boolean handleMessage(C context);
|
||||
|
||||
/** The <code>handleFault</code> method is invoked for fault message
|
||||
* processing. Refer to the description of the handler
|
||||
* framework in the JAX-WS specification for full details.
|
||||
*
|
||||
* @param context the message context
|
||||
* @return An indication of whether handler fault processing should continue
|
||||
* for the current message
|
||||
* <ul>
|
||||
* <li>Return <code>true</code> to continue
|
||||
* processing.</li>
|
||||
* <li>Return <code>false</code> to block
|
||||
* processing.</li>
|
||||
* </ul>
|
||||
* @throws RuntimeException Causes the JAX-WS runtime to cease
|
||||
* handler fault processing and dispatch the fault.
|
||||
* @throws ProtocolException Causes the JAX-WS runtime to cease
|
||||
* handler fault processing and dispatch the fault.
|
||||
**/
|
||||
public boolean handleFault(C context);
|
||||
|
||||
/**
|
||||
* Called at the conclusion of a message exchange pattern just prior to
|
||||
* the JAX-WS runtime dispatching a message, fault or exception. Refer to
|
||||
* the description of the handler
|
||||
* framework in the JAX-WS specification for full details.
|
||||
*
|
||||
* @param context the message context
|
||||
**/
|
||||
public void close(MessageContext context);
|
||||
}
|
||||
53
jdkSrc/jdk8/javax/xml/ws/handler/HandlerResolver.java
Normal file
53
jdkSrc/jdk8/javax/xml/ws/handler/HandlerResolver.java
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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.handler;
|
||||
|
||||
/**
|
||||
* <code>HandlerResolver</code> is an interface implemented
|
||||
* by an application to get control over the handler chain
|
||||
* set on proxy/dispatch objects at the time of their creation.
|
||||
* <p>
|
||||
* A <code>HandlerResolver</code> may be set on a <code>Service</code>
|
||||
* using the <code>setHandlerResolver</code> method.
|
||||
* <p>
|
||||
* When the runtime invokes a <code>HandlerResolver</code>, it will
|
||||
* pass it a <code>PortInfo</code> object containing information
|
||||
* about the port that the proxy/dispatch object will be accessing.
|
||||
*
|
||||
* @see javax.xml.ws.Service#setHandlerResolver
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
**/
|
||||
public interface HandlerResolver {
|
||||
|
||||
/**
|
||||
* Gets the handler chain for the specified port.
|
||||
*
|
||||
* @param portInfo Contains information about the port being accessed.
|
||||
* @return java.util.List<Handler> chain
|
||||
**/
|
||||
public java.util.List<Handler> getHandlerChain(PortInfo portInfo);
|
||||
}
|
||||
34
jdkSrc/jdk8/javax/xml/ws/handler/LogicalHandler.java
Normal file
34
jdkSrc/jdk8/javax/xml/ws/handler/LogicalHandler.java
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* 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.handler;
|
||||
|
||||
/** The <code>LogicalHandler</code> extends
|
||||
* Handler to provide typesafety for the message context parameter.
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
**/
|
||||
public interface LogicalHandler<C extends LogicalMessageContext> extends Handler<C> {
|
||||
}
|
||||
46
jdkSrc/jdk8/javax/xml/ws/handler/LogicalMessageContext.java
Normal file
46
jdkSrc/jdk8/javax/xml/ws/handler/LogicalMessageContext.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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.handler;
|
||||
|
||||
import javax.xml.ws.LogicalMessage;
|
||||
|
||||
/** The <code>LogicalMessageContext</code> interface extends
|
||||
* <code>MessageContext</code> to
|
||||
* provide access to a the contained message as a protocol neutral
|
||||
* LogicalMessage
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
**/
|
||||
public interface LogicalMessageContext
|
||||
extends MessageContext {
|
||||
|
||||
/** Gets the message from this message context
|
||||
*
|
||||
* @return The contained message; returns <code>null</code> if no
|
||||
* message is present in this message context
|
||||
**/
|
||||
public LogicalMessage getMessage();
|
||||
}
|
||||
205
jdkSrc/jdk8/javax/xml/ws/handler/MessageContext.java
Normal file
205
jdkSrc/jdk8/javax/xml/ws/handler/MessageContext.java
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* 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.handler;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* The interface <code>MessageContext</code> abstracts the message
|
||||
* context that is processed by a handler in the <code>handle</code>
|
||||
* method.
|
||||
*
|
||||
* <p>The <code>MessageContext</code> interface provides methods to
|
||||
* manage a property set. <code>MessageContext</code> properties
|
||||
* enable handlers in a handler chain to share processing related
|
||||
* state.
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
*/
|
||||
public interface MessageContext extends Map<String, Object> {
|
||||
|
||||
/**
|
||||
* Standard property: message direction, <code>true</code> for
|
||||
* outbound messages, <code>false</code> for inbound.
|
||||
* <p>Type: boolean
|
||||
*/
|
||||
public static final String MESSAGE_OUTBOUND_PROPERTY =
|
||||
"javax.xml.ws.handler.message.outbound";
|
||||
|
||||
/**
|
||||
* Standard property: Map of attachments to a message for the inbound
|
||||
* message, key is the MIME Content-ID, value is a DataHandler.
|
||||
* <p>Type: java.util.Map<String,DataHandler>
|
||||
*/
|
||||
public static final String INBOUND_MESSAGE_ATTACHMENTS =
|
||||
"javax.xml.ws.binding.attachments.inbound";
|
||||
|
||||
/**
|
||||
* Standard property: Map of attachments to a message for the outbound
|
||||
* message, key is the MIME Content-ID, value is a DataHandler.
|
||||
* <p>Type: java.util.Map<String,DataHandler>
|
||||
*/
|
||||
public static final String OUTBOUND_MESSAGE_ATTACHMENTS =
|
||||
"javax.xml.ws.binding.attachments.outbound";
|
||||
|
||||
/**
|
||||
* Standard property: input source for WSDL document.
|
||||
* <p>Type: org.xml.sax.InputSource
|
||||
*/
|
||||
public static final String WSDL_DESCRIPTION =
|
||||
"javax.xml.ws.wsdl.description";
|
||||
|
||||
/**
|
||||
* Standard property: name of WSDL service.
|
||||
* <p>Type: javax.xml.namespace.QName
|
||||
*/
|
||||
public static final String WSDL_SERVICE =
|
||||
"javax.xml.ws.wsdl.service";
|
||||
|
||||
/**
|
||||
* Standard property: name of WSDL port.
|
||||
* <p>Type: javax.xml.namespace.QName
|
||||
*/
|
||||
public static final String WSDL_PORT =
|
||||
"javax.xml.ws.wsdl.port";
|
||||
|
||||
/**
|
||||
* Standard property: name of wsdl interface (2.0) or port type (1.1).
|
||||
* <p>Type: javax.xml.namespace.QName
|
||||
*/
|
||||
public static final String WSDL_INTERFACE =
|
||||
"javax.xml.ws.wsdl.interface";
|
||||
|
||||
/**
|
||||
* Standard property: name of WSDL operation.
|
||||
* <p>Type: javax.xml.namespace.QName
|
||||
*/
|
||||
public static final String WSDL_OPERATION =
|
||||
"javax.xml.ws.wsdl.operation";
|
||||
|
||||
/**
|
||||
* Standard property: HTTP response status code.
|
||||
* <p>Type: java.lang.Integer
|
||||
*/
|
||||
public static final String HTTP_RESPONSE_CODE =
|
||||
"javax.xml.ws.http.response.code";
|
||||
|
||||
/**
|
||||
* Standard property: HTTP request headers.
|
||||
* <p>Type: java.util.Map<java.lang.String, java.util.List<java.lang.String>>
|
||||
*/
|
||||
public static final String HTTP_REQUEST_HEADERS =
|
||||
"javax.xml.ws.http.request.headers";
|
||||
|
||||
/**
|
||||
* Standard property: HTTP response headers.
|
||||
* <p>Type: java.util.Map<java.lang.String, java.util.List<java.lang.String>>
|
||||
*/
|
||||
public static final String HTTP_RESPONSE_HEADERS =
|
||||
"javax.xml.ws.http.response.headers";
|
||||
|
||||
/**
|
||||
* Standard property: HTTP request method.
|
||||
* <p>Type: java.lang.String
|
||||
*/
|
||||
public static final String HTTP_REQUEST_METHOD =
|
||||
"javax.xml.ws.http.request.method";
|
||||
|
||||
/**
|
||||
* Standard property: servlet request object.
|
||||
* <p>Type: javax.servlet.http.HttpServletRequest
|
||||
*/
|
||||
public static final String SERVLET_REQUEST =
|
||||
"javax.xml.ws.servlet.request";
|
||||
|
||||
/**
|
||||
* Standard property: servlet response object.
|
||||
* <p>Type: javax.servlet.http.HttpServletResponse
|
||||
*/
|
||||
public static final String SERVLET_RESPONSE =
|
||||
"javax.xml.ws.servlet.response";
|
||||
|
||||
/**
|
||||
* Standard property: servlet context object.
|
||||
* <p>Type: javax.servlet.ServletContext
|
||||
*/
|
||||
public static final String SERVLET_CONTEXT =
|
||||
"javax.xml.ws.servlet.context";
|
||||
|
||||
/**
|
||||
* Standard property: Query string for request.
|
||||
* <p>Type: String
|
||||
**/
|
||||
public static final String QUERY_STRING =
|
||||
"javax.xml.ws.http.request.querystring";
|
||||
|
||||
/**
|
||||
* Standard property: Request Path Info
|
||||
* <p>Type: String
|
||||
*/
|
||||
public static final String PATH_INFO =
|
||||
"javax.xml.ws.http.request.pathinfo";
|
||||
|
||||
/**
|
||||
* Standard property: WS Addressing Reference Parameters.
|
||||
* The list MUST include all SOAP headers marked with the
|
||||
* wsa:IsReferenceParameter="true" attribute.
|
||||
* <p>Type: List<Element>
|
||||
*
|
||||
* @since JAX-WS 2.1
|
||||
*/
|
||||
public static final String REFERENCE_PARAMETERS =
|
||||
"javax.xml.ws.reference.parameters";
|
||||
|
||||
/**
|
||||
* Property scope. Properties scoped as <code>APPLICATION</code> are
|
||||
* visible to handlers,
|
||||
* client applications and service endpoints; properties scoped as
|
||||
* <code>HANDLER</code>
|
||||
* are only normally visible to handlers.
|
||||
*/
|
||||
public enum Scope {APPLICATION, HANDLER};
|
||||
|
||||
/**
|
||||
* Sets the scope of a property.
|
||||
*
|
||||
* @param name Name of the property associated with the
|
||||
* <code>MessageContext</code>
|
||||
* @param scope Desired scope of the property
|
||||
* @throws java.lang.IllegalArgumentException if an illegal
|
||||
* property name is specified
|
||||
*/
|
||||
public void setScope(String name, Scope scope);
|
||||
|
||||
/**
|
||||
* Gets the scope of a property.
|
||||
*
|
||||
* @param name Name of the property
|
||||
* @return Scope of the property
|
||||
* @throws java.lang.IllegalArgumentException if a non-existant
|
||||
* property name is specified
|
||||
*/
|
||||
public Scope getScope(String name);
|
||||
}
|
||||
66
jdkSrc/jdk8/javax/xml/ws/handler/PortInfo.java
Normal file
66
jdkSrc/jdk8/javax/xml/ws/handler/PortInfo.java
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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.handler;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* The <code>PortInfo</code> interface is used by a
|
||||
* <code>HandlerResolver</code> to query information about
|
||||
* the port it is being asked to create a handler chain for.
|
||||
* <p>
|
||||
* This interface is never implemented by an application,
|
||||
* only by a JAX-WS implementation.
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
**/
|
||||
public interface PortInfo {
|
||||
|
||||
/**
|
||||
* Gets the qualified name of the WSDL service name containing
|
||||
* the port being accessed.
|
||||
*
|
||||
* @return javax.xml.namespace.QName The qualified name of the WSDL service.
|
||||
**/
|
||||
public QName getServiceName();
|
||||
|
||||
/**
|
||||
* Gets the qualified name of the WSDL port being accessed.
|
||||
*
|
||||
* @return javax.xml.namespace.QName The qualified name of the WSDL port.
|
||||
**/
|
||||
public QName getPortName();
|
||||
|
||||
/**
|
||||
* Gets the URI identifying the binding used by the port being accessed.
|
||||
*
|
||||
* @return String The binding identifier for the port.
|
||||
*
|
||||
* @see javax.xml.ws.Binding
|
||||
**/
|
||||
public String getBindingID();
|
||||
|
||||
}
|
||||
49
jdkSrc/jdk8/javax/xml/ws/handler/soap/SOAPHandler.java
Normal file
49
jdkSrc/jdk8/javax/xml/ws/handler/soap/SOAPHandler.java
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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.handler.soap;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.ws.handler.Handler;
|
||||
import java.util.Set;
|
||||
|
||||
/** The <code>SOAPHandler</code> class extends <code>Handler</code>
|
||||
* to provide typesafety for the message context parameter and add a method
|
||||
* to obtain access to the headers that may be processed by the handler.
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
**/
|
||||
public interface SOAPHandler<T extends SOAPMessageContext>
|
||||
extends Handler<T> {
|
||||
|
||||
/** Gets the header blocks that can be processed by this Handler
|
||||
* instance.
|
||||
*
|
||||
* @return Set of <code>QNames</code> of header blocks processed by this
|
||||
* handler instance. <code>QName</code> is the qualified
|
||||
* name of the outermost element of the Header block.
|
||||
**/
|
||||
Set<QName> getHeaders();
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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.handler.soap;
|
||||
|
||||
import javax.xml.soap.SOAPMessage;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.namespace.QName;
|
||||
import java.util.Set;
|
||||
|
||||
/** The interface <code>SOAPMessageContext</code>
|
||||
* provides access to the SOAP message for either RPC request or
|
||||
* response. The <code>javax.xml.soap.SOAPMessage</code> specifies
|
||||
* the standard Java API for the representation of a SOAP 1.1 message
|
||||
* with attachments.
|
||||
*
|
||||
* @see javax.xml.soap.SOAPMessage
|
||||
*
|
||||
* @since JAX-WS 2.0
|
||||
**/
|
||||
public interface SOAPMessageContext
|
||||
extends javax.xml.ws.handler.MessageContext {
|
||||
|
||||
/** Gets the <code>SOAPMessage</code> from this message context. Modifications
|
||||
* to the returned <code>SOAPMessage</code> change the message in-place, there
|
||||
* is no need to subsequently call <code>setMessage</code>.
|
||||
*
|
||||
* @return Returns the <code>SOAPMessage</code>; returns <code>null</code> if no
|
||||
* <code>SOAPMessage</code> is present in this message context
|
||||
**/
|
||||
public SOAPMessage getMessage();
|
||||
|
||||
/** Sets the SOAPMessage in this message context
|
||||
*
|
||||
* @param message SOAP message
|
||||
* @throws WebServiceException If any error during the setting
|
||||
* of the <code>SOAPMessage</code> in this message context
|
||||
* @throws java.lang.UnsupportedOperationException If this
|
||||
* operation is not supported
|
||||
**/
|
||||
public void setMessage(SOAPMessage message);
|
||||
|
||||
/** Gets headers that have a particular qualified name from the message in the
|
||||
* message context. Note that a SOAP message can contain multiple headers
|
||||
* with the same qualified name.
|
||||
*
|
||||
* @param header The XML qualified name of the SOAP header(s).
|
||||
* @param context The JAXBContext that should be used to unmarshall the
|
||||
* header
|
||||
* @param allRoles If <code>true</code> then returns headers for all SOAP
|
||||
* roles, if <code>false</code> then only returns headers targetted
|
||||
* at the roles currently being played by this SOAP node, see
|
||||
* <code>getRoles</code>.
|
||||
* @return An array of unmarshalled headers; returns an empty array if no
|
||||
* message is present in this message context or no headers match
|
||||
* the supplied qualified name.
|
||||
* @throws WebServiceException If an error occurs when using the supplied
|
||||
* <code>JAXBContext</code> to unmarshall. The cause of
|
||||
* the <code>WebServiceException</code> is the original <code>JAXBException</code>.
|
||||
**/
|
||||
public Object[] getHeaders(QName header, JAXBContext context,
|
||||
boolean allRoles);
|
||||
|
||||
/** Gets the SOAP actor roles associated with an execution
|
||||
* of the handler chain.
|
||||
* Note that SOAP actor roles apply to the SOAP node and
|
||||
* are managed using {@link javax.xml.ws.soap.SOAPBinding#setRoles} and
|
||||
* {@link javax.xml.ws.soap.SOAPBinding#getRoles}. <code>Handler</code> instances in
|
||||
* the handler chain use this information about the SOAP actor
|
||||
* roles to process the SOAP header blocks. Note that the
|
||||
* SOAP actor roles are invariant during the processing of
|
||||
* SOAP message through the handler chain.
|
||||
*
|
||||
* @return Array of <code>String</code> for SOAP actor roles
|
||||
**/
|
||||
public Set<String> getRoles();
|
||||
}
|
||||
Reference in New Issue
Block a user