Java Code Examples for com.sun.xml.internal.ws.api.message.MessageHeaders#add()

The following examples show how to use com.sun.xml.internal.ws.api.message.MessageHeaders#add() . 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: Stub.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 2
Source File: Stub.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 3
Source File: Stub.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 4
Source File: Stub.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 5
Source File: Stub.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 6
Source File: Stub.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 7
Source File: Stub.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 8
Source File: Stub.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
Example 9
Source File: WSEndpointReference.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}
 
Example 10
Source File: WSEndpointReference.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}
 
Example 11
Source File: WSEndpointReference.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}
 
Example 12
Source File: WSEndpointReference.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}
 
Example 13
Source File: WSEndpointReference.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}
 
Example 14
Source File: WSEndpointReference.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}
 
Example 15
Source File: WSEndpointReference.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}
 
Example 16
Source File: WSEndpointReference.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Copies all the reference parameters in this EPR as headers
 * to the given {@link MessageHeaders}.
 */
public void addReferenceParametersToList(MessageHeaders outbound) {
    for (Header header : referenceParameters) {
        outbound.add(header);
    }
}