本文整理匯總了Java中org.apache.cxf.helpers.ServiceUtils類的典型用法代碼示例。如果您正苦於以下問題:Java ServiceUtils類的具體用法?Java ServiceUtils怎麽用?Java ServiceUtils使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ServiceUtils類屬於org.apache.cxf.helpers包,在下文中一共展示了ServiceUtils類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: shouldValidate
import org.apache.cxf.helpers.ServiceUtils; //導入依賴的package包/類
protected boolean shouldValidate(Message m) {
// add by jirunfang ---start
boolean result = ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, m);
Object validateRes = m.getContextualProperty("schema-validation-response-enabled");
String str = validateRes != null ? validateRes.toString() : "";
// add by jirunfang ---end
return !"false".equalsIgnoreCase(str) && result;
}
示例2: setSchemaInMessage
import org.apache.cxf.helpers.ServiceUtils; //導入依賴的package包/類
private void setSchemaInMessage(Message message, XMLStreamReader reader) throws XMLStreamException {
if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message)) {
StaxValidationManager mgr = bus.getExtension(StaxValidationManager.class);
if (mgr != null) {
mgr.setupValidation(reader, service);
}
}
}
示例3: setOperationSchemaValidation
import org.apache.cxf.helpers.ServiceUtils; //導入依賴的package包/類
protected void setOperationSchemaValidation(Message message) {
SchemaValidationType validationType = ServiceUtils.getSchemaValidationType(message);
message.put(Message.SCHEMA_VALIDATION_ENABLED, validationType);
}