本文整理汇总了Java中org.apache.xmlbeans.XmlException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java XmlException.getMessage方法的具体用法?Java XmlException.getMessage怎么用?Java XmlException.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.xmlbeans.XmlException
的用法示例。
在下文中一共展示了XmlException.getMessage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processTaskAction
import org.apache.xmlbeans.XmlException; //导入方法依赖的package包/类
protected void processTaskAction(String messageString) throws ActivityException {
ActionRequestDocument message;
try {
message = ActionRequestDocument.Factory.parse(messageString,
Compatibility.namespaceOptions());
}
catch (XmlException e) {
throw new ActivityException(-1, e.getMessage(), e);
}
String compCode = null;
String taskAction = TaskAction.COMPLETE;
for (Parameter param : message.getActionRequest().getAction().getParameterList()) {
if (param.getName().equals("Action"))
taskAction = param.getStringValue();
}
Process proc = getProcessDefinition();
if (proc.isEmbeddedExceptionHandler()) {
this.setProcessInstanceCompletionCode(taskAction);
compCode = null;
}
else {
if (taskAction.equals(TaskAction.CANCEL))
compCode = WorkStatus.STATUSNAME_CANCELLED + "::";
else if (taskAction.equals(TaskAction.ABORT))
compCode = WorkStatus.STATUSNAME_CANCELLED + "::" + EventType.EVENTNAME_ABORT;
else if (taskAction.equals(TaskAction.COMPLETE))
compCode = null;
else
compCode = taskAction;
}
this.setReturnCode(compCode);
// old code set activity instance to CANCELED when task action is
// Cancel; shall we do that?
}
示例2: realToObject
import org.apache.xmlbeans.XmlException; //导入方法依赖的package包/类
public Object realToObject(String str) throws TranslationException {
try {
XmlObject xmlBean = XmlObject.Factory.parse(str, xmlOptions);
return xmlBean;
}
catch (XmlException e) {
throw new TranslationException(e.getMessage(), e);
}
}
示例3: fromDomNode
import org.apache.xmlbeans.XmlException; //导入方法依赖的package包/类
public Object fromDomNode(Node domNode) throws TranslationException {
try {
return XmlObject.Factory.parse(domNode);
}
catch (XmlException ex) {
throw new TranslationException(ex.getMessage(), ex);
}
}