Package org.codehaus.jam

Examples of org.codehaus.jam.JMethod


        addExtensionElement(fac, binding, soap, BINDING_LOCAL_NAME, TRANSPORT, TRANSPORT_URI, STYLE, generationParams
            .getStyle());

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (jmethod.isPublic()) {
                OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl);
                binding.addChild(operation);

                addExtensionElement(fac,
                                    operation,
                                    soap,
                                    OPERATION_LOCAL_NAME,
                                    SOAP_ACTION,
                                    URN_PREFIX + COLON_SEPARATOR + jmethod.getSimpleName(),
                                    STYLE,
                                    generationParams.getStyle());
                operation.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName(), null);

                OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl);
                addExtensionElement(fac,
                                    input,
                                    soap,
                                    SOAP_BODY,
                                    SOAP_USE,
                                    generationParams.getUse(),
                                    "namespace",
                                    generationParams.getTargetNamespace());
                operation.addChild(input);

                if (!jmethod.getReturnType().isVoidType()) {
                    OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME, wsdl);
                    addExtensionElement(fac,
                                        output,
                                        soap,
                                        SOAP_BODY,
View Full Code Here


        addExtensionElement(fac, binding, soap12, BINDING_LOCAL_NAME, TRANSPORT, TRANSPORT_URI, STYLE, generationParams
            .getStyle());

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

            if (jmethod.isPublic()) {
                OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl);
                binding.addChild(operation);
                operation.declareNamespace(URI_WSDL12_SOAP, SOAP12_PREFIX);

                addExtensionElement(fac,
                                    operation,
                                    soap12,
                                    OPERATION_LOCAL_NAME,
                                    SOAP_ACTION,
                                    URN_PREFIX + COLON_SEPARATOR + jmethod.getSimpleName(),
                                    STYLE,
                                    generationParams.getStyle());
                operation.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName(), null);

                OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl);
                addExtensionElement(fac,
                                    input,
                                    soap12,
                                    SOAP_BODY,
                                    SOAP_USE,
                                    generationParams.getUse(),
                                    "namespace",
                                    generationParams.getTargetNamespace());
                operation.addChild(input);

                if (!jmethod.getReturnType().isVoidType()) {
                    OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME, wsdl);
                    addExtensionElement(fac,
                                        output,
                                        soap12,
                                        SOAP_BODY,
View Full Code Here

                HashMap uniqueMethods = new HashMap();
                XmlSchemaComplexType methodSchemaType;
                XmlSchemaSequence sequence = null;

                for (int i = 0; i < methods.length; i++) {
                    JMethod jMethod = methods[i];

                    String methodName = methods[i].getSimpleName();
                    // no need to think abt this method , since that is system
                    // config method
                    if (excludeMethods.contains(jMethod.getSimpleName())) {
                        continue;
                    }

                    if (uniqueMethods.get(jMethod.getSimpleName()) != null) {
                        throw new Exception(" Sorry we don't support methods overloading !!!! ");
                    }

                    if (!jMethod.isPublic()) {
                        // no need to generate Schema for non public methods
                        continue;
                    }
                    uniqueMethods.put(jMethod.getSimpleName(), jMethod);
                    // create the schema type for the method wrapper

                    uniqueMethods.put(jMethod.getSimpleName(), jMethod);
                    JParameter[] paras = jMethod.getParameters();
                    String parameterNames[] = null;
                    // better to handle void types too
                    parameterNames = methodTable.getParameterNames(methodName);
                    sequence = new XmlSchemaSequence();

                    methodSchemaType = createSchemaTypeForMethodPart(jMethod.getSimpleName());
                    methodSchemaType.setParticle(sequence);

                    for (int j = 0; j < paras.length; j++) {
                        JParameter methodParameter = paras[j];
                        JClass paraType = methodParameter.getType();
                        generateSchemaForType(sequence, paraType, (parameterNames != null && parameterNames[j] != null)
                            ? parameterNames[j] : methodParameter.getSimpleName());
                    }
                    // for its return type
                    JClass returnType = jMethod.getReturnType();

                    // better to handle void types too
                    methodSchemaType = createSchemaTypeForMethodPart(jMethod.getSimpleName() + RESPONSE);
                    sequence = new XmlSchemaSequence();
                    methodSchemaType.setParticle(sequence);
                    generateSchemaForType(sequence, returnType, "return");
                }
            } else {
View Full Code Here

        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

        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

        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;
            }
            AxisOperation operation = getAxisOperationforJmethod(jmethod, table);
View Full Code Here

        }
        return "null";
    }

    public boolean isValidProperty(JProperty it) {
        JMethod getter = it.getGetter();
        return getter != null && it.getSetter() != null && getter.isPublic() && getter.isStatic() == false && getter.getAnnotation("Transient") == null;
    }
View Full Code Here

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


        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            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) {
                operation = axisService.getOperation(new QName(jmethod.getSimpleName()));
            }
            MessageReceiver mr = axisService.getMessageReceiver(
                    operation.getMessageExchangePattern());
            if (mr != null) {
            } else {
View Full Code Here

            axisService.setTargetNamespace(targetNamespace);
        }
        JMethod[] method = schemaGenerator.getMethods();
        PhasesInfo pinfo = axisConfiguration.getPhasesInfo();
        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            AxisOperation operation = axisService.getOperation(new QName(jmethod.getSimpleName()));
            String mep = operation.getMessageExchangePattern();
            MessageReceiver mr;
            if (messageReceiverClassMap != null) {

                if (messageReceiverClassMap.get(mep) != null) {
View Full Code Here

    protected int openwireVersion;
    protected String filePostFix = ".java";
    protected JamService jam;

    public boolean isValidProperty(JProperty it) {
        JMethod getter = it.getGetter();
        return getter != null && it.getSetter() != null && !getter.isStatic() && getter.getAnnotation("openwire:property") != null;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.jam.JMethod

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.