Examples of InContext


Examples of org.jibx.ws.context.InContext

            m_outCtx = new OutContext();
            if (getBodyWriter() != null) {
                m_outCtx.setBodyWriter(getBodyWriter());
            }

            m_inCtx = new InContext();
            if (getBodyReader() != null) {
                m_inCtx.setBodyReader(getBodyReader());
            }
            m_processor = (PoxProcessor) PoxProtocol.INSTANCE.createProcessor(ExchangeContext.createOutInExchange(
                m_outCtx, m_inCtx));
View Full Code Here

Examples of org.jibx.ws.context.InContext

     * @param sdef the service definition
     * @return exchange context based on the service definition
     * @throws WsException on error creating exchange context, for example handler object cannot be created
     */
    private ExchangeContext createExchangeContext(ServiceDefinition sdef) throws WsException {
        InContext inCtx = new InContext();
        OutContext outCtx = new OutContext();

        createBodyHandlers(inCtx, outCtx);
        createHeaderHandlers(sdef, outCtx, inCtx);
        setContextOnTransportOptions(inCtx, outCtx);
View Full Code Here

Examples of org.jibx.ws.context.InContext

            throw new IllegalStateException("No message context available for receiving message");
        }
        if (m_exchangeCtx.getCurrentMessageContext().isOutbound()) {
            throw new IllegalStateException("Cannot receive message when current message context is outbound");
        }
        InContext context = (InContext) m_exchangeCtx.getCurrentMessageContext();

        try {
            conn.init();
            if (conn.hasError()) {
                throw new WsTransportException(conn.getErrorMessage());
            }
            logger.debug("Starting receive message");
            context.invokeBodyReader(conn.getReader());
            if (context.getBody() == null) {
                throw new WsException("No handlers could be found for unmarshalling the body payload");
            }
            logger.debug("Message received");
        } finally {
            conn.inputComplete();
View Full Code Here

Examples of org.jibx.ws.context.InContext

            throw new IllegalStateException("No message context available for receiving message");
        }
        if (m_exchangeCtx.getCurrentMessageContext().isOutbound()) {
            throw new IllegalStateException("Cannot receive message when current message context is outbound");
        }
        InContext context = (InContext) m_exchangeCtx.getCurrentMessageContext();

        SoapReader soapReader = new SoapReader(conn);

        try {
            logger.debug("Starting receive message");
            soapReader.startMessage();
            IXMLReader xmlReader = soapReader.getReader();
   
            if (soapReader.hasHeaders()) {
                readSoapHeaders(xmlReader, context);
                soapReader.endHeader();
            }

            soapReader.startBody();
            if (soapReader.hasNonEmptyBody()) {
                if (soapReader.isBodyFault()) {
                    // Handle SOAP Faults. Will need changes for SOAP 1.2
                    SoapFault fault = soapReader.startFault();
                    if (soapReader.startFaultDetail()) {
                        readSoapFaultDetail(xmlReader, context, fault);
                        soapReader.endFaultDetail();
                    }
                    soapReader.endFault();
                    context.setBody(fault);
                } else {
                    // Handle SOAP body
                    context.invokeBodyReader(xmlReader);
                    if (context.getBody() == null) {
                        throw new WsException("No handlers could be found for unmarshalling the SOAP body payload");
                    }
                }
            }
            soapReader.endBody();
View Full Code Here

Examples of org.jibx.ws.context.InContext

                }
            }
            if (getBodyWriter() != null) {
                m_outCtx.setBodyWriter(getBodyWriter());
            }
            m_inCtx = new InContext();
            if (m_inHeaderHandlers != null) {
                for (Iterator iter = m_inHeaderHandlers.iterator(); iter.hasNext();) {
                    InHandler handler = (InHandler) iter.next();
                    m_inCtx.addHandler(SoapPhase.HEADER, handler);
                }
View Full Code Here

Examples of org.jibx.ws.context.InContext

     *
     * @return exchange context based on the service definition
     * @throws WsException on error creating exchange context, for example handler object cannot be created
     */
    private ExchangeContext createExchangeContext() throws WsException {
        InContext inCtx = new InContext();
        OutContext outCtx = new OutContext();

        createBodyHandlers(inCtx, outCtx);
        setContextOnTransportOptions(inCtx, outCtx);

View Full Code Here

Examples of org.jibx.ws.context.InContext

    private InContext m_inCtx;

    protected void setUp() throws Exception {
        StubbedChannel.getInstance().close();
        UnmarshallingPayloadReader inBodyHandler = new UnmarshallingPayloadReader(Customer.class);
        m_inCtx = new InContext();
        m_inCtx.setBodyReader(inBodyHandler);
    }
View Full Code Here

Examples of org.jibx.ws.context.InContext

        m_outBodyHandler = new MarshallingPayloadWriter(Person.class);
        OutContext outCtx = new OutContext();
        outCtx.setBodyWriter(m_outBodyHandler);

        UnmarshallingPayloadReader inBodyHandler = new UnmarshallingPayloadReader(Customer.class);
        InContext inCtx = new InContext();
        inCtx.setBodyReader(inBodyHandler);

        m_processor = (SoapProcessor) SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createOutInExchange(outCtx, inCtx));
    }
View Full Code Here

Examples of org.jibx.ws.context.InContext

        m_outBodyHandler = new MarshallingPayloadWriter(Person.class);
        OutContext outCtx = new OutContext();
        outCtx.setBodyWriter(m_outBodyHandler);

        UnmarshallingPayloadReader inBodyHandler = new UnmarshallingPayloadReader(Customer.class);
        m_inCtx = new InContext();
        m_inCtx.setBodyReader(inBodyHandler);
        m_OutInProcessor = (SoapProcessor) SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createOutInExchange(outCtx, m_inCtx));
        m_InOnlyProcessor = (SoapProcessor) SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
    }
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.