public static List<String> generate(Model model, WsimportOptions options, ErrorReceiver receiver) { // options check // Generate it according the implDestDir option if (options.implDestDir == null) return null; JwsImplGenerator jwsImplGenerator = new JwsImplGenerator(); jwsImplGenerator.init(model, options, receiver); jwsImplGenerator.doGeneration(); // print a warning message while implFiles.size() is zero if (jwsImplGenerator.implFiles.isEmpty()) { StringBuilder msg = new StringBuilder(); if (options.implServiceName != null) msg.append("serviceName=[").append(options.implServiceName).append("] "); if (options.implPortName != null) msg.append("portName=[").append(options.implPortName).append("] "); if (msg.length() > 0) msg.append(", Not found in wsdl file.\n"); msg.append("No impl files generated!"); receiver.warning(null, msg.toString()); } return jwsImplGenerator.implFiles; }
/** * TODO * * @param port * @param bindingTypeAnn */ private void writeBindingTypeAnnotation(Port port, JAnnotationUse bindingTypeAnn) { QName bName = (QName) port .getProperty(ModelProperties.PROPERTY_WSDL_BINDING_NAME); if (bName == null) return; String v = getBindingType(bName); // TODO: How to decide if it is a mtom? if (v != null) { // transport = translate(transport); bindingTypeAnn.param("value", v); } }
private static File findFile(WsimportOptions options, String qualifiedFileName) throws java.io.IOException { String baseDir = options.sourceDir.getCanonicalPath(); String fp = null; for (File f : options.getGeneratedFiles()) { fp = getQualifiedFileName(baseDir, f); if (qualifiedFileName.equals(fp)) return f; } return null; }
&& !equalsNSOptional(options.implServiceName, serviceName)) return; && !equalsNSOptional(options.implPortName, portName)) continue; String className = makePackageQualified(simpleClassName); implFiles.add(className); log("Class " + className + " exists. Not overriding."); return; cls = getClass(className, ClassType.CLASS); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + className + "]."); JDefinedClass portCls = null; try { portCls = getClass(portClassName, ClassType.INTERFACE); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + portClassName + "]."); for (String doc : getJAXWSClassComment()) { comment.add(doc);
File implDestDir = makePackageDir(options); movedF = findFile(options, implF.qualifiedName); if (movedF == null) {
implFiles = JwsImplGenerator.generate(wsdlModel, options, receiver); return JwsImplGenerator.moveToImplDestDir(implFiles, options, receiver);
&& !equalsNSOptional(options.implServiceName, serviceName)) return; && !equalsNSOptional(options.implPortName, portName)) continue; String className = makePackageQualified(simpleClassName); implFiles.add(className); log("Class " + className + " exists. Not overriding."); return; cls = getClass(className, ClassType.CLASS); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + className + "]."); JDefinedClass portCls = null; try { portCls = getClass(portClassName, ClassType.INTERFACE); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + portClassName + "]."); for (String doc : getJAXWSClassComment()) { comment.add(doc);
File implDestDir = makePackageDir(options); movedF = findFile(options, implF.qualifiedName); if (movedF == null) {
implFiles = JwsImplGenerator.generate(wsdlModel, options, receiver); return JwsImplGenerator.moveToImplDestDir(implFiles, options, receiver);
&& !equalsNSOptional(options.implServiceName, serviceName)) return; && !equalsNSOptional(options.implPortName, portName)) continue; String className = makePackageQualified(simpleClassName); implFiles.add(className); log("Class " + className + " exists. Not overriding."); return; cls = getClass(className, ClassType.CLASS); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + className + "]."); JDefinedClass portCls = null; try { portCls = getClass(portClassName, ClassType.INTERFACE); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + portClassName + "]."); for (String doc : getJAXWSClassComment()) { comment.add(doc);
public static List<String> generate(Model model, WsimportOptions options, ErrorReceiver receiver) { // options check // Generate it according the implDestDir option if (options.implDestDir == null) return null; JwsImplGenerator jwsImplGenerator = new JwsImplGenerator(); jwsImplGenerator.init(model, options, receiver); jwsImplGenerator.doGeneration(); // print a warning message while implFiles.size() is zero if (jwsImplGenerator.implFiles.isEmpty()) { StringBuilder msg = new StringBuilder(); if (options.implServiceName != null) msg.append("serviceName=[").append(options.implServiceName).append("] "); if (options.implPortName != null) msg.append("portName=[").append(options.implPortName).append("] "); if (msg.length() > 0) msg.append(", Not found in wsdl file.\n"); msg.append("No impl files generated!"); receiver.warning(null, msg.toString()); } return jwsImplGenerator.implFiles; }
File implDestDir = makePackageDir(options); movedF = findFile(options, implF.qualifiedName); if (movedF == null) {
implFiles = JwsImplGenerator.generate(wsdlModel, options, receiver); return JwsImplGenerator.moveToImplDestDir(implFiles, options, receiver);
private static File findFile(WsimportOptions options, String qualifiedFileName) throws java.io.IOException { String baseDir = options.sourceDir.getCanonicalPath(); String fp = null; for (File f : options.getGeneratedFiles()) { fp = getQualifiedFileName(baseDir, f); if (qualifiedFileName.equals(fp)) return f; } return null; }
/** * TODO * * @param port * @param bindingTypeAnn */ private void writeBindingTypeAnnotation(Port port, JAnnotationUse bindingTypeAnn) { QName bName = (QName) port .getProperty(ModelProperties.PROPERTY_WSDL_BINDING_NAME); if (bName == null) return; String v = getBindingType(bName); // TODO: How to decide if it is a mtom? if (v != null) { // transport = translate(transport); bindingTypeAnn.param("value", v); } }
&& !equalsNSOptional(options.implServiceName, serviceName)) return; && !equalsNSOptional(options.implPortName, portName)) continue; String className = makePackageQualified(simpleClassName); implFiles.add(className); log("Class " + className + " exists. Not overriding."); return; cls = getClass(className, ClassType.CLASS); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + className + "]."); JDefinedClass portCls = null; try { portCls = getClass(portClassName, ClassType.INTERFACE); } catch (JClassAlreadyExistsException e) { log("Class " + className + " generates failed. JClassAlreadyExistsException[" + portClassName + "]."); for (String doc : getJAXWSClassComment()) { comment.add(doc);
public static List<String> generate(Model model, WsimportOptions options, ErrorReceiver receiver) { // options check // Generate it according the implDestDir option if (options.implDestDir == null) return null; JwsImplGenerator jwsImplGenerator = new JwsImplGenerator(); jwsImplGenerator.init(model, options, receiver); jwsImplGenerator.doGeneration(); // print a warning message while implFiles.size() is zero if (jwsImplGenerator.implFiles.isEmpty()) { StringBuilder msg = new StringBuilder(); if (options.implServiceName != null) msg.append("serviceName=[").append(options.implServiceName).append("] "); if (options.implPortName != null) msg.append("portName=[").append(options.implPortName).append("] "); if (msg.length() > 0) msg.append(", Not found in wsdl file.\n"); msg.append("No impl files generated!"); receiver.warning(null, msg.toString()); } return jwsImplGenerator.implFiles; }
File implDestDir = makePackageDir(options); movedF = findFile(options, implF.qualifiedName); if (movedF == null) {
implFiles = JwsImplGenerator.generate(wsdlModel, options, receiver); return JwsImplGenerator.moveToImplDestDir(implFiles, options, receiver);
private static File findFile(WsimportOptions options, String qualifiedFileName) throws java.io.IOException { String baseDir = options.sourceDir.getCanonicalPath(); String fp = null; for (File f : options.getGeneratedFiles()) { fp = getQualifiedFileName(baseDir, f); if (qualifiedFileName.equals(fp)) return f; } return null; }