protected void generateFaults(GenerationContext context, OperationInfo op, JMethod method)
throws GenerationException
{
for (Iterator itr = op.getFaults().iterator(); itr.hasNext();)
{
FaultInfo faultInfo = (FaultInfo) itr.next();
//List messageParts = faultInfo.getMessageParts();
/*if (messageParts.size() > 1)
{
throw new GenerationException("Operation " + op.getName() + " has a fault " + faultInfo.getName() +
" with multiple parts. This is not supported at this time.");
}*/
JClass exCls = getExceptionClass(context, faultInfo);
if (exCls == null)
throw new GenerationException("Could not find generated " +
"fault class for " + faultInfo.getName() + "!");
if( faultInfo.getDocumentation()!= null){
JCommentPart commentPart = method.javadoc().addThrows(exCls);
commentPart.add(faultInfo.getDocumentation());
}
method._throws(exCls);
}