Package com.sun.xml.ws.rx.mc.protocol.wsmc200702

Examples of com.sun.xml.ws.rx.mc.protocol.wsmc200702.ExtensibleUri


    synchronized void scheduleMcRequest() {
        scheduledMcRequestCounter++;
    }

    private void sendMcRequest() {
        Packet mcRequest = communicator.createRequestPacket(new MakeConnectionElement(wsmcAnonymousAddress), configuration.getRuntimeVersion().protocolVersion.wsmcAction, true);
        McClientTube.setMcAnnonymousHeaders(
                mcRequest.getMessage().getHeaders(),
                configuration.getAddressingVersion(),
                wsmcAnnonymousReplyToHeader,
                wsmcAnnonymousFaultToHeader);
View Full Code Here


    private NextAction handleMakeConnectionRequest(Packet request, String clientUID) {
        try {
            LOGGER.entering();

            MakeConnectionElement mcElement;
            try {
                mcElement = request.getMessage().readPayloadAsJAXB(configuration.getRuntimeVersion().getUnmarshaller(configuration.getAddressingVersion()));
            } catch (JAXBException ex) {
                throw LOGGER.logSevereException(new RxRuntimeException(LocalizationMessages.WSMC_0107_ERROR_UNMARSHALLING_PROTOCOL_MESSAGE(), ex));
            }

            if (mcElement.getAddress() == null) {
                // WS-I RSP v1.0: R2102   If a wsmc:MakeConnection request does not contain a wsmc:Address child element
                // (in violation of R2100), the MC-RECEIVER MUST generate a wsmc:MissingSelection fault.
                return super.doReturnWith(createSoapFaultResponse(
                        request,
                        configuration.getSoapVersion(),
                        configuration.getAddressingVersion(),
                        configuration.getRuntimeVersion().protocolVersion.wsmcFaultAction,
                        configuration.getSoapVersion().faultCodeServer,
                        configuration.getRuntimeVersion().protocolVersion.missingSelectionFaultCode,
                        "The MakeConnection element did not contain any selection criteria.",
                        null));
            }

            if (!mcElement.getAny().isEmpty()) {
                // WS-I RSP v1.0: R2103 If a wsmc:MakeConnection request contains a wsrm:Identifier element
                // (in violation of R2101) the MC-RECEIVER MUST generate a wsmc:UnsupportedSelection fault.
                List<SoapFaultDetailEntry> unsupportedSelections = new ArrayList<SoapFaultDetailEntry>(mcElement.getAny().size());
                for (Object element : mcElement.getAny()) {
                    if (element instanceof Node) {
                        Node selectionNode = ((Node) element);
                        unsupportedSelections.add(new SoapFaultDetailEntry(
                                configuration.getRuntimeVersion().protocolVersion.unsupportedSelectionFaultCode,
                                new QName(selectionNode.getNamespaceURI(), selectionNode.getLocalName()).toString()));
                    }
                }

                return super.doReturnWith(createSoapFaultResponse(
                        request,
                        configuration.getSoapVersion(),
                        configuration.getAddressingVersion(),
                        configuration.getRuntimeVersion().protocolVersion.wsmcFaultAction,
                        configuration.getSoapVersion().faultCodeServer,
                        configuration.getRuntimeVersion().protocolVersion.unsupportedSelectionFaultCode,
                        "The extension element used in the message selection is not supported by the MakeConnection receiver.",
                        unsupportedSelections));
            }

            String selectionUID = configuration.getRuntimeVersion().getClientId(mcElement.getAddress().getValue());

            if (selectionUID == null) {
                // TODO return a MissingSelection SOAP fault
                throw LOGGER.logSevereException(new RxRuntimeException(LocalizationMessages.WSMC_0108_NULL_SELECTION_ADDRESS()));
            }
View Full Code Here

                Message message = response.getMessage();
                if (message != null) {
                    MessageHeaders headers = message.getHeaders();
                    headers.add(Headers.create(
                            configuration.getRuntimeVersion().getJaxbContext(configuration.getAddressingVersion()),
                            new MessagePendingElement(Boolean.valueOf(selectionUID != null && responseStorage.hasPendingResponse(selectionUID)))));
                }
            }

            return super.doReturnWith(response);
        } finally {
View Full Code Here

    protected final void processMakeConnectionHeaders(@NotNull Message responseMessage) throws RxRuntimeException {
        assert responseMessage != null;

        // process WS-MC header
        if (responseMessage.hasHeaders()) {
            MessagePendingElement messagePendingHeader = readHeaderAsUnderstood(responseMessage, configuration.getRuntimeVersion().protocolVersion.messagePendingHeaderName);
            if (messagePendingHeader != null && messagePendingHeader.isPending()) {
                mcSenderTask.scheduleMcRequest();
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.rx.mc.protocol.wsmc200702.ExtensibleUri

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.