本文整理了Java中org.codehaus.enunciate.contract.jaxws.WebFault.isImplicitSchemaElement()
方法的一些代码示例,展示了WebFault.isImplicitSchemaElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebFault.isImplicitSchemaElement()
方法的具体详情如下:
包路径:org.codehaus.enunciate.contract.jaxws.WebFault
类名称:WebFault
方法名:isImplicitSchemaElement
[英]This web fault defines an implicit schema element if it does not have an explicit fault bean.
[中]如果web fault没有显式fault bean,它将定义一个隐式模式元素。
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* If this is an implicit fault bean, return the child elements.
*
* @return The child elements of the bean, or null if none.
*/
public Collection<ImplicitChildElement> getChildElements() {
if (!isImplicitSchemaElement()) {
return Collections.emptyList();
}
Collection<ImplicitChildElement> childElements = new ArrayList<ImplicitChildElement>();
for (PropertyDeclaration property : getAllProperties(this)) {
String propertyName = property.getPropertyName();
if (("cause".equals(propertyName)) || ("localizedMessage".equals(propertyName)) || ("stackTrace".equals(propertyName))) {
continue;
}
childElements.add(new FaultBeanChildElement(property));
}
return childElements;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* Gets the target namespace of the implicit fault bean, or null if this web fault defines
* an explicit fault info bean.
*
* @return the target namespace of the implicit fault bean, or null.
*/
public String getTargetNamespace() {
String targetNamespace = null;
if (isImplicitSchemaElement()) {
if (annotation != null) {
targetNamespace = annotation.targetNamespace();
}
if ((targetNamespace == null) || ("".equals(targetNamespace))) {
targetNamespace = calculateNamespaceURI();
}
}
return targetNamespace;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* Gets the target namespace of the implicit fault bean, or null if this web fault defines
* an explicit fault info bean.
*
* @return the target namespace of the implicit fault bean, or null.
*/
public String getTargetNamespace() {
String targetNamespace = null;
if (isImplicitSchemaElement()) {
if (annotation != null) {
targetNamespace = annotation.targetNamespace();
}
if ((targetNamespace == null) || ("".equals(targetNamespace))) {
targetNamespace = calculateNamespaceURI();
}
}
return targetNamespace;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* The element name of the implicit web fault bean, or null if this isn't an implicit web fault.
*
* @return The element name of the implicit web fault, or null.
*/
public String getElementName() {
String name = null;
if (isImplicitSchemaElement()) {
name = getSimpleName();
if ((annotation != null) && (annotation.name() != null) && (!"".equals(annotation.name()))) {
name = annotation.name();
}
}
return name;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* The element name of the implicit web fault bean, or null if this isn't an implicit web fault.
*
* @return The element name of the implicit web fault, or null.
*/
public String getElementName() {
String name = null;
if (isImplicitSchemaElement()) {
name = getSimpleName();
if ((annotation != null) && (annotation.name() != null) && (!"".equals(annotation.name()))) {
name = annotation.name();
}
}
return name;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
if (!isImplicitSchemaElement()) {
return Collections.emptyList();
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* Adds any type definitions referenced by a web fault.
*
* @param webFault The web fault.
*/
protected void addReferencedTypeDefinitions(WebFault webFault) {
if (webFault.isImplicitSchemaElement()) {
for (ImplicitChildElement childElement : webFault.getChildElements()) {
WebFault.FaultBeanChildElement fbce = (WebFault.FaultBeanChildElement) childElement;
REFERENCE_STACK.get().addFirst("property " + fbce.getProperty().getSimpleName());
addReferencedTypeDefinitions(fbce.isAdapted() ? fbce.getAdapterType() : fbce.getType());
REFERENCE_STACK.get().removeFirst();
}
}
else {
REFERENCE_STACK.get().addFirst("explicit fault bean");
ClassType faultBeanType = webFault.getExplicitFaultBeanType();
if (faultBeanType != null) {
addReferencedTypeDefinitions(faultBeanType);
}
REFERENCE_STACK.get().removeFirst();
}
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-core
/**
* The qualified name of the implicit fault bean of this web fault, or null if this web fault
* does not define an implicit faul bean.
*
* @return The qualified name of the implicit fault bean of this web fault.
*/
public String getImplicitFaultBeanQualifiedName() {
String faultBean = null;
if (isImplicitSchemaElement()) {
faultBean = getPackage().getQualifiedName() + ".jaxws." + getSimpleName() + "Bean";
if ((annotation != null) && (annotation.faultBean() != null) && (!"".equals(annotation.faultBean()))) {
faultBean = annotation.faultBean();
}
}
return faultBean;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* The qualified name of the implicit fault bean of this web fault, or null if this web fault
* does not define an implicit faul bean.
*
* @return The qualified name of the implicit fault bean of this web fault.
*/
public String getImplicitFaultBeanQualifiedName() {
String faultBean = null;
if (isImplicitSchemaElement()) {
faultBean = getPackage().getQualifiedName() + ".jaxws." + getSimpleName() + "Bean";
if ((annotation != null) && (annotation.faultBean() != null) && (!"".equals(annotation.faultBean()))) {
faultBean = annotation.faultBean();
}
}
return faultBean;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-jaxws
/**
* Validates a web fault.
*
* @param webFault The web fault to validate.
* @param alreadyVisited The bean names that have alrady been visited.
* @return The validation result.
*/
public ValidationResult validateWebFault(WebFault webFault, Set<String> alreadyVisited) {
AnnotationProcessorEnvironment ape = Context.getCurrentEnvironment();
ValidationResult result = new ValidationResult();
if (webFault.isImplicitSchemaElement()) {
String faultBeanFQN = webFault.getImplicitFaultBeanQualifiedName();
if (!alreadyVisited.add(faultBeanFQN)) {
result.addError(webFault, faultBeanFQN + " conflicts with another generated bean name. Please use the @WebFault annotation " +
"to customize the fault bean name.");
}
else if (ape.getTypeDeclaration(faultBeanFQN) != null) {
result.addError(webFault, faultBeanFQN + " is an existing class. Either move it, or customize the fault bean name with the " +
"@WebFault annotation.");
}
}
return result;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
/**
* Validates a web fault.
*
* @param webFault The web fault to validate.
* @param alreadyVisited The bean names that have alrady been visited.
* @return The validation result.
*/
public ValidationResult validateWebFault(WebFault webFault, Set<String> alreadyVisited) {
AnnotationProcessorEnvironment ape = Context.getCurrentEnvironment();
ValidationResult result = new ValidationResult();
if (webFault.isImplicitSchemaElement()) {
String faultBeanFQN = webFault.getImplicitFaultBeanQualifiedName();
if (!alreadyVisited.add(faultBeanFQN)) {
result.addError(webFault.getPosition(), faultBeanFQN + " conflicts with another generated bean name. Please use the @WebFault annotation " +
"to customize the fault bean name.");
}
else if (ape.getTypeDeclaration(faultBeanFQN) != null) {
result.addError(webFault.getPosition(), faultBeanFQN + " is an existing class. Either move it, or customize the fault bean name with the " +
"@WebFault annotation.");
}
}
return result;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
processTemplate(responseBeanTemplate, model);
else if ((webMessage instanceof WebFault) && ((WebFault) webMessage).isImplicitSchemaElement() && visitedFaults.add((WebFault) webMessage)) {
model.put("message", webMessage);
processTemplate(faultBeanTemplate, model);
代码示例来源:origin: org.codehaus.enunciate/enunciate-jaxws
processTemplate(responseBeanTemplate, model);
else if ((webMessage instanceof WebFault) && ((WebFault) webMessage).isImplicitSchemaElement() && visitedFaults.add((WebFault) webMessage)) {
model.put("message", webMessage);
processTemplate(faultBeanTemplate, model);
if (fault.isImplicitSchemaElement() && visitedFaults.add(fault)) {
model.put("message", fault);
processTemplate(faultBeanTemplate, model);
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
boolean implicit = webFault.isImplicitSchemaElement();
String faultBean = implicit ? getBeanName(classnameFor, webFault.getImplicitFaultBeanQualifiedName()) : classnameFor.convert(webFault.getExplicitFaultBean());
String faultElementName = webFault.isImplicitSchemaElement() ? webFault.getElementName() : webFault.getExplicitFaultBean().getName();
String faultElementNamespace = webFault.isImplicitSchemaElement() ? webFault.getTargetNamespace() : webFault.getExplicitFaultBean().getNamespace();
this.generatedAnnotations.fault2WebFault.put(faultClass, new WebFaultAnnotation(faultElementName, faultElementNamespace, faultBean, implicit));
if (superFault != null && allFaults.containsKey(superFault.getQualifiedName()) && allFaults.get(superFault.getQualifiedName()).isImplicitSchemaElement()) {
model.put("superFault", allFaults.get(superFault.getQualifiedName()));
if (superFault != null && allFaults.containsKey(superFault.getQualifiedName()) && allFaults.get(superFault.getQualifiedName()).isImplicitSchemaElement()) {
model.put("superFault", allFaults.get(superFault.getQualifiedName()));
代码示例来源:origin: org.codehaus.enunciate/enunciate-xfire-client
boolean implicit = webFault.isImplicitSchemaElement();
String faultBean = implicit ? getBeanName(classnameFor, webFault.getImplicitFaultBeanQualifiedName()) : classnameFor.convert(webFault.getExplicitFaultBeanType());
if (superFault != null && allFaults.containsKey(superFault.getQualifiedName()) && allFaults.get(superFault.getQualifiedName()).isImplicitSchemaElement()) {
model.put("superFault", allFaults.get(superFault.getQualifiedName()));
if (superFault != null && allFaults.containsKey(superFault.getQualifiedName()) && allFaults.get(superFault.getQualifiedName()).isImplicitSchemaElement()) {
model.put("superFault", allFaults.get(superFault.getQualifiedName()));
代码示例来源:origin: org.codehaus.enunciate/enunciate-java-client
boolean implicit = webFault.isImplicitSchemaElement();
String faultBean = implicit ? getBeanName(classnameFor, webFault.getImplicitFaultBeanQualifiedName()) : classnameFor.convert(webFault.getExplicitFaultBeanType());
seeAlsos.add(faultBean);
if (superFault != null && allFaults.containsKey(superFault.getQualifiedName()) && allFaults.get(superFault.getQualifiedName()).isImplicitSchemaElement()) {
model.put("superFault", allFaults.get(superFault.getQualifiedName()));
内容来源于网络,如有侵权,请联系作者删除!