本文整理汇总了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");
}
}
示例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");
}
示例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");
}
示例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");
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
}
示例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"));
}
}