Java Code Examples for com.sun.xml.internal.ws.handler.HandlerChainsModel#parseHandlerFile()

The following examples show how to use com.sun.xml.internal.ws.handler.HandlerChainsModel#parseHandlerFile() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DeploymentDescriptorParser.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}
 
Example 2
Source File: DeploymentDescriptorParser.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}
 
Example 3
Source File: DeploymentDescriptorParser.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}
 
Example 4
Source File: DeploymentDescriptorParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}
 
Example 5
Source File: DeploymentDescriptorParser.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}
 
Example 6
Source File: DeploymentDescriptorParser.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}
 
Example 7
Source File: DeploymentDescriptorParser.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}
 
Example 8
Source File: DeploymentDescriptorParser.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Parses the handler and role information and sets it
 * on the {@link WSBinding}.
 *
 * @return true if <handler-chains> element present in DD
 *         false otherwise.
 */
protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {

    if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
            !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
        return false;
    }

    HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
            reader, classLoader, serviceName, portName, binding);

    binding.setHandlerChain(handlerInfo.getHandlers());
    if (binding instanceof SOAPBinding) {
        ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
    }

    // move past </handler-chains>
    XMLStreamReaderUtil.nextContent(reader);
    return true;
}