Package org.jibx.ws.server

Examples of org.jibx.ws.server.Service


     * logs no errors when the service completes successfully.
     *
     * @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


     * returns a SOAPFault when the service throws an exception.
     *
     * @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

     * logs the fault when the service throws an exception.
     *
     * @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

    public void givenWsdlFileInServiceDefinition_SoapServiceShouldBeConfiguredWithInputStreamWsdlProvider()
            throws Exception {
        ServiceDefinition sdef = new ServiceDefinition();
        sdef.setOperationDefinitions(Collections.EMPTY_LIST);
        sdef.setWsdlFilepath(WSDL_FILE_PATH);
        Service soapService = SoapProtocol.SOAP1_1.getServiceFactory().createInstance(sdef);
        assertThat(soapService.getWsdlProvider(), instanceOf(InputStreamWsdlProvider.class));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ((InputStreamWsdlProvider)soapService.getWsdlProvider()).writeWSDL(baos, null);
        String wsdl = FileUtils.readFileToString(new File(WSDL_FILE_PATH));
        assertThat(baos.toString(), is(wsdl));
    }
View Full Code Here

            throws Exception {
        ServiceDefinition sdef = new ServiceDefinition();
        sdef.setOperationDefinitions(Collections.EMPTY_LIST);
        sdef.setWsdlFilepath(WSDL_FILE_PATH);
        sdef.setWsdlLocationTransform(true);
        Service soapService = SoapProtocol.SOAP1_1.getServiceFactory().createInstance(sdef);
        assertThat(soapService.getWsdlProvider(), instanceOf(WsdlLocationToRequestUrlAdapter.class));
    }
View Full Code Here

TOP

Related Classes of org.jibx.ws.server.Service

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.