Map<String, String> overlayConversions = new HashMap<String, String>();
String clientNamespace = this.rpcModuleNamespace + ".client";
conversions.put(this.rpcModuleNamespace, clientNamespace);
overlayConversions.put(this.rpcModuleNamespace, clientNamespace + ".json");
if (!this.enforceNamespaceConformance) {
TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) {
for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
if (!isFacetExcluded(ei)) {
String pckg = ei.getPackage().getQualifiedName();
if (!pckg.startsWith(this.rpcModuleNamespace) && !conversions.containsKey(pckg)) {
conversions.put(pckg, clientNamespace + "." + pckg);
}
for (WebMethod webMethod : ei.getWebMethods()) {
for (WebFault webFault : webMethod.getWebFaults()) {
allFaults.add(webFault);
}
}
}
}
}
for (WebFault webFault : allFaults) {
if (!isFacetExcluded(webFault)) {
String pckg = webFault.getPackage().getQualifiedName();
if (!pckg.startsWith(this.rpcModuleNamespace) && !conversions.containsKey(pckg) && (getKnownGwtModule(webFault) == null)) {
conversions.put(pckg, clientNamespace + "." + pckg);
}
}
}
for (SchemaInfo schemaInfo : model.getNamespacesToSchemas().values()) {
for (TypeDefinition typeDefinition : schemaInfo.getTypeDefinitions()) {
if (!isFacetExcluded(typeDefinition)) {
String pckg = typeDefinition.getPackage().getQualifiedName();
if (!pckg.startsWith(this.rpcModuleNamespace) && !conversions.containsKey(pckg)) {
if (getKnownGwtModule(typeDefinition) == null) {
conversions.put(pckg, clientNamespace + "." + pckg);
}
overlayConversions.put(pckg, clientNamespace + ".json." + pckg);
}
}
}
}
}
ClientClassnameForMethod classnameFor = new ClientClassnameForMethod(conversions);
classnameFor.setJdk15(true);
OverlayClientClassnameForMethod overlayClassnameFor = new OverlayClientClassnameForMethod(overlayConversions);
overlayClassnameFor.setJdk15(true);
model.put("packageFor", new ClientPackageForMethod(conversions));
model.put("overlayPackageFor", new ClientPackageForMethod(overlayConversions));
model.put("isAccessorOfTypeLong", new IsAccessorOfTypeLongMethod());
model.put("classnameFor", classnameFor);
model.put("overlayClassnameFor", overlayClassnameFor);
model.put("simpleNameFor", new SimpleNameWithParamsMethod(classnameFor));
model.put("overlaySimpleNameFor", new SimpleNameWithParamsMethod(overlayClassnameFor));
model.put("gwtSubcontext", getGwtSubcontext());
model.put("accessorOverridesAnother", new AccessorOverridesAnotherMethod());
model.setFileOutputDirectory(clientSideGenerateDir);
Properties gwt2jaxbMappings = new Properties();
TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator());
Set<String> importedModules = new TreeSet<String>();
if (isGenerateRPCSupport()) {
debug("Generating the GWT endpoints...");
for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) {