Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.JavaQName


    private void parseExceptions(AbstractJavaMethod pMethod, AST pAST) {
        AST throwsClause = findChild(pAST, JavaTokenTypes.LITERAL_throws);
        if (throwsClause != null) {
          for (AST child = throwsClause.getFirstChild();  child != null;  child = child.getNextSibling()) {
            String ident = parseSimpleIdentifier(child);
                JavaQName qName = getQName(ident);
                pMethod.addThrows(qName);
            }
        }
    }
View Full Code Here


      Method m = XmlRpcCaller.class.getMethod("xmlRpcCall", new Class[]{String.class, Vector.class});
        Class[] exceptions = m.getExceptionTypes();
        List exceptionList = new ArrayList();
        if (exceptions != null) {
          for (int i = 0;  i < exceptions.length;  i++) {
            JavaQName qName = JavaQNameImpl.getInstance(exceptions[i]);
                if (!pMethod.isThrowing(qName)) {
                  exceptionList.add(qName);
                }
          }
        }
       
        JavaMethod jm = pJs.newJavaMethod(pMethod);
        LocalJavaField v = jm.newJavaField(Vector.class);
        v.addLine("new ", Vector.class, "()");
        Parameter[] params = jm.getParams();
        for (int i = 0;  i < params.length;  i++) {
          Parameter p = params[i];
            jm.addLine(v, ".add(", getInputValue(jm, p.getType(), p), ");");
        }
        if (!exceptionList.isEmpty()) {
          jm.addTry();
        }
        Object result = new Object[]{pCaller, ".xmlRpcCall(",
                                 JavaSource.getQuoted(pName), ", ", v, ")"};
        if (JavaQNameImpl.VOID.equals(jm.getType())) {
            jm.addLine(result, ";");
        } else {
          jm.addLine("return ", getResultValue(jm, jm.getType(), result), ";");
        }
        if (!exceptionList.isEmpty()) {
            for (int i = 0;  i < exceptionList.size();  i++) {
              JavaQName exClass = (JavaQName) exceptionList.get(i);
                DirectAccessible e = jm.addCatch(exClass);
                jm.addThrowNew(UndeclaredThrowableException.class, e);
            }
            jm.addEndTry();
        }
View Full Code Here

   }

   /** <p>Sets the interface name being generated for the chain objects.</p>
    */
   public void setChainInterfaceName(String pInterfaceName) {
      JavaQName qName = JavaQNameImpl.getInstance(pInterfaceName, true);
      setChainInterface(qName);
   }
View Full Code Here

   }

   /** <p>Sets the class name being generated for the chain objects.</p>
    */
   public void setProxyClassName(String pClassName) {
      JavaQName qName = JavaQNameImpl.getInstance(pClassName, true);
      setProxyClass(qName);
   }
View Full Code Here

   /** <p>Returns the class being generated for the chain objects. Defaults
    * to <code>getChainInterface() + "Impl"</code>.</p>
    */
   public JavaQName getProxyClass() {
      if (proxyClass == null) {
         JavaQName chainClass = getChainInterface();
         if (chainClass == null) {
            return null;
         } else {
            return JavaQNameImpl.getInstance(chainClass.getPackageName(),
                                                             chainClass.getClassName() + "Impl");
         }
      } else {
         return proxyClass;
      }
   }
View Full Code Here

   public JavaQName getImplementationClass() {
      if (implClass == null) {
         if (controllerInterface == null) {
            return null;
         } else {
            JavaQName controllerClass = controllerInterface.getQName();
            return JavaQNameImpl.getInstance(controllerClass.getPackageName(),
                                              controllerClass.getClassName() + "Impl");
         }
      } else {
         return implClass;
      }
   }
View Full Code Here

      } else {
        throw new RuntimeException(ClassUtils.simpleClassName(obj.getClass())+" not supported in choice");
      }
    }
   
    JavaQName javaType = XmlSchemaUtils.getCommonJavaType(schemaTypes);
    String className = javaType.getClassName();
    className = className.substring(className.indexOf('.')+1);
    String name = className.substring(0,1).toLowerCase()+className.substring(1);
    if(choice.getMaxOccurs()>1) name = name+"s";
   
    if(log.isDebugEnabled())
      log.debug("Selected JavaType : "+javaType.getClassName());
   
    ChoiceEvent event = new ChoiceEvent();
    event.setName(name);
    event.setMinOccurs((int)choice.getMinOccurs());
    event.setMaxOccurs((int)choice.getMaxOccurs());
View Full Code Here

    if (!pController.isComplex()) {
      return;
    }
    CustomTableData customTableData = (CustomTableData) pController.getProperty(jdbcSG.getKey());
    if (customTableData != null) {
      JavaQName qName = pController.getComplexTypeSG().getClassContext().getPMName();
      JavaSource js = pController.getSchema().getJavaSourceFactory().newJavaSource(qName, JavaSource.PUBLIC);
      getPMClass(pController, js, customTableData);
    }
  }
View Full Code Here

    if (!pController.isComplex()) {
      return;
    }
    CustomTableData customTableData = (CustomTableData) pController.getProperty(jdbcSG.getKey());
    if (customTableData != null) {
      JavaQName qName = pController.getComplexTypeSG().getClassContext().getPMName();
      JavaInnerClass jic = pSource.newJavaInnerClass(qName.getClassName());
      getPMClass(pController, jic, customTableData);
    }
  }
View Full Code Here

    String q = table.getSchema().getSQLFactory().newSQLGenerator().getQuery(table.getInsertStatement());
    LocalJavaField query = jm.newJavaField(String.class);
    query.setFinal(true);
    query.addLine(JavaSource.getQuoted(q));

    JavaQName qName = pController.getComplexTypeSG().getClassContext().getXMLInterfaceName();
    LocalJavaField elem = jm.newJavaField(qName);
    elem.addLine("(", qName, ") ", pElement);

    LocalJavaField connection = jm.newJavaField(Connection.class);
    connection.addLine("null");
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.JavaQName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.