Package org.apache.axis2.jaxws.description

Examples of org.apache.axis2.jaxws.description.OperationDescription


            throw ExceptionFactory.makeWebServiceException("No operation found.  WSDL Operation name: " + mc.getOperationName());
        }
        if (ops.length > 1) {
            throw ExceptionFactory.makeWebServiceException("More than one operation found. Overloaded WSDL operations are not supported.  WSDL Operation name: " + mc.getOperationName());
        }
        OperationDescription op = ops[0];
        return op;
    }
View Full Code Here


            log.debug("Invocation pattern: two way, sync");
        }

        initialize(mc);
       
        OperationDescription operationDesc = Utils.getOperationDescription(mc);
       
        Object[] methodInputParams = createRequestParameters(mc);
       
        Method target = getJavaMethod(mc, serviceImplClass);
        if (log.isDebugEnabled()) {
            // At this point, the OpDesc includes everything we know, including the actual method
            // on the service impl we will delegate to; it was set by getJavaMethod(...) above.
            log.debug("JavaBeanDispatcher about to invoke using OperationDesc: " +
                    operationDesc.toString());
        }

        // We have the method that is going to be invoked and the parameter data to invoke it
        // with, so just invoke the operation.
        boolean faultThrown = false;
        Throwable fault = null;
        Object output = null;
        try {
            output = invokeTargetOperation(target, methodInputParams);
        }
        catch (Throwable e) {
            faultThrown = true;
            fault = e;
        }

        MessageContext response = null;
        if (operationDesc.isOneWay()) {
            // If the operation is one-way, then we can just return null because
            // we cannot create a MessageContext for one-way responses.
            return null;
        } else if (faultThrown) {
            response = createFaultResponse(mc, mc.getMessage().getProtocol(), fault);
View Full Code Here

            log.debug("Invocation pattern: one way");
        }

        initialize(request);
       
        OperationDescription operationDesc = Utils.getOperationDescription(request);
       
        Object[] methodInputParams = createRequestParameters(request);
       
        Method target = getJavaMethod(request, serviceImplClass);
        if (log.isDebugEnabled()) {
            // At this point, the OpDesc includes everything we know, including the actual method
            // on the service impl we will delegate to; it was set by getJavaMethod(...) above.
            log.debug("JavaBeanDispatcher about to invoke using OperationDesc: "
                    + operationDesc.toString());
        }
       
        EndpointInvocationContext eic = (EndpointInvocationContext) request.getInvocationContext();
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
       
View Full Code Here

            log.debug("Invocation pattern: two way, async");
        }

        initialize(request);
       
        OperationDescription operationDesc = Utils.getOperationDescription(request);
       
        Object[] methodInputParams = createRequestParameters(request);
       
        Method target = getJavaMethod(request, serviceImplClass);
        if (log.isDebugEnabled()) {
            // At this point, the OpDesc includes everything we know, including the actual method
            // on the service impl we will delegate to; it was set by getJavaMethod(...) above.
            log.debug("JavaBeanDispatcher about to invoke using OperationDesc: "
                    + operationDesc.toString());
        }
       
        EndpointInvocationContext eic = (EndpointInvocationContext) request.getInvocationContext();
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
       
View Full Code Here

        return MethodMarshallerFactory.getMarshaller(operationDesc, false, cl);
    }

    protected Method getJavaMethod(MessageContext mc, Class serviceImplClass) {

        OperationDescription opDesc = mc.getOperationDescription();
        if (opDesc == null) {
            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("proxyErr3"));
        }

        Method returnMethod = opDesc.getMethodFromServiceImpl(serviceImplClass);
        if (returnMethod == null) {
            throw ExceptionFactory
                    .makeWebServiceException(Messages.getMessage("JavaBeanDispatcherErr1"));
        }
View Full Code Here

    public MessageContext createResponse(MessageContext request, Object[] input, Object output) {
        return createResponse(request, request.getMessage().getProtocol(), input, output);
    }
   
    public MessageContext createResponse(MessageContext request, Protocol p, Object[] params, Object output) {
        OperationDescription operationDesc = request.getOperationDescription();
        Method method = operationDesc.getMethodFromServiceImpl(serviceImplClass);
       
        // Create the appropriate response message, using the protocol from the
        // request message.
        MethodMarshaller marshaller = getMethodMarshaller(p, request.getOperationDescription(),
                                                          request);
View Full Code Here

        // clients do not use operations, so the operationDesc will be null.  In this
        // case an anonymous AxisService with anonymous AxisOperations for the supported
        // MEPs will be created; and it is that anonymous operation name which needs to
        // be specified
        QName operationName = null;
        OperationDescription opDesc = requestMsgCtx.getOperationDescription();
        if (opDesc != null && opDesc.getAxisOperation() != null)
            operationName = opDesc.getName();
        else
            operationName = defaultOpName;
        return operationName;
    }
View Full Code Here

        // Per JSR-181 all methods on the SEI are mapped to operations regardless
        // of whether they include an @WebMethod annotation.  That annotation may
        // be present to customize the mapping, but is not required (p14)
        for (Method method : getSEIMethods(dbc.getCorrespondingClass())) {
            OperationDescription operation = new OperationDescriptionImpl(method, this);
            addOperation(operation);
        }
    }
View Full Code Here

        } catch (AxisFault e) {
            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("eiDescrImplErr"),e);
        }
       
        genericProviderAxisOp.setName(new QName(JAXWS_NOWSDL_PROVIDER_OPERATION_NAME));
        OperationDescription opDesc = new OperationDescriptionImpl(genericProviderAxisOp, this);
       
        addOperation(opDesc);
        AxisService axisService = getEndpointDescription().getAxisService();
        axisService.addOperation(genericProviderAxisOp);
    }
View Full Code Here

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

                OperationDescription operation =
                        new OperationDescriptionImpl(mdc, this, axisOperation);

                if (axisOperation == null) {
                    // This axisOperation did not already exist on the AxisService, and so was created
                    // with the OperationDescription, so we need to add the operation to the service
                    ((OperationDescriptionImpl)operation).addToAxisService(axisService);
                }

                if (log.isDebugEnabled())
                    log.debug("EID: Just added operation= " + operation.getOperationName());
                addOperation(operation);
            }

        }
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.description.OperationDescription

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.