Examples of processRequest()


Examples of org.jibx.ws.server.Service.processRequest()

                    XmlCodec codec = m_codecCache.getCodec(mediaType);
                    IXMLReader reader = codec.getReader(m_dimeInput, null, m_clientAddress, false);
                    Protocol protocol = ProtocolDirectory.getProtocol(m_sdef.getProtocolName());
                    ServiceFactory serviceFactory = protocol.getServiceFactory();
                    serv = ServicePool.getInstance(serviceFactory, m_sdef);
                    serv.processRequest(new TcpInConnection(m_dimeInput, reader), new TcpOutConnection(codec,
                        serv.getXmlOptions()));
                    if (s_logger.isDebugEnabled()) {
                        s_logger.debug("Completed processing of receive message from " + m_clientAddress);
                    }
                } finally {
View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     */
    public void testProcessRequestReadsSoapHeader() throws Exception {
        m_inbound.setInBytes(TestHeaderObjects.REQUEST_SOAP.getBytes());
        Service service = SoapServiceTestHelper.createSoapServiceWithHandler("findCustomer", "org.jibx.ws.test.locale",
            LocaleUnmarshaller.class);
        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        // assertEquals(false, m_outbound.isInternalServerError());

        // Check the header
View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     * @throws Exception e
     */
    public void testProcessRequestIgnoresEmptySoapHeader() throws Exception {
        m_inbound.setInBytes(SoapMaker.envelope("<SOAP:Header/>", TestObjects.REQUEST_SOAP_BODY).getBytes());
        Service service = SoapServiceTestHelper.createSoapService("findCustomer");
        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        // assertEquals(false, m_outbound.isInternalServerError());

        // Check the body
View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     */
    public void testProcessRequestIgnoresEmptySoapHeader2() throws Exception {
        m_inbound.setInBytes(SoapMaker.envelope("<SOAP:Header></SOAP:Header>", TestObjects.REQUEST_SOAP_BODY)
            .getBytes());
        Service service = SoapServiceTestHelper.createSoapService("findCustomer");
        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        // assertEquals(false, m_outbound.isInternalServerError());

        // Check the body
View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     * @throws Exception e
     */
    public void testProcessRequestCreatesFaultIfHeaderNotUnderstood() throws Exception {
        m_inbound.setInBytes(TestHeaderObjects.REQUEST_SOAP_MUST_UNDERSTAND.getBytes());
        Service service = SoapServiceTestHelper.createSoapService("findCustomer");
        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        assertEquals(true, m_outbound.isInternalServerError());

        String responseXML = new String(m_outbound.getOutBytes());
View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

        m_inbound.setInBytes(TestObjects.REQUEST_SOAP.getBytes());
        // Set the header
        LocaleMarshaller.setLocale(TestHeaderObjects.EN_US);
        Service service = SoapServiceTestHelper.createSoapServiceWithHandler("findCustomer", "org.jibx.ws.test.locale",
            LocaleMarshaller.class);
        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        assertEquals(false, m_outbound.isInternalServerError());

        // Check the response includes the header
View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     * @throws Exception e
     */
    public void testProcessRequestReturnsValidResponseWhenServiceSuccessful() throws Exception {
        Service service = SoapServiceTestHelper.createSoapService("findCustomer");

        service.processRequest(m_inbound, m_outbound);

        String responseXML = new String(m_outbound.getOutBytes());
        XMLAssert.assertXMLEqual(TestObjects.RESPONSE_SOAP, responseXML);
    }

View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     * @throws Exception e
     */
    public void testProcessRequestLogsNoErrorsWhenServiceSuccessful() throws Exception {
        Service service = SoapServiceTestHelper.createSoapService("findCustomer");

        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        assertEquals(false, m_outbound.isInternalServerError());
    }

View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     *
     * @throws Exception e
     */
    public void testProcessRequestReturnsSOAPFaultWhenServiceThrowsException() throws Exception {
        Service service = SoapServiceTestHelper.createSoapService("throwIllegalArgumentException");
        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        assertEquals(true, m_outbound.isInternalServerError());
        String responseXML = new String(m_outbound.getOutBytes());
        XMLAssert.assertXMLEqual(SoapMaker.soapServerFault("Dummy IAE"), responseXML);
View Full Code Here

Examples of org.jibx.ws.server.Service.processRequest()

     *
     * @throws Exception e
     */
    public void testProcessRequestLogsErrorWhenServiceThrowsException() throws Exception {
        Service service = SoapServiceTestHelper.createSoapService("throwIllegalArgumentException");
        service.processRequest(m_inbound, m_outbound);

        assertEquals(false, m_outbound.isNotFoundError());
        assertEquals(true, m_outbound.isInternalServerError());

        // assertEquals("Log size", 1, m_logger.getLogEntries().size());
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.