Examples of TypeTable


Examples of org.apache.axis2.description.java2wsdl.TypeTable

   *            OMElement for the packageMappingElement
   */
  private void processTypeMappings(OMElement packageMappingElement) {
    Iterator elementItr = packageMappingElement
        .getChildrenWithName(new QName(TAG_MAPPING));
    TypeTable typeTable = service.getTypeTable();
    if (typeTable == null) {
      typeTable = new TypeTable();
    }
    while (elementItr.hasNext()) {
      OMElement mappingElement = (OMElement) elementItr.next();
      String packageName = mappingElement.getAttributeValue(new QName(
          TAG_PACKAGE_NAME));
      String qName = mappingElement
          .getAttributeValue(new QName(TAG_QNAME));
      if (packageName == null || qName == null) {
        continue;
      }
      Iterator keys = service.getNamespaceMap().keySet().iterator();
      while (keys.hasNext()) {
        String key = (String) keys.next();
        if (qName.equals(service.getNamespaceMap().get(key))) {
          typeTable.addComplexSchema(packageName, new QName(qName,
              packageName, key));
        }
      }
    }
    service.setTypeTable(typeTable);
View Full Code Here

Examples of org.apache.axis2.wsdl.builder.TypeTable

        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.axis2.wsdl.builder.TypeTable

                serviceClass.trim(), axisService.getSchematargetNamespace(),
                axisService.getSchematargetNamespacePrefix());
        axisService.setSchema(schemaGenerator.generateSchema());

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (!jmethod.isPublic()) {
                // no need to expose , private and protected methods
                continue;
            }
            if (jmethod.getSimpleName().equals("init"))
                continue;
            String opName = jmethod.getSimpleName();
            AxisOperation operation = axisService.getOperation(new QName(opName));
            // if the opeartion there in services.xml then try to set it schema element name
            if (operation != null) {
                AxisMessage inMessage = operation.getMessage(
                        WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                if (inMessage != null) {
                    inMessage.setElementQName(table.getComplexSchemaType(jmethod.getSimpleName() +
                            SchemaGenerator.METHOD_REQUEST_WRAPPER));
                }
                if (!jmethod.getReturnType().isVoidType()) {
                    AxisMessage outMessage = operation.getMessage(
                            WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                    outMessage.setElementQName(table.getQNamefortheType(jmethod.getSimpleName() +
                            SchemaGenerator.METHOD_RESPONSE_WRAPPER));
                }
            } else {
                operation = getAxisOperationforJmethod(jmethod, table);
                MessageReceiver mr = axisService.getMessageReceiver(
View Full Code Here

Examples of org.apache.axis2.wsdl.java2wsdl.TypeTable

        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
                serviceClass, null, null);
        axisService.setSchema(schemaGenerator.generateSchema());

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (!jmethod.isPublic()) {
                // no need to expose , private and protected methods
                continue;
            }
            if (jmethod.getSimpleName().equals("init"))
                continue;
            String opName = jmethod.getSimpleName();
            AxisOperation operation = axisService.getOperation(new QName(opName));
            // if the opeartion there in services.xml then try to set it schema element name
            if (operation != null) {
                AxisMessage inMessage = operation.getMessage(
                        WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                if (inMessage != null) {
                    inMessage.setElementQName(table.getComplexScheamType(jmethod.getSimpleName() +
                            SchemaGenerator.METHOD_REQUEST_WRAPPER));
                }
                if (!jmethod.getReturnType().isVoidType()) {
                    AxisMessage outMessage = operation.getMessage(
                            WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                    outMessage.setElementQName(table.getQNamefortheType(jmethod.getSimpleName() +
                            SchemaGenerator.METHOD_RESPONSE_WRAPPER));
                }
            } else {
                operation = getAxisOperationforJmethod(jmethod, table);
                MessageReceiver mr = axisService.getMessageReceiver(
View Full Code Here

Examples of org.apache.axis2.wsdl.java2wsdl.TypeTable

        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.ws.java2wsdl.utils.TypeTable

        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod[] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfiguration.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.ws.java2wsdl.utils.TypeTable

        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod[] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.ws.java2wsdl.utils.TypeTable

        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod[] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfiguration.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.ws.java2wsdl.utils.TypeTable

        } catch (Exception e) {
            throw new AxisFault(e);
        }

        JMethod[] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
View Full Code Here

Examples of org.apache.ws.java2wsdl.utils.TypeTable

                axisService.getTargetNamespace())) {
            axisService.setTargetNamespace(schemaGenerator.getTargetNamespace());
        }

        JMethod [] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();


        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (!jmethod.isPublic()) {
                // no need to expose , private and protected methods
                continue;
            }
            if (excludeOperations.contains(jmethod.getSimpleName())) {
                continue;
            }
            String opName = jmethod.getSimpleName();
            AxisOperation operation = axisService.getOperation(new QName(opName));
            // if the operation there in services.xml then try to set it schema element name
            if (operation != null) {
                AxisMessage inMessage = operation.getMessage(
                        WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                if (inMessage != null) {
                    inMessage.setName(opName + Java2WSDLConstants.MESSAGE_SUFFIX);
                    inMessage.setElementQName(table.getComplexSchemaType(jmethod.getSimpleName()));
                }
                if (!jmethod.getReturnType().isVoidType()) {
                    AxisMessage outMessage = operation.getMessage(
                            WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                    outMessage.setElementQName(table.getQNamefortheType(jmethod.getSimpleName() +
                            Java2WSDLConstants.RESPONSE));
                    outMessage.setName(opName + Java2WSDLConstants.RESPONSE);
                }
                if (jmethod.getExceptionTypes().length > 0) {
                    AxisMessage faultMessage = new AxisMessage();
                    faultMessage.setName(jmethod.getSimpleName() + "Fault");
                    faultMessage.setElementQName(table.getComplexSchemaType(jmethod.getSimpleName() + "Fault"));
                    operation.setFaultMessages(faultMessage);
                }
            } else {
                operation = getAxisOperationforJmethod(jmethod, table);
                MessageReceiver mr = axisService.getMessageReceiver(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.