Package com.sun.xml.ws.api.addressing

Examples of com.sun.xml.ws.api.addressing.WSEndpointReference


        fillCommonAddressingHeaders(headers, packet, av, sv, action, mustUnderstand);

        // wsa:ReplyTo
        // null or "true" is equivalent to request/response MEP
        if (!oneway) {
            WSEndpointReference epr = av.anonymousEpr;
            if (headers.get(av.replyToTag, false) == null) {
              headers.add(epr.createHeader(av.replyToTag));
            }

            // wsa:FaultTo
            if (headers.get(av.faultToTag, false) == null) {
              headers.add(epr.createHeader(av.faultToTag));
            }

            // wsa:MessageID
            if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
                if (headers.get(av.messageIDTag, false) == null) {
View Full Code Here


        if (av == null) {
            throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
        }

        Header h = getFirstHeader(headers, av.faultToTag, true, sv);
        WSEndpointReference faultTo = null;
        if (h != null) {
            try {
                faultTo = h.readAsEPR(av);
            } catch (XMLStreamException e) {
                throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e);
View Full Code Here

        if (av == null) {
            throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
        }

        Header h = getFirstHeader(headers, av.replyToTag, true, sv);
        WSEndpointReference replyTo;
        if (h != null) {
            try {
                replyTo = h.readAsEPR(av);
            } catch (XMLStreamException e) {
                throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
View Full Code Here

            boolean isMessageIdAdded = false;

            // wsa:ReplyTo
            // add if it doesn't already exist and OneWayFeature requests a specific ReplyTo
            if (headers.get(av.replyToTag, false) == null) {
                WSEndpointReference replyToEpr = oneWayFeature.getReplyTo();
                if (replyToEpr != null) {
                    headers.add(replyToEpr.createHeader(av.replyToTag));
                    // add wsa:MessageID only for non-null ReplyTo
                    if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
                        // if header doesn't exist, method getID creates a new random id
                        String newID = oneWayFeature.getMessageId() == null ? Message.generateMessageID() : oneWayFeature.getMessageId();
                        headers.add(new StringHeader(av.messageIDTag, newID));
                        isMessageIdAdded = true;
                    }
                }
            }

            // If the user sets a messageId, use it.
            final String messageId = oneWayFeature.getMessageId();
            if (!isMessageIdAdded && messageId != null) {
                headers.add(new StringHeader(av.messageIDTag, messageId));
            }

            // wsa:FaultTo
            // add if it doesn't already exist and OneWayFeature requests a specific FaultTo
            if (headers.get(av.faultToTag, false) == null) {
                WSEndpointReference faultToEpr = oneWayFeature.getFaultTo();
                if (faultToEpr != null) {
                    headers.add(faultToEpr.createHeader(av.faultToTag));
                    // add wsa:MessageID only for non-null FaultTo
                    if (headers.get(av.messageIDTag, false) == null) {
                        headers.add(new StringHeader(av.messageIDTag, Message.generateMessageID()));
                  }
                }
View Full Code Here

                try {
                    StreamReaderBufferCreator creator = new StreamReaderBufferCreator(new MutableXMLStreamBuffer());
                    XMLStreamBuffer eprbuffer = new XMLStreamBufferMark(port_nsdecl, creator);
                    creator.createElementFragment(reader, false);

                    WSEndpointReference wsepr = new WSEndpointReference(eprbuffer, AddressingVersion.W3C);
                    //wsepr.toSpec().writeTo(new StreamResult(System.out));
                    port.setEPR(wsepr);
                    /** XMLStreamBuffer.createNewBufferFromXMLStreamReader(reader) called from inside WSEndpointReference()
                     *  consumes the complete EPR infoset and moves to the next element. This breaks the normal wsdl parser
                     *  processing where it expects anyone reading the infoset to move to the end of the element that its reading
View Full Code Here

    public RegistrationIF build(){
        if (callbackAddress == null)
            callbackAddress = getDefaultCallbackAddress();
        EndpointReference epr = getEndpointReferenceBuilder().address(callbackAddress).
                referenceParameter(WSCUtil.referenceElementTxId(txId), WSCUtil.referenceElementRoutingInfo()).build();
        WSEndpointReference wsepr = WSEndpointReference.create(epr);
        OneWayFeature oneway = new OneWayFeature(true, wsepr);
        this.feature(oneway);
        return null;
    }
View Full Code Here

                    toCreateSequenceResponseData(verifyResponse(response, messageName, Level.SEVERE));
        }

        if (responseData.getAcceptedSequenceAcksTo() != null) {
            if (!rc.communicator.getDestinationAddress().getURI().toString()
                    .equals(new WSEndpointReference(responseData.getAcceptedSequenceAcksTo()).getAddress())) {
                throw new RxRuntimeException(LocalizationMessages.WSRM_1116_ACKS_TO_NOT_EQUAL_TO_ENDPOINT_DESTINATION(responseData.getAcceptedSequenceAcksTo().toString(), rc.communicator.getDestinationAddress()));
            }
        }

        String outboundSeqId = responseData.getSequenceId();
View Full Code Here

                        Code.Sender);
            }

            final String wsaTo = rc.communicator.getWsaTo(request);
            try {
                requestDestination = new WSEndpointReference(new URI(wsaTo), rc.addressingVersion).toSpec();
            } catch (URISyntaxException e) {
                throw new CreateSequenceRefusedFault(
                        LocalizationMessages.WSRM_1129_INVALID_VALUE_OF_MESSAGE_HEADER("To", "CreateSequence", wsaTo),
                        Code.Sender,
                        e);
View Full Code Here

            return createRequestPacket(message, wsaAction, expectReply);
        }
    }

    private Header createReplyToHeader(String address) {
        WSEndpointReference wsepr = new WSEndpointReference(address, addressingVersion);
        return wsepr.createHeader(addressingVersion.replyToTag);
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.api.addressing.WSEndpointReference

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.