本文整理汇总了Java中org.apache.axis.AxisFault.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java AxisFault.printStackTrace方法的具体用法?Java AxisFault.printStackTrace怎么用?Java AxisFault.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis.AxisFault
的用法示例。
在下文中一共展示了AxisFault.printStackTrace方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendEtsiReq
import org.apache.axis.AxisFault; //导入方法依赖的package包/类
private static EtsiResponse sendEtsiReq(EtsiClient client, EtsiRequest req, XAdESResponseHandler handler) {
try {
client.call(req, handler);
EtsiResponse resp = req.waitForResponse();
return resp;
} catch (AxisFault af) {
System.out.println("Got a SOAP fault:");
af.printStackTrace();
} catch (Exception e) {
System.out.println("Got an Exception:");
e.printStackTrace();
}
return null;
}
示例2: main
import org.apache.axis.AxisFault; //导入方法依赖的package包/类
/**
* The main method
* @param args
*/
public static void main(final String[] args) {
String msisdn = "+35847001001";
if (args.length > 0) {
msisdn = args[0];
}
// Load config
MssConf conf = MssConf.fromPropertyFile("conf/examples.conf");
// Create client
RegistrationClient client = new RegistrationClient(conf);
MregRequest request = new MregRequest("GetMobileUser");
request.setTargetMsisdn(msisdn);
// Send MReg request
try {
MregResponse response = client.send(request);
System.out.println("CODE: " + response.getStatusCode());
System.out.println("MSG : " + response.getStatusMessage());
System.out.println();
for (MregParam param : response.getParameters()) {
System.out.println(" " + param.getName() + ": " + param.getValue());
}
} catch (AxisFault af) {
System.out.println("Got a SOAP fault:");
af.printStackTrace();
} catch (IOException ioe) {
System.out.println("Got an IOException:");
ioe.printStackTrace();
}
}
示例3: main
import org.apache.axis.AxisFault; //导入方法依赖的package包/类
/**
* The main method
* @param args
*/
public static void main(final String[] args) {
// Load config
MssConf conf = MssConf.fromPropertyFile("conf/examples.conf");
// Create client
RegistrationClient client = new RegistrationClient(conf);
MregRequest request = new MregRequest("ListMobileUsers");
// Send MReg request
try {
MregResponse response = client.send(request);
System.out.println("CODE: " + response.getStatusCode());
System.out.println("MSG : " + response.getStatusMessage());
System.out.println();
for (String group : response.getGroupNames()) {
System.out.println("GROUP: " + group);
for (MregParam param : response.getGroup(group)) {
System.out.println(" " + param.getName() + ": " + param.getValue());
}
}
} catch (AxisFault af) {
System.out.println("Got a SOAP fault:");
af.printStackTrace();
} catch (IOException ioe) {
System.out.println("Got an IOException:");
ioe.printStackTrace();
}
}
示例4: onFault
import org.apache.axis.AxisFault; //导入方法依赖的package包/类
/**
* @see org.apache.axis.handlers.BasicHandler#onFault(org.apache.axis.MessageContext)
*/
@Override
public void onFault(MessageContext msgContext) {
try {
invoke(msgContext);
} catch (AxisFault e) {
System.err.println("Error while trying to log: "+e);
e.printStackTrace();
}
}