|| collector.containSeiClass(packageName, className)
|| collector.containExceptionClass(packageName, className);
}
private void processService(JavaModel model) throws ToolException {
JavaServiceClass sclz = new JavaServiceClass(model);
String name = NameUtil.mangleNameToClassName(service.getName().getLocalPart());
String namespace = service.getName().getNamespaceURI();
String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
//customizing
JAXWSBinding serviceBinding = null;
if (service.getDescription() != null) {
serviceBinding = service.getDescription().getExtensor(JAXWSBinding.class);
}
JAXWSBinding serviceBinding2 = service.getExtensor(JAXWSBinding.class);
//TODO : Handle service customized class
if (serviceBinding != null) {
if (serviceBinding.getPackage() != null) {
jaxwsBinding.setPackage(serviceBinding.getPackage());
}
if (serviceBinding.isEnableAsyncMapping()) {
jaxwsBinding.setEnableAsyncMapping(true);
}
if (serviceBinding.isEnableMime()) {
jaxwsBinding.setEnableMime(true);
}
jaxwsBinding.setEnableWrapperStyle(serviceBinding.isEnableWrapperStyle());
if (serviceBinding.getJaxwsClass() != null
&& serviceBinding.getJaxwsClass().getClassName() != null) {
name = serviceBinding.getJaxwsClass().getClassName();
sclz.setClassJavaDoc(serviceBinding.getJaxwsClass().getComments());
}
sclz.setPackageJavaDoc(serviceBinding.getPackageJavaDoc());
}
if (serviceBinding2 != null) {
if (serviceBinding2.getPackage() != null) {
jaxwsBinding.setPackage(serviceBinding2.getPackage());
}
if (serviceBinding2.isEnableAsyncMapping()) {
jaxwsBinding.setEnableAsyncMapping(true);
}
if (serviceBinding2.isEnableMime()) {
jaxwsBinding.setEnableMime(true);
}
if (serviceBinding2.isEnableWrapperStyle()) {
jaxwsBinding.setEnableWrapperStyle(true);
}
if (serviceBinding2.getJaxwsClass() != null
&& serviceBinding2.getJaxwsClass().getClassName() != null) {
name = serviceBinding2.getJaxwsClass().getClassName();
sclz.setClassJavaDoc(serviceBinding2.getJaxwsClass().getComments());
}
if (!serviceBinding2.getPackageJavaDoc().equals("")) {
sclz.setPackageJavaDoc(serviceBinding2.getPackageJavaDoc());
}
}
sclz.setServiceName(service.getName().getLocalPart());
sclz.setNamespace(namespace);
if (jaxwsBinding.getPackage() != null) {
packageName = jaxwsBinding.getPackage();
}
sclz.setPackageName(packageName);
while (isNameCollision(packageName, name)) {
name = name + "_Service";
}
sclz.setName(name);
if (model.getServiceClasses().containsKey(name)) {
sclz = model.getServiceClasses().get(name);
}
Element handler = (Element)context.get(ToolConstants.HANDLER_CHAIN);
sclz.setHandlerChains(handler);
Collection<EndpointInfo> ports = service.getEndpoints();
for (EndpointInfo port : ports) {
JavaPort javaport = processPort(model, port);
sclz.addPort(javaport);
}
sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
model.addServiceClass(name, sclz);
}