private static boolean isSame(QName messageQName, QName methodQName) { boolean same = false; if (StringUtils.isEmpty(messageQName.getNamespaceURI())) { same = messageQName.getLocalPart().equals(methodQName.getLocalPart()); } else { same = messageQName.equals(methodQName); } return same; }
public void load(InputStream is, String delim) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(is)); String line = br.readLine(); while (!StringUtils.isEmpty(line)) { StringTokenizer st = new StringTokenizer(line, delim); String key = null; String value = null; if (st.hasMoreTokens()) { key = st.nextToken().trim(); } if (st.hasMoreTokens()) { value = st.nextToken().trim(); } maps.put(key, value); line = br.readLine(); } br.close(); }
private void customizeSchema(Element schema, String targetNamespace) { String userPackage = env.mapPackageName(targetNamespace); if (env.hasExcludeNamespace(targetNamespace) && env.getExcludePackageName(targetNamespace) != null) { // generate excluded namespace types classes with specified package // name userPackage = env.getExcludePackageName(targetNamespace); } if (!isSchemaParsed(targetNamespace) && !StringUtils.isEmpty(userPackage)) { Node jaxbBindings = JAXBUtils.innerJaxbPackageBinding(schema, userPackage); schema.appendChild(jaxbBindings); } int nodeListLen = schema.getElementsByTagNameNS(ToolConstants.SCHEMA_URI, "import").getLength(); for (int i = 0; i < nodeListLen; i++) { removeImportElement(schema); } }
private void addWebMethodAnnotation(JavaMethod method, String operationName) { JavaAnnotation methodAnnotation = new JavaAnnotation("WebMethod"); methodAnnotation.addArgument("operationName", operationName); if (!StringUtils.isEmpty(method.getSoapAction())) { methodAnnotation.addArgument("action", method.getSoapAction()); } method.addAnnotation("WebMethod", methodAnnotation); method.getInterface().addImport("javax.jws.WebMethod"); }
public boolean isValid() throws ToolException { boolean isValid = true; String schemaDir = getSchemaDir(); if (!StringUtils.isEmpty(schemaDir)) {
if (StringUtils.isEmpty(targetNamespace)) { continue;