Package org.apache.axis2.jsr181

Examples of org.apache.axis2.jsr181.WebServiceAnnotation


                String partQname = methodName + RESPONSE;
                methodSchemaType =
                        createSchemaTypeForMethodPart(partQname);
                sequence = new XmlSchemaSequence();
                methodSchemaType.setParticle(sequence);
                WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);
                String returnName = "return";
                if (returnAnnon != null) {
                    returnName = returnAnnon.getName();
                    if (returnName != null && !"".equals(returnName)) {
                        returnName = "return";
                    }
                }
                Type genericParameterType = jMethod.getGenericReturnType();
View Full Code Here


                if (returnType.isArray()) {
                    methodSchemaType =
                            createSchemaTypeForMethodPart(jMethod.getName() + RESULT);
                    sequence = new XmlSchemaSequence();
                    methodSchemaType.setParticle(sequence);
                    WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);
                    String returnName = "return";
                    if (returnAnnon != null) {
                        returnName = returnAnnon.getName();
                        if (returnName != null && !"".equals(returnName)) {
                            returnName = "return";
                        }
                    }
                    if (nonRpcMethods.contains(methodName)) {
View Full Code Here

                String partQname = methodName + RESPONSE;
                methodSchemaType =
                        createSchemaTypeForMethodPart(partQname);
                sequence = new XmlSchemaSequence();
                methodSchemaType.setParticle(sequence);
                WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);
                String returnName = "return";
                if (returnAnnon != null) {
                    returnName = returnAnnon.getName();
                    if (returnName != null && !"".equals(returnName)) {
                        returnName = "return";
                    }
                }
                Type genericParameterType = jMethod.getGenericReturnType();
View Full Code Here

         * then it will create Complex types foer those , and if the
         * parameters are simple type which decribe in SimpleTypeTable
         * nothing will happen) 2. In the next stage for all the methods
         * messages and port types will be creteated
         */
        WebServiceAnnotation webservice =
                JSR181Helper.INSTANCE.getWebServiceAnnotation(serviceClass);
        if (webservice != null) {
            String tns = webservice.getTargetNamespace();
            if (tns != null && !"".equals(tns)) {
                targetNamespace = tns;
                schemaTargetNameSpace = tns;
            }
            service.setName(Utils.getAnnotatedServiceName(serviceClass, webservice));
View Full Code Here

         * then it will create Complex types foer those , and if the
         * parameters are simple type which decribe in SimpleTypeTable
         * nothing will happen) 2. In the next stage for all the methods
         * messages and port types will be creteated
         */
        WebServiceAnnotation webservice =
                JSR181Helper.INSTANCE.getWebServiceAnnotation(serviceClass);
        if (webservice != null) {
            String tns = webservice.getTargetNamespace();
            if (tns != null && !"".equals(tns)) {
                targetNamespace = tns;
                schemaTargetNameSpace = tns;
            }
            service.setName(Utils.getAnnotatedServiceName(serviceClass, webservice));
View Full Code Here

                 * then it will create Complex types for those , and if the
                 * parameters are simple type which decribe in SimpleTypeTable
                 * nothing will happen) 2. In the next stage for all the methods
                 * messages and port types will be creteated
                 */
                WebServiceAnnotation annotation =
                        JSR181Helper.INSTANCE.getWebServiceAnnotation(clazz);
                AxisService axisService;
                if (annotation != null) {
                    // try to see whether JAX-WS jars in the class path , if so use them
                    // to process annotated pojo else use annogen to process the pojo class
                    axisService =
                            createAxisService(classLoader,
                                    className,
                                    deploymentFileData.getFile().toURL());
                } else {
                    axisService =
                            createAxisServiceUsingAnnogen(className,
                                    classLoader,
                                    deploymentFileData.getFile().toURL());
                }
                //add the hierarchical path to the service name
                axisService.setName(serviceHierarchy + axisService.getName());
                configCtx.getAxisConfiguration().addService(axisService);

            } else if ("jar".equals(extension)) {
                List<String> classList = Utils.getListOfClasses(deploymentFileData);
                ArrayList<AxisService> axisServiceList = new ArrayList<AxisService>();
                for (String className : classList) {
                    ArrayList<URL> urls = new ArrayList<URL>();
                    urls.add(deploymentFileData.getFile().toURL());
                    urls.add(configCtx.getAxisConfiguration().getRepository());
                    String webLocation = DeploymentEngine.getWebLocationString();
                    if (webLocation != null) {
                        urls.add(new File(webLocation).toURL());
                    }
                    ClassLoader classLoader = Utils.createClassLoader(
                            urls,
                            configCtx.getAxisConfiguration().getSystemClassLoader(),
                            true,
                            (File)configCtx.getAxisConfiguration().
                                    getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
                            configCtx.getAxisConfiguration().isChildFirstClassLoading());
                    Thread.currentThread().setContextClassLoader(classLoader);
                    Class<?> clazz = Loader.loadClass(className);

                    /**
                     * Schema generation done in two stage 1. Load all the methods and
                     * create type for methods parameters (if the parameters are Bean
                     * then it will create Complex types for those , and if the
                     * parameters are simple type which decribe in SimpleTypeTable
                     * nothing will happen) 2. In the next stage for all the methods
                     * messages and port types will be creteated
                     */
                    WebServiceAnnotation annotation =
                            JSR181Helper.INSTANCE.getWebServiceAnnotation(clazz);
                    if (annotation != null) {
                        AxisService axisService;
                        axisService =
                                createAxisService(classLoader,
View Full Code Here

         * then it will create Complex types foer those , and if the
         * parameters are simple type which decribe in SimpleTypeTable
         * nothing will happen) 2. In the next stage for all the methods
         * messages and port types will be creteated
         */
        WebServiceAnnotation webservice =
                JSR181Helper.INSTANCE.getWebServiceAnnotation(serviceClass);
        if (webservice != null) {
            String tns = webservice.getTargetNamespace();
            if (tns != null && !"".equals(tns)) {
                targetNamespace = tns;
                schemaTargetNameSpace = tns;
            }
            service.setName(Utils.getAnnotatedServiceName(serviceClass, webservice));
View Full Code Here

            String charSetEncoding = BuilderUtil.getCharSetEncoding(contentTypeStr);
            msgContext.setProperty(
                    Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
                        RESTUtil.processPOSTRequest(msgContext, is, os,
                                request.getRequestLine().getUri(), contentType, builder, isRestDispatching);
                    } else {
View Full Code Here

            String contentTypeStr = contentType != null ?
                    contentType.getValue() : inferContentType();

            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);

                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    RESTUtil.processGetAndDeleteRequest(
                            msgContext, os, request.getRequestLine().getUri(),
                            request.getFirstHeader(HTTP.CONTENT_TYPE), builder,
                            method, isRestDispatching);
                }
View Full Code Here

        params = getListenerParameters();


        param = transportIn.getParameter(NhttpConstants.ENDPOINTS_CONFIGURATION);
        if (param != null && param.getValue() != null) {
            endpoints = new URLEndpointsConfigurationFactory().create(param.getValue().toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.jsr181.WebServiceAnnotation

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.