com.sun.tools.xjc.api.ErrorListener Java Examples

The following examples show how to use com.sun.tools.xjc.api.ErrorListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WSDLImporter.java    From activiti6-boot2 with Apache License 2.0 6 votes vote down vote up
/**
 * Import the Types from the WSDL definition using the same strategy that Cxf uses taking advantage of JAXB
 */
protected void importTypes(Types types) {
  SchemaCompiler compiler = XJC.createSchemaCompiler();
  ErrorListener elForRun = new ConsoleErrorReporter();
  compiler.setErrorListener(elForRun);

  Element rootTypes = this.getRootTypes();
  this.createDefaultStructures(rootTypes);

  S2JJAXBModel intermediateModel = this.compileModel(types, compiler, rootTypes);
  Collection<? extends Mapping> mappings = intermediateModel.getMappings();

  for (Mapping mapping : mappings) {
    this.importStructure(mapping);
  }
}
 
Example #2
Source File: WSDLImporter.java    From flowable-engine with Apache License 2.0 6 votes vote down vote up
/**
 * Import the Types from the WSDL definition using the same strategy that Cxf uses taking advantage of JAXB
 */
protected void importTypes(Types types) {
    SchemaCompiler compiler = XJC.createSchemaCompiler();
    ErrorListener elForRun = new ConsoleErrorReporter();
    compiler.setErrorListener(elForRun);

    Element rootTypes = this.getRootTypes();
    this.createDefaultStructures(rootTypes);

    S2JJAXBModel intermediateModel = this.compileModel(types, compiler, rootTypes);
    Collection<? extends Mapping> mappings = intermediateModel.getMappings();

    for (Mapping mapping : mappings) {
        this.importStructure(mapping);
    }
}
 
Example #3
Source File: CxfWSDLImporter.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
protected void importTypes(Types types) {
  SchemaCompiler compiler = XJC.createSchemaCompiler();
  ErrorListener elForRun = new ConsoleErrorReporter();
  compiler.setErrorListener(elForRun);

  SchemaImpl impl = (SchemaImpl) types.getExtensibilityElements().get(0);
  
  S2JJAXBModel intermediateModel = this.compileModel(types, compiler, impl.getElement());
  Collection<? extends Mapping> mappings = intermediateModel.getMappings();

  for (Mapping mapping : mappings){
    this.importStructure(mapping);
  }
}
 
Example #4
Source File: CxfWSDLImporter.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
protected void importTypes(Types types) {
    SchemaCompiler compiler = XJC.createSchemaCompiler();
    ErrorListener elForRun = new ConsoleErrorReporter();
    compiler.setErrorListener(elForRun);

    SchemaImpl impl = (SchemaImpl) types.getExtensibilityElements().get(0);

    S2JJAXBModel intermediateModel = this.compileModel(types, compiler, impl.getElement());
    Collection<? extends Mapping> mappings = intermediateModel.getMappings();

    for (Mapping mapping : mappings) {
        this.importStructure(mapping);
    }
}
 
Example #5
Source File: WsimportTool.java    From mwsc with MIT License 4 votes vote down vote up
public XjcErrorReceiverAdapter(ErrorListener errorListener) {
	this.errorListener = errorListener;
}
 
Example #6
Source File: SchemaCompilerEx.java    From mwsc with MIT License 4 votes vote down vote up
public void setErrorListener(ErrorListener errorListener) {
    this.errorListener = errorListener;
}