{
setCurrentService(service);
if (!isWritten(context));
ServiceInfo serviceInfo = service.getServiceInfo();
String clsName = getClassName(context, service);
log.info("Creating class " + clsName);
File classFile = new File(context.getOutputDirectory(), clsName.replace('.', File.separatorChar) + ".java");
if (classFile.exists() && !overwriteClass(context, service, clsName, classFile))
{
return;
}
JDefinedClass jc = context.getCodeModel()._class(clsName, getClassType());
SchemaSupport schema = context.getSchemaGenerator();
String documentation = service.getServiceInfo().getDocumentation();
if( documentation != null ){
jc.javadoc().add(documentation);
}
annotate(context, service, jc, binding);
// Process operations
for (Iterator itr = serviceInfo.getOperations().iterator(); itr.hasNext();)
{
OperationInfo op = (OperationInfo) itr.next();
JType returnType = getReturnType(context, schema, op);