public void process(JavaModel javaModel, Definition def) {
Map<String, JavaInterface> interfaces = javaModel.getInterfaces();
for (Iterator iter = interfaces.keySet().iterator(); iter.hasNext();) {
String interfaceName = (String)iter.next();
JavaInterface intf = interfaces.get(interfaceName);
JavaAnnotation serviceAnnotation = new JavaAnnotation("WebService");
serviceAnnotation.addArgument("targetNamespace", intf.getNamespace());
serviceAnnotation.addArgument("wsdlLocation", intf.getLocation());
serviceAnnotation.addArgument("name", intf.getWebServiceName());
intf.addAnnotation(serviceAnnotation.toString());
if (def.getBindings().size() == 0) {
return;
}
if (processBinding(intf)) {
JavaAnnotation bindingAnnotation = new JavaAnnotation("SOAPBinding");
String style = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPStyle().toString());
bindingAnnotation.addArgument("style", style, "");
String use = SOAPBindingUtil.getBindingAnnotation(intf.getSOAPUse().toString());
bindingAnnotation.addArgument("use", use, "");
if (intf.getSOAPStyle() == SOAPBinding.Style.DOCUMENT) {
String parameterStyle = SOAPBindingUtil.getBindingAnnotation(intf.
getSOAPParameterStyle().
toString());
bindingAnnotation.addArgument("parameterStyle", parameterStyle, "");
}
intf.addAnnotation(bindingAnnotation.toString());
}
}
}