use of com.webcohesion.enunciate.modules.jaxb.model.ImplicitChildElement in project enunciate by stoicflame.
the class JaxwsModule method addReferencedTypeDefinitions.
protected void addReferencedTypeDefinitions(WebFault webFault, LinkedList<Element> contextStack) {
contextStack.push(webFault);
try {
if (webFault.isImplicitSchemaElement()) {
for (ImplicitChildElement childElement : webFault.getChildElements()) {
WebFault.FaultBeanChildElement fbce = (WebFault.FaultBeanChildElement) childElement;
this.jaxbModule.getJaxbContext().addReferencedTypeDefinitions(fbce.isAdapted() ? fbce.getAdapterType() : fbce.getType(), contextStack);
}
} else {
DeclaredType faultBeanType = webFault.getExplicitFaultBeanType();
if (faultBeanType != null) {
this.jaxbModule.getJaxbContext().addReferencedTypeDefinitions(faultBeanType, contextStack);
}
}
} catch (RuntimeException e) {
if (e.getClass().getName().endsWith("CompletionFailure")) {
throw new CompletionFailureException(contextStack, e);
}
throw e;
} finally {
contextStack.pop();
}
}
use of com.webcohesion.enunciate.modules.jaxb.model.ImplicitChildElement in project enunciate by stoicflame.
the class WebFault method getChildElements.
/**
* 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();
}
Set<ImplicitChildElement> childElements = new TreeSet<ImplicitChildElement>(new Comparator<ImplicitChildElement>() {
public int compare(ImplicitChildElement o1, ImplicitChildElement o2) {
return o1.getElementName().compareTo(o2.getElementName());
}
});
for (PropertyElement property : getAllFaultProperties(this)) {
String propertyName = property.getPropertyName();
if (("cause".equals(propertyName)) || ("localizedMessage".equals(propertyName)) || ("stackTrace".equals(propertyName)) || "suppressed".equals(propertyName)) {
continue;
}
childElements.add(new FaultBeanChildElement(property, this, context.getJaxbContext()));
}
return childElements;
}
Aggregations