Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisService


        if (bodyElementQName != null) {
            // This logic mimics the code in SOAPMessageBodyBasedOperationDispatcher.findOperation.  We will look for
            // the AxisOperation corresponding to the body element name.  Note that we are searching for the AxisOperation instead
            // of searching through the OperationDescriptions so that we can use the getOperationByMessageElementQName
            // for the Doc/Lit/Bare case.  Once we have the AxisOperation, we'll use that to find the Operation Description.
            AxisService axisService = endpointInterfaceDesc.getEndpointDescription().getAxisService();
            AxisOperation axisOperation = null;
   
            // Doc/Lit/Wrapped and RPC, the operation name is the first body element qname
            axisOperation = axisService.getOperation(new QName(bodyElementQName.getLocalPart()));
           
            if (axisOperation == null) {
                // Doc/Lit/Bare, the first body element qname is the element name contained in the wsdl:message part
                axisOperation = axisService.getOperationByMessageElementQName(bodyElementQName);
            }
           
            if (axisOperation == null) {
                // Not sure why we wouldn't have found the operation above using just the localPart rather than the full QName used here,
                // but this is what SOAPMessageBodyBasedOperationDispatcher.findOperation does.
                axisOperation = axisService.getOperation(bodyElementQName);
            }
   
            // If we found an axis operation, then find the operation description that corresponds to it
            if (axisOperation != null) {
                OperationDescription allOpDescs[] = endpointInterfaceDesc.getDispatchableOperations();
View Full Code Here


    public org.apache.axis2.context.MessageContext getAxisMessageContext() {
        return axisMsgCtx;
    }

    public ClassLoader getClassLoader() {
        AxisService svc = axisMsgCtx.getAxisService();
        if (svc != null)
            return svc.getClassLoader();
        else
            return null;
    }
View Full Code Here

            // Create an Axis Service only if the class is not an interface and
            // it has either
            // @WebService annotation or @WebServiceProvider annotation.
            if ((wsAnnotation != null || wspAnnotation != null) && !pojoClass.isInterface()) {
                AxisService axisService;
                axisService = createAxisService(classLoader, className, location);
                if (axisService != null) {
                    log.info("Deploying JAXWS annotated class " + className + " as a service - "
                            + serviceHierarchy + axisService.getName());
                    services.put(axisService.getName(), axisService);
                }
            }
        }
        return services;
    }
View Full Code Here

     */
    protected AxisService createAxisService(ClassLoader classLoader, String className,
            URL serviceLocation) throws ClassNotFoundException, InstantiationException,
            IllegalAccessException, AxisFault {
        Class<?> pojoClass = Loader.loadClass(classLoader, className);
        AxisService axisService;
        try {
            axisService = DescriptionFactory
                    .createAxisService(pojoClass, getConfigurationContext());
        } catch (Throwable t) {
            log.info("Exception creating Axis Service : " + t.getCause(), t);
            return null;
        }
        if (axisService != null) {
            Iterator<AxisOperation> operations = axisService.getOperations();
            while (operations.hasNext()) {
                AxisOperation axisOperation = operations.next();
                if (axisOperation.getMessageReceiver() == null) {
                    axisOperation.setMessageReceiver(new JAXWSMessageReceiver());
                }
            }
            axisService.setElementFormDefault(false);
            axisService.setFileName(serviceLocation);
            axisService.setClassLoader(classLoader);
            axisService.addParameter(new Parameter(
                    org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER, classLoader));
        }
        return axisService;
    }
View Full Code Here

        }

        Iterator<AxisService> iterator = serviceGroup.getServices();

        while (iterator.hasNext()) {
            AxisService axisService = iterator.next();
            Parameter param = axisService.getParameter(EndpointDescription.AXIS_SERVICE_PARAMETER);
            EndpointDescription ed = (EndpointDescription) param.getValue();
            QName serviceName = ed.getServiceQName();
            QName portName = ed.getPortQName();
            EndpointKey key = new EndpointKey(serviceName, portName);
View Full Code Here

            log.debug("new request received");
        }

        //Get the name of the service impl that was stored as a parameter
        // inside of the services.xml.
        AxisService service = axisRequestMsgCtx.getAxisService();

        // we need to set the deployment class loader as the TCCL. This is because, in JAX-WS
        // services, there can be situations where we have to load classes from the deployment
        // artifact (JAX-WS jar file) in the message flow. Ex: Handler classes in the service
        // artifact. Adding this as a fix for AXIS2-4930.
        setContextClassLoader(service.getClassLoader());

        org.apache.axis2.description.Parameter svcClassParam =
                service.getParameter(PARAM_SERVICE_CLASS);

        if (svcClassParam == null) {
            throw new RuntimeException(
                    Messages.getMessage("JAXWSMessageReceiverNoServiceClass"));
        }

        Parameter endpointDescParam =
                service.getParameter(EndpointDescription.AXIS_SERVICE_PARAMETER);
        if (endpointDescParam == null) {
            throw new RuntimeException(Messages.getMessage("JAXWSMessageReceiverNoServiceClass"));
        }
        AxisOperation operation = axisRequestMsgCtx.getAxisOperation();
        String mep = operation.getMessageExchangePattern();
View Full Code Here

    @Override
    public void initDispatcher() {
    }

    public InvocationResponse invoke(MessageContext msgctx) throws AxisFault {
        AxisService axisService = msgctx.getAxisService();
        AxisOperation axisOperation = msgctx.getAxisOperation();
       
        if (log.isDebugEnabled()) {
            log.debug("JAXWS MustUnderstandValidationDispatcher.invoke on AxisService "
                      + axisService
View Full Code Here

     */
    static ArrayList EMPTY_LIST = new ArrayList();
    public static ArrayList getHeaderParamaterList(MessageContext msgContext) {
        ArrayList headers = null;
        // Build a list of understood headers for all the operations under the service
        AxisService axisService = msgContext.getAxisService();
        if (log.isDebugEnabled()) {
            log.debug("Building list of understood headers for all operations under " + axisService);
        }
        if (axisService == null) {
            headers = EMPTY_LIST;
        } else  {
           
            // Get the understood headers from the sei methods
            ArrayList seiMethodHeaders = (ArrayList)
                axisService.getParameterValue("seiMethodHeaderParameter");

            if (seiMethodHeaders == null) {
                // examine SEI methods
                seiMethodHeaders = new ArrayList();
                Iterator operationIterator = axisService.getOperations();
                if (operationIterator != null) {
                    while (operationIterator.hasNext()) {
                        AxisOperation operation = (AxisOperation) operationIterator.next();
                        ArrayList list = getSEIMethodHeaderParameterList(operation);
                        if (log.isDebugEnabled()) {
                            log.debug("Adding headers from operation " + operation + "; headers = "
                                      + list);
                        }
                        if (list != null && !list.isEmpty()) {
                            seiMethodHeaders.addAll(list);
                        }
                    }
                }

                try {
                    // Save calculated value since this won't change
                    axisService.addParameter("seiMethodHeaderParameter", seiMethodHeaders);
                } catch (AxisFault e) {
                    if (log.isDebugEnabled()) {
                        log.debug("Problem caching seiMethodHeaderParameter.  " +
                                        "Processing continues without cached value");
                    }
View Full Code Here

   
    private AxisOperation findRealOperationAction(MessageContext msgContext) {
        AxisOperation axisOperation = null;
        QName firstBodyElement = getFirstBodyElement(msgContext.getEnvelope());
        if (firstBodyElement != null) {
            AxisService service = msgContext.getAxisService();
            axisOperation = service.getOperationByMessageElementQName(firstBodyElement);
        }
        return axisOperation;           
    }
View Full Code Here

                String wsdlLocation = "?wsdl"// let the webcontainer redirect us to the real WSDL URL; it knows where it is

                epr = EndpointReferenceUtils.createAxis2EndpointReference(address, service, port, wsdlLocation, addressingNamespace);
               
                // Add reference parameters from WSDL to the EPR
                AxisService axisService = endpointDesc.getAxisService();
                if (axisService != null) {
                    AxisEndpoint axisEndpoint = axisService.getEndpoint(axisService.getEndpointName());
                   
                    if(axisEndpoint != null){
                        ArrayList referenceParameters = (ArrayList) axisEndpoint.getParameterValue(AddressingConstants.REFERENCE_PARAMETER_PARAMETER);
                        if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
                            log.trace("getEndpointReference: Adding reference parameters to EPR from WSDL: axisService = " + axisService + ", axisEndpoint = " + axisEndpoint.getName() + ", referenceParameters = " + referenceParameters);
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.AxisService

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.