Examples of AxisService


Examples of org.apache.axis2.description.AxisService

        proxyService.setWSDLKey("root_wsdl");
        ResourceMap resourceMap = new ResourceMap();
        resourceMap.addResource("imported.wsdl", "imported_wsdl");
        resourceMap.addResource("imported.xsd", "imported_xsd");
        proxyService.setResourceMap(resourceMap);
        AxisService axisService = proxyService.buildAxisService(synCfg, axisCfg);
        // Serialize the WSDL. Note that we can't parse the WSDL because it will have imports
        // referring to locations such as "my-matches?xsd=xsd0.xsd".
        axisService.printWSDL(new ByteArrayOutputStream());
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        SessionID sessionID = fixOut.getSessionID();
        Map<String, String> fieldValues = FIXUtils.getMessageForwardingParameters(fixMessage);
        String beginString = fieldValues.get(FIXConstants.BEGIN_STRING);
        String deliverToCompID = fieldValues.get(FIXConstants.DELIVER_TO_COMP_ID);

        AxisService service = cfgCtx.getAxisConfiguration().getService(serviceName);

        //match BeginString values
        if (isValidationOn(service) && beginString != null && !beginString.equals(sessionID.getBeginString())) {
            handleException("BeginString validation is on. Cannot forward messages to a session" +
                    " with a different BeginString");
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        SessionID sessionID = fixOut.getSessionID();
        Map<String, String> fieldValues = FIXUtils.getMessageForwardingParameters(fixMessage);
        String beginString = fieldValues.get(FIXConstants.BEGIN_STRING);
        String deliverToCompID = fieldValues.get(FIXConstants.DELIVER_TO_COMP_ID);

        AxisService service = cfgCtx.getAxisConfiguration().getService(serviceName);

        //match BeginString values
        if (isValidationOn(service) && beginString != null && !beginString.equals(sessionID.getBeginString())) {
            handleException("BeginString validation is on. Cannot forward messages to a session" +
                    " with a different BeginString");
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        String deliverToCompID = fieldValues.get(FIXConstants.DELIVER_TO_COMP_ID);

        Acceptor acceptor = sessionFactory.getAccepter(serviceName);
        SessionID sessionID = null;

        AxisService service = cfgCtx.getAxisConfiguration().getService(serviceName);

        if (acceptor != null) {
            ArrayList<SessionID> sessions = acceptor.getSessions();
            if (sessions.size() == 1) {
                sessionID = sessions.get(0);
View Full Code Here

Examples of org.apache.axis2.description.AxisService

//            response.setStatusCode(HttpStatus.SC_MOVED_PERMANENTLY);
//            response.addHeader(LOCATION, servicePath + "/");
//            serverHandler.commitResponseHideExceptions(conn, response);

        } else if (serviceName != null && parameters.containsKey("wsdl")) {
            AxisService service = cfgCtx.getAxisConfiguration().
                getServices().get(serviceName);
            if (service != null) {
                try {
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    String parameterValue = parameters.get("wsdl");
                    if (parameterValue == null) {
                        service.printWSDL(baos, getIpAddress());
                    } else {
                        // here the parameter value should be the wsdl file name
                        service.printUserWSDL(baos, parameterValue);
                    }
                    response.addHeader(CONTENT_TYPE, TEXT_XML);
                    serverHandler.commitResponseHideExceptions(conn, response);
                    os.write(baos.toByteArray());

                } catch (Exception e) {
                    handleBrowserException(
                        "Error generating ?wsdl output for service : " + serviceName, e);
                    return;
                }
            } else {
                processGetAndDelete("GET");
                return;
            }

        } else if (serviceName != null && parameters.containsKey("wsdl2")) {
            AxisService service = cfgCtx.getAxisConfiguration().
                getServices().get(serviceName);
            if (service != null) {
                String parameterValue = (String) service.getParameterValue("serviceType");
                if ("proxy".equals(parameterValue) && !isWSDLProvidedForProxyService(service)) {
                    handleBrowserException("No WSDL was provided for the Service " + serviceName +
                            ". A WSDL cannot be generated.", null);
                    return;
                }
                try {
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    service.printWSDL2(baos, getIpAddress());
                    response.addHeader(CONTENT_TYPE, TEXT_XML);
                    serverHandler.commitResponseHideExceptions(conn, response);
                    os.write(baos.toByteArray());

                } catch (Exception e) {
                    handleBrowserException(
                        "Error generating ?wsdl2 output for service : " + serviceName, e);
                    return;
                }
            } else {
                processGetAndDelete("GET");
                return;
            }

        } else if (serviceName != null && parameters.containsKey("xsd")) {
            if (parameters.get("xsd") == null || "".equals(parameters.get("xsd"))) {
                AxisService service = cfgCtx.getAxisConfiguration()
                    .getServices().get(serviceName);
                if (service != null) {
                    try {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        service.printSchema(baos);
                        response.addHeader(CONTENT_TYPE, TEXT_XML);
                        serverHandler.commitResponseHideExceptions(conn, response);
                        os.write(baos.toByteArray());

                    } catch (Exception e) {
                        handleBrowserException(
                            "Error generating ?xsd output for service : " + serviceName, e);
                        return;
                    }
                }

            } else {
                //cater for named xsds - check for the xsd name
                String schemaName = parameters.get("xsd");
                AxisService service = cfgCtx.getAxisConfiguration()
                    .getServices().get(serviceName);

                if (service != null) {
                    //run the population logic just to be sure
                    service.populateSchemaMappings();
                    //write out the correct schema
                    Map schemaTable = service.getSchemaMappingTable();
                    XmlSchema schema = (XmlSchema)schemaTable.get(schemaName);
                    if (schema == null) {
                        int dotIndex = schemaName.indexOf('.');
                        if (dotIndex > 0) {
                            String schemaKey = schemaName.substring(0,dotIndex);
                            schema = (XmlSchema) schemaTable.get(schemaKey);
                        }
                    }
                    //schema found - write it to the stream
                    if (schema != null) {
                        try {
                            ByteArrayOutputStream baos = new ByteArrayOutputStream();
                            schema.write(baos);
                            response.addHeader(CONTENT_TYPE, TEXT_XML);
                            serverHandler.commitResponseHideExceptions(conn, response);
                            os.write(baos.toByteArray());
                        } catch (Exception e) {
                            handleBrowserException(
                                "Error generating named ?xsd output for service : " + serviceName, e);
                            return;
                        }

                    } else {
                        // no schema available by that name  - send 404
                        response.setStatusCode(HttpStatus.SC_NOT_FOUND);
                    }
                }
            }

        }
        else if (serviceName != null && parameters.containsKey("info")) {
            AxisService service = cfgCtx.getAxisConfiguration().
                    getServices().get(serviceName);
            if (service != null) {
                String parameterValue = (String) service.getParameterValue("serviceType");
                if ("proxy".equals(parameterValue) && !isWSDLProvidedForProxyService(service)) {
                    handleBrowserException("No WSDL was provided for the Service " + serviceName +
                            ". A WSDL cannot be generated.", null);
                    return;
                }
View Full Code Here

Examples of org.apache.axis2.description.AxisService

            servicesFound = true;
            resultBuf.append("<h2>" + "Deployed services" + "</h2>");

            for (Object service : services.values()) {

                AxisService axisService = (AxisService) service;
                Parameter parameter = axisService.getParameter(
                        NhttpConstants.HIDDEN_SERVICE_PARAM_NAME);
                if (axisService.getName().startsWith("__") ||
                        (parameter != null && JavaUtils.isTrueExplicitly(parameter.getValue()))) {
                    continue;    // skip private services
                }

                Iterator iterator = axisService.getOperations();
                resultBuf.append("<h3><a href=\"").append(prefix).append(axisService.getName()).append(
                        "?wsdl\">").append(axisService.getName()).append("</a></h3>");

                if (iterator.hasNext()) {
                    resultBuf.append("Available operations <ul>");

                    for (; iterator.hasNext();) {
View Full Code Here

Examples of org.apache.axis2.description.AxisService

     *
     * @param parent
     */
    EndpointInterfaceDescriptionImpl(EndpointDescriptionImpl parent) {
        parentEndpointDescription = parent;
        AxisService axisService = parentEndpointDescription.getAxisService();
        if (axisService != null) {
            ArrayList publishedOperations = axisService.getPublishedOperations();
            Iterator operationsIterator = publishedOperations.iterator();
            while (operationsIterator.hasNext()) {
                AxisOperation axisOperation = (AxisOperation)operationsIterator.next();
                addOperation(new OperationDescriptionImpl(axisOperation, this));
            }
View Full Code Here

Examples of org.apache.axis2.description.AxisService

            // constructor
            if (DescriptionUtils.createOperationDescription(mdc.getMethodName())) {
                //First check if this operation already exists on the AxisService, if so
                //then use that in the description hierarchy

                AxisService axisService = getEndpointDescription().getAxisService();
                AxisOperation axisOperation = axisService
                        .getOperation(OperationDescriptionImpl.determineOperationQName(mdc));

                OperationDescription operation =
                        new OperationDescriptionImpl(mdc, this, axisOperation);
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        ThreadContextDescriptor tc = new ThreadContextDescriptor();
        tc.oldMessageContext = (MessageContext) MessageContext.currentMessageContext.get();
        final ClassLoader contextClassLoader = getContextClassLoader_doPriv();
        tc.oldClassLoader = contextClassLoader;

        AxisService service = msgContext.getAxisService();
        String serviceTCCL = (String) service.getParameterValue(Constants.SERVICE_TCCL);
        if (serviceTCCL != null) {
            serviceTCCL = serviceTCCL.trim().toLowerCase();

            if (serviceTCCL.equals(Constants.TCCL_COMPOSITE)) {
                final ClassLoader loader = (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        } else {
            // REVIEW: Can the portQName ever be null?
            // Make this service name unique.  The Axis2 engine assumes that a service it can not find is a client-side service.
            serviceName = ServiceClient.ANON_SERVICE + this.hashCode() + System.currentTimeMillis();
        }
        axisService = new AxisService(serviceName);

        //TODO: Set other things on AxisService here, this function may have to be
        //      moved to after we create all the AxisOperations
    }
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.