Examples of MethodMarshaller


Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

               .getEndpointDescription()
               .getServiceDescription();
       MarshalServiceRuntimeDescription marshalDesc =
             MarshalServiceRuntimeDescriptionFactory.get(serviceDesc);
      
        MethodMarshaller marshaller = null;
        if (op.getSoapBindingStyle() == SOAPBinding.Style.DOCUMENT) {
            marshaller = createDocLitMethodMarshaller(op, isClient, cl);
        } else if (op.getSoapBindingStyle() == SOAPBinding.Style.RPC) {
            marshaller = createRPCLitMethodMarshaller(isClient);
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

    }

    public static MethodMarshaller getMarshaller(OperationDescription op, boolean isClient,
                                                 ClassLoader cl) {

        MethodMarshaller marshaller = null;
        if (op.getSoapBindingStyle() == SOAPBinding.Style.DOCUMENT) {
            marshaller = createDocLitMethodMarshaller(op, isClient, cl);
        } else if (op.getSoapBindingStyle() == SOAPBinding.Style.RPC) {
            marshaller = createRPCLitMethodMarshaller(isClient);
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

   
    private Object[] createRequestParameters(MessageContext request) {
        // Get the appropriate MethodMarshaller for the WSDL type.  This will reflect
        // the "style" and "use" of the WSDL.
        Protocol requestProtocol = request.getMessage().getProtocol();
        MethodMarshaller methodMarshaller =
                getMethodMarshaller(requestProtocol, request.getOperationDescription(),
                                    request);
       
        // The MethodMarshaller will return the input parameters that are needed to
        // invoke the target method.
        Object[] methodInputParams =
                methodMarshaller.demarshalRequest(request.getMessage(), request.getOperationDescription());
       
        if (log.isDebugEnabled()) {
            log.debug("Unmarshalled parameters for request");
            if (methodInputParams != null) {
                log.debug(methodInputParams.length + " parameters were found.");   
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

        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);
        Message m = null;
        if (method.getReturnType().getName().equals("void")) {
            m = marshaller.marshalResponse(null, params, operationDesc, p);
        } else {
            m = marshaller.marshalResponse(output, params, operationDesc, p);
        }
       
        // We'll need a MessageContext configured based on the response.
        MessageContext response = MessageContextUtils.createResponseMessageContext(request);
        response.setMessage(m);
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

        Throwable faultMessage = InvocationHelper.determineMappedException(t, request);
        if(faultMessage != null) {
            t = faultMessage;
        }
       
        MethodMarshaller marshaller = getMethodMarshaller(p, request.getOperationDescription(),
                                                          request);
       
        Message m = marshaller.marshalFaultResponse(t, request.getOperationDescription(), p);
       
        MessageContext response = MessageContextUtils.createFaultMessageContext(request);
        response.setMessage(m);

        AxisFault axisFault = new AxisFault("The endpoint returned a fault when invoking the target operation.",
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

        return null;
    }

    public static MethodMarshaller getMarshaller(OperationDescription op, boolean isClient) {

        MethodMarshaller marshaller = null;
        if (isClient) {
            if (op.getSoapBindingStyle() == SOAPBinding.Style.DOCUMENT) {
                marshaller = createDocLitMethodMarshaller(op, isClient);
            } else if (op.getSoapBindingStyle() == SOAPBinding.Style.RPC) {
                marshaller = createRPCLitMethodMarshaller(isClient);
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

        OperationDescription operationDesc =
                getOperationDescription(mc); //mc.getOperationDescription();
        //Set SOAP Operation Related properties in SOAPMessageContext.
        ContextUtils.addWSDLProperties(mc);
        Protocol requestProtocol = mc.getMessage().getProtocol();
        MethodMarshaller methodMarshaller =
                getMethodMarshaller(mc.getMessage().getProtocol(), mc.getOperationDescription());
        Object[] methodInputParams =
                methodMarshaller.demarshalRequest(mc.getMessage(), mc.getOperationDescription());
        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());
        }

        //At this point, we have the method that is going to be invoked and
        //the parameter data to invoke it with, so we use the instance and
        //do the invoke.
        //Passing method input params to grab holder values, if any.
        boolean faultThrown = false;
        Throwable fault = null;
        Object response = null;
        try {
            response = invokeService(mc, target, serviceInstance, methodInputParams);
        } catch (Exception e) {
            faultThrown = true;
            fault = e;
            if (log.isDebugEnabled()) {
                log.debug("Exception invoking a method of " +
                        serviceImplClass.toString() + " of instance " +
                        serviceInstance.toString());
                log.debug("Exception type thrown: " + e.getClass().getName());
                log.debug("Method = " + target.toGenericString());
                for (int i = 0; i < methodInputParams.length; i++) {
                    String value = (methodInputParams[i] == null) ? "null" :
                            methodInputParams[i].getClass().toString();
                    log.debug(" Argument[" + i + "] is " + value);
                }
            }
        }

        Message message = 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) {
            message = methodMarshaller.marshalFaultResponse(fault, mc.getOperationDescription(),
                                                            requestProtocol); // Send the response using the same protocol as the request
        } else if (target.getReturnType().getName().equals("void")) {
            message = methodMarshaller
                    .marshalResponse(null, methodInputParams, mc.getOperationDescription(),
                                     requestProtocol); // Send the response using the same protocol as the request
        } else {
            message = methodMarshaller
                    .marshalResponse(response, methodInputParams, mc.getOperationDescription(),
                                     requestProtocol); // Send the response using the same protocol as the request
        }

        MessageContext responseMsgCtx = null;
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

   
    private Object[] createRequestParameters(MessageContext request) {
        // Get the appropriate MethodMarshaller for the WSDL type.  This will reflect
        // the "style" and "use" of the WSDL.
        Protocol requestProtocol = request.getMessage().getProtocol();
        MethodMarshaller methodMarshaller =
                getMethodMarshaller(requestProtocol, request.getOperationDescription(),
                                    request);
       
        // The MethodMarshaller will return the input parameters that are needed to
        // invoke the target method.
        Object[] methodInputParams =
                methodMarshaller.demarshalRequest(request.getMessage(), request.getOperationDescription());
       
        if (log.isDebugEnabled()) {
            log.debug("Unmarshalled parameters for request");
            if (methodInputParams != null) {
                log.debug(methodInputParams.length + " parameters were found.");   
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

        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);
        Message m = null;
        if (method.getReturnType().getName().equals("void")) {
            m = marshaller.marshalResponse(null, params, operationDesc, p);
        } else {
            m = marshaller.marshalResponse(output, params, operationDesc, p);
        }
       
        // We'll need a MessageContext configured based on the response.
        MessageContext response = MessageContextUtils.createResponseMessageContext(request);
        response.setMessage(m);
View Full Code Here

Examples of org.apache.axis2.jaxws.marshaller.MethodMarshaller

        Throwable faultMessage = InvocationHelper.determineMappedException(t, request);
        if(faultMessage != null) {
            t = faultMessage;
        }
       
        MethodMarshaller marshaller = getMethodMarshaller(p, request.getOperationDescription(),
                                                          request);
       
        Message m = marshaller.marshalFaultResponse(t, request.getOperationDescription(), p);
       
        MessageContext response = MessageContextUtils.createFaultMessageContext(request);
        response.setMessage(m);

        AxisFault axisFault = new AxisFault("The endpoint returned a fault when invoking the target operation.",
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.