Service svc = client.getEndpoint().getService();
//all SI's should have the same schemas
Collection<SchemaInfo> schemas = svc.getServiceInfos().get(0).getSchemas();
SchemaCompiler compiler;
try {
compiler = JAXBUtils.createSchemaCompiler();
} catch (JAXBException e1) {
throw new IllegalStateException("Unable to create schema compiler", e1);
}
Object elForRun = ReflectionInvokationHandler
.createProxyWrapper(new InnerErrorListener(wsdlUrl),
JAXBUtils.getParamClass(compiler, "setErrorListener"));
compiler.setErrorListener(elForRun);
Object allocator = ReflectionInvokationHandler
.createProxyWrapper(new ClassNameAllocatorImpl(),
JAXBUtils.getParamClass(compiler, "setClassNameAllocator"));
compiler.setClassNameAllocator(allocator);
addSchemas(wsdlUrl, schemas, compiler);
addBindingFiles(bindingFiles, compiler);
S2JJAXBModel intermediateModel = compiler.bind();
JCodeModel codeModel = intermediateModel.generateCode(null, elForRun);
StringBuilder sb = new StringBuilder();
boolean firstnt = false;
for (Iterator<JPackage> packages = codeModel.packages(); packages.hasNext();) {