當前位置: 首頁>>代碼示例>>Java>>正文


Java AxisFault.getMessage方法代碼示例

本文整理匯總了Java中org.apache.axis2.AxisFault.getMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java AxisFault.getMessage方法的具體用法?Java AxisFault.getMessage怎麽用?Java AxisFault.getMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.axis2.AxisFault的用法示例。


在下文中一共展示了AxisFault.getMessage方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testJmsResponse

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
@Test(groups = { "wso2.esb" }, description = "Test Sending message to a jms endpoint and check for response")
public void testJmsResponse() throws Exception {
	try {
		axis2Client.sendSimpleStockQuoteRequest(getMainSequenceURL(),
				null, "IBM");
		
	} catch (AxisFault fault) {
		String errMsg=fault.getMessage();						
		Assert.assertEquals(errMsg,"Send timeout", "JMS Client did not receive Send timeout");			
		
		LogViewerClient cli = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());
		LogEvent[] logs = cli.getAllSystemLogs();
		Assert.assertNotNull(logs, "No logs found");
		Assert.assertTrue(logs.length > 0, "No logs found");
		boolean errorMsgTrue = Utils.checkForLogsWithPriority(cli,"ERROR", logLine0, 10);
		Assert.assertTrue(errorMsgTrue, "Axis Fault Did not receive");
	}
}
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:19,代碼來源:ESBJAVA2824MissingResponseTestCase.java

示例2: capp1DeploymentAndServiceInvocation

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
@Test(groups = {"wso2.esb"}, description = "Test Car with Mediator deployment and invocation")
public void capp1DeploymentAndServiceInvocation() throws Exception {

    Assert.assertTrue(esbUtils.isProxyDeployed(context.getContextUrls().getBackEndUrl(), getSessionCookie(),
                                               proxyName)
            , "Proxy service deployment failed");

    OMElement response = null;
    try {
        response = axis2Client.sendCustomQuoteRequest(
                getProxyServiceURLHttp(proxyName),
                null,
                "WSO2");
    } catch (AxisFault axisFault) {
        throw new Exception("Service Invocation Failed > " + axisFault.getMessage(), axisFault);
    }
    Assert.assertNotNull(response, "Response message null");
    Assert.assertTrue(response.toString().contains("MEDIATOR1"),
                      "MEDIATOR1 element not found in response message");

}
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:22,代碼來源:ClassMediatorCarTestCase.java

示例3: capp2DeploymentAndServiceInvocation

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
@Test(groups = {"wso2.esb"}, description = "Test Car with Mediator hot deployment"
                    , dependsOnMethods = {"uploadCar2Test"})
public void capp2DeploymentAndServiceInvocation() throws Exception {

    Assert.assertTrue(esbUtils.isProxyDeployed(context.getContextUrls().getBackEndUrl(), getSessionCookie(),
                                               proxyName)
            , "Proxy service deployment failed");

    OMElement response = null;
    try {
        response = axis2Client.sendCustomQuoteRequest(
                getProxyServiceURLHttp(proxyName),
                null,
                "WSO2");
    } catch (AxisFault axisFault) {
        throw new Exception("Service Invocation Failed > " + axisFault.getMessage(), axisFault);
    }
    Assert.assertNotNull(response, "Response message null");
    Assert.assertTrue(response.toString().contains("MEDIATOR2"),
                      "MEDIATOR2 element not found in response message");

}
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:23,代碼來源:ClassMediatorCarTestCase.java

示例4: artifactDeploymentAndServiceInvocation

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
@Test(groups = {"wso2.esb"}, description = "test endpoint deployment from car file")
public void artifactDeploymentAndServiceInvocation() throws Exception {
    Assert.assertTrue(esbUtils.isEndpointDeployed(context.getContextUrls().getBackEndUrl(), getSessionCookie(), "stockQuoteServiceEndpoint")
            , "AddressEndpoint Endpoint deployment failed");
    Assert.assertTrue(esbUtils.isProxyDeployed(context.getContextUrls().getBackEndUrl(), getSessionCookie(), "xsltTransformationProxy")
            , "Pass Through Proxy service deployment failed");
    Assert.assertTrue(isResourceExist("/_system/config/transform.xslt"), "transform.xslt not found on registry");
    Assert.assertTrue(isResourceExist("/_system/config/transform_back.xslt"), "transform.xslt not found on registry");

    OMElement response = null;
    try {
        response = axis2Client.sendCustomQuoteRequest(
                getProxyServiceURLHttp("xsltTransformationProxy"),
                null,
                "XSLTTransformation");
    } catch (AxisFault axisFault) {
        throw new Exception("Service Invocation Failed > " + axisFault.getMessage(), axisFault);
    }
    Assert.assertNotNull(response, "Response message null");
    Assert.assertTrue(response.toString().contains("Code"), "Code element not found in response message");
    Assert.assertTrue(response.toString().contains("XSLTTransformation"), "Symbol not found on the response message");

}
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:24,代碼來源:XSLTTransformationCarTestCase.java

示例5: AARServiceUploaderClient

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
public AARServiceUploaderClient(String backEndUrl, String sessionCookie) throws AxisFault {

        String endPoint = backEndUrl + serviceName;
        try {
            serviceUploaderStub = new ServiceUploaderStub(endPoint);
            AuthenticateStub.authenticateStub(sessionCookie, serviceUploaderStub);
        } catch (AxisFault axisFault) {
            log.error("ServiceUploaderStub Initialization fail " + axisFault.getMessage());
            throw new AxisFault("ServiceUploaderStub Initialization fail " + axisFault.getMessage());
        }
    }
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:12,代碼來源:AARServiceUploaderClient.java

示例6: InfoServiceAdminClient

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
public InfoServiceAdminClient(String backEndUrl, String sessionCookie)
        throws RegistryException, AxisFault {
    String serviceName = "InfoAdminService";
    String endPoint = backEndUrl + serviceName;
    try {
        infoAdminServiceStub = new InfoAdminServiceStub(endPoint);
        AuthenticateStub.authenticateStub(sessionCookie, infoAdminServiceStub);
    } catch (AxisFault axisFault) {
        log.error("infoAdminServiceStub Initialization fail " + axisFault.getMessage());
        throw new AxisFault("infoAdminServiceStub Initialization fail " + axisFault.getMessage());
    }

}
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:14,代碼來源:InfoServiceAdminClient.java

示例7: sendRequest

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
public static void sendRequest(String eprUrl, String operation, String payload,
                               int numberOfInstances, List<String> expectedStrings,
                               boolean twoWay) throws Exception {
    waitForServiceDeployment(eprUrl);
    assertFalse(!AxisServiceClientUtils.isServiceAvailable(eprUrl));

    for (int i = 0; i < numberOfInstances; i++) {
        try {
            EndpointReference epr = new EndpointReference(eprUrl + "/" + operation);
            if (twoWay) {
                OMElement result = AxisServiceClientUtils.sendRequest(payload, epr);
                if (expectedStrings != null) {
                    for (String expectedString : expectedStrings) {
                        assertFalse(!result.toString()
                                .contains(expectedString));
                    }
                }
            } else {
                AxisServiceClientUtils.sendRequestOneWay(payload, epr);
            }
        } catch (XMLStreamException e) {
            log.error(e);
            throw new XMLStreamException("cannot read xml stream " + e);
        } catch (AxisFault axisFault) {
            log.error(axisFault.getMessage());
            throw new AxisFault("cannot read xml stream " + axisFault.getMessage());
        }
    }
}
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:30,代碼來源:AxisServiceClientUtils.java

示例8: testMakeFaultForConnectionTimeoutResponse

import org.apache.axis2.AxisFault; //導入方法依賴的package包/類
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.STANDALONE })
@Test(groups = "wso2.esb",
      description = "Test Error response created via makefault is never sent to the client "
              + "when the error connection timeout occurs by closing the TCP mon connection")
public void testMakeFaultForConnectionTimeoutResponse() {
    try {
        axis2Client.sendSimpleStockQuoteRequest(getProxyServiceURLHttp("ESBJAVA4394simpleStockPassthrough"), null, "WSO2");
    } catch (AxisFault axisFault) {
        /**
         * since we are making a soap fault in the configuration axis2 client receives axis fault.
         */
        String axisFaultMessage = axisFault.getMessage();
        assertTrue(axisFaultMessage.contains("101508"));
    }
}
 
開發者ID:wso2,項目名稱:product-ei,代碼行數:16,代碼來源:ESBJAVA4394.java


注:本文中的org.apache.axis2.AxisFault.getMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。