Examples of MessageInformationHeaders


Examples of org.apache.axis2.addressing.MessageInformationHeaders

        try {
            StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder(
                    testFileName);

            SOAPHeader header = ((SOAPEnvelope) omBuilder.getDocumentElement()).getHeader();
            MessageInformationHeaders messageInformationHeaders =
                    inHandler.extractCommonAddressingParameters(header,
                            null,
                            header.getHeaderBlocksWithNSURI(
                                    AddressingConstants.Submission.WSA_NAMESPACE),
                            AddressingConstants.Submission.WSA_NAMESPACE);

            if (messageInformationHeaders == null) {
                fail(
                        "Addressing Information Headers have not been retrieved properly");
            }
            assertEquals("action header is not correct",
                    messageInformationHeaders.getAction(),
                    action);
            assertEquals("action header is not correct",
                    messageInformationHeaders.getMessageId().trim(),
                    messageID.trim());

            assertFromEPR(messageInformationHeaders.getFrom());

        } catch (Exception e) {
            log.info(e.getMessage());
            fail(" An Exception has occured " + e.getMessage());
        }
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

        try {
            StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder(
                    wsaFinalTestFile);
            inHandler.addressingNamespace = AddressingConstants.Final.WSA_NAMESPACE;
            SOAPHeader header = ((SOAPEnvelope) omBuilder.getDocumentElement()).getHeader();
            MessageInformationHeaders messageInformationHeaders =
                    inHandler.extractCommonAddressingParameters(header,
                            null,
                            header.getHeaderBlocksWithNSURI(
                                    AddressingConstants.Final.WSA_NAMESPACE),
                            AddressingConstants.Final.WSA_NAMESPACE);
            assertNotNull(messageInformationHeaders);
            assertNotNull(messageInformationHeaders.getTo());
            assertNotNull(messageInformationHeaders.getTo().getReferenceParameters());
            AnyContentType referenceParameters = messageInformationHeaders.getTo().getReferenceParameters();
            QName qName = new QName("http://ws.apache.org/namespaces/axis2", "ParamOne", "axis2");
            assertNotNull(referenceParameters.getReferenceValue(qName));

        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

        MessageContext newmsgCtx =
                new MessageContext(inMessageContext.getConfigurationContext(),
                        inMessageContext.getSessionContext(),
                        inMessageContext.getTransportIn(),
                        inMessageContext.getTransportOut());
        MessageInformationHeaders oldMessageInfoHeaders =
                inMessageContext.getMessageInformationHeaders();
        newmsgCtx.setMessageID(UUIDGenerator.getUUID());
        newmsgCtx.setTo(oldMessageInfoHeaders.getReplyTo());
        newmsgCtx.setFaultTo(
                oldMessageInfoHeaders.getFaultTo());
        newmsgCtx.setFrom(oldMessageInfoHeaders.getTo());
        newmsgCtx.setRelatesTo(
                new org.apache.axis2.addressing.RelatesTo(oldMessageInfoHeaders.getMessageId(),
                        AddressingConstants.Submission.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE));
        newmsgCtx.setWSAAction(oldMessageInfoHeaders.getAction());
        newmsgCtx.setOperationContext(inMessageContext.getOperationContext());
        newmsgCtx.setServiceContext(inMessageContext.getServiceContext());
        newmsgCtx.setProperty(MessageContext.TRANSPORT_OUT,
                inMessageContext.getProperty(MessageContext.TRANSPORT_OUT));
        newmsgCtx.setProperty(HTTPConstants.HTTPOutTransportInfo,
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

        MessageInformationHeaders messageInformationHeaders,
        ArrayList addressingHeaders,
        String addressingNamespace)
        throws AddressingException {
        if (messageInformationHeaders == null) {
            messageInformationHeaders = new MessageInformationHeaders();
        }

        Iterator addressingHeadersIt = addressingHeaders.iterator();
        while (addressingHeadersIt.hasNext()) {
            SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) addressingHeadersIt.next();
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

        if (sessionContext == null) {
            this.sessionContext = new SessionContext(null);
        } else {
            this.sessionContext = sessionContext;
        }
        messageInformationHeaders = new MessageInformationHeaders();
        this.transportIn = transportIn;
        this.transportOut = transportOut;
        this.configurationContext = engineContext;

    }
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

                                messgeCtx.getSessionContext(),
                                messgeCtx.getTransportIn(),
                                messgeCtx.getTransportOut());
                   
                    newmsgCtx.setMessageInformationHeaders(
                            new MessageInformationHeaders());
                    MessageInformationHeaders oldMessageInfoHeaders =
                            messgeCtx.getMessageInformationHeaders();
                    MessageInformationHeaders messageInformationHeaders =
                            new MessageInformationHeaders();
                    messageInformationHeaders.setTo(oldMessageInfoHeaders.getReplyTo());
                    messageInformationHeaders.setFaultTo(
                            oldMessageInfoHeaders.getFaultTo());
                    messageInformationHeaders.setFrom(oldMessageInfoHeaders.getTo());
                    messageInformationHeaders.setRelatesTo(
                            new RelatesTo(oldMessageInfoHeaders.getMessageId(),
                                    AddressingConstants.Submission.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE));
                    newmsgCtx.setMessageInformationHeaders(messageInformationHeaders);
                    newmsgCtx.setOperationContext(messgeCtx.getOperationContext());
                    newmsgCtx.setServiceContext(messgeCtx.getServiceContext());
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

        try {
            StAXSOAPModelBuilder omBuilder = testUtil.getOMBuilder(
                    testFileName);

            SOAPHeader header = ((SOAPEnvelope) omBuilder.getDocumentElement()).getHeader();
            MessageInformationHeaders messageInformationHeaders =
                    inHandler.extractCommonAddressingParameters(header,
                            null,
                            header.getHeaderBlocksWithNSURI(
                                    AddressingConstants.Submission.WSA_NAMESPACE),
                            AddressingConstants.Submission.WSA_NAMESPACE);

            if (messageInformationHeaders == null) {
                fail(
                        "Addressing Information Headers have not been retrieved properly");
            }
            assertEquals("action header is not correct",
                    messageInformationHeaders.getAction(),
                    action);
            assertEquals("action header is not correct",
                    messageInformationHeaders.getMessageId(),
                    messageID);

            assertFromEPR(messageInformationHeaders.getFrom());

        } catch (Exception e) {
            log.info(e.getMessage());
            fail(" An Exception has occured " + e.getMessage());
        }
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

    protected TransportOutDescription senderTransport;


    public InOnlyMEPClient(ServiceContext service) {
        super(service, WSDLConstants.MEP_URI_IN_ONLY);
        messageInformationHeaders = new MessageInformationHeaders();
    }
View Full Code Here

Examples of org.apache.axis2.addressing.MessageInformationHeaders

                        messgeCtx.getSessionContext(),
                        messgeCtx.getTransportIn(),
                        messgeCtx.getTransportOut());

        newmsgCtx.setMessageInformationHeaders(
                new MessageInformationHeaders());
        MessageInformationHeaders oldMessageInfoHeaders =
                messgeCtx.getMessageInformationHeaders();
        MessageInformationHeaders messageInformationHeaders =
                new MessageInformationHeaders();
        messageInformationHeaders.setTo(oldMessageInfoHeaders.getReplyTo());
        messageInformationHeaders.setFaultTo(
                oldMessageInfoHeaders.getFaultTo());
        messageInformationHeaders.setFrom(oldMessageInfoHeaders.getTo());
        messageInformationHeaders.setRelatesTo(
                new RelatesTo(oldMessageInfoHeaders.getMessageId(),
                        AddressingConstants.Submission.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE));
        newmsgCtx.setMessageInformationHeaders(messageInformationHeaders);
        newmsgCtx.setOperationContext(messgeCtx.getOperationContext());
        newmsgCtx.setServiceContext(messgeCtx.getServiceContext());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.