本文整理匯總了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);
}
}