Examples of MarshalServiceRuntimeDescription


Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

            contextCL == classCL) {
            // Normal case: Use the context ClassLoader
            cl = contextCL;
        } else {
            // Choose the better of the JAXBContexts
            MarshalServiceRuntimeDescription marshalDesc =
                 MarshalServiceRuntimeDescriptionFactory.get(serviceDesc);
           
            // Get the JAXBContext for the context classloader
            Holder<JAXBUtils.CONSTRUCTION_TYPE> holder_contextCL = new Holder<JAXBUtils.CONSTRUCTION_TYPE>();  
            JAXBContext jbc_contextCL = null;
            try {
                jbc_contextCL = JAXBUtils.getJAXBContext(marshalDesc.getPackages(),
                        holder_contextCL,
                        marshalDesc.getPackagesKey(),
                        contextCL,
                        null);
            } catch (Throwable t) {
                if (log.isDebugEnabled()) {
                    log.debug("Error occured..Processing continues " + t);
                }
            }
           
            // Get the JAXBContext using the class's ClassLoader
            Holder<JAXBUtils.CONSTRUCTION_TYPE> holder_classCL = new Holder<JAXBUtils.CONSTRUCTION_TYPE>();
            JAXBContext jbc_classCL = null;
            try {
                jbc_classCL = JAXBUtils.getJAXBContext(marshalDesc.getPackages(),
                        holder_classCL,
                        marshalDesc.getPackagesKey(),
                        classCL,
                        null);
            } catch (Throwable t) {
                if (log.isDebugEnabled()) {
                    log.debug("Error occured..Processing continues " + t);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

       // Getting the MarshalServiceRuntimeDescription will ensure that it is built.
       ServiceDescription serviceDesc =
             op.getEndpointInterfaceDescription()
               .getEndpointDescription()
               .getServiceDescription();
       MarshalServiceRuntimeDescription marshalDesc =
             MarshalServiceRuntimeDescriptionFactory.get(serviceDesc);
      
        MethodMarshaller marshaller = null;
        if (op.getSoapBindingStyle() == SOAPBinding.Style.DOCUMENT) {
            marshaller = createDocLitMethodMarshaller(op, isClient, cl);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

     * @return true if JAXBContext constructed using CONTEXT PATH
     */
    private static boolean isContextPathConstruction(OperationDescription op, ClassLoader cl) {
        ServiceDescription serviceDesc = op.getEndpointInterfaceDescription()
                .getEndpointDescription().getServiceDescription();
        MarshalServiceRuntimeDescription marshalDesc =
                MarshalServiceRuntimeDescriptionFactory.get(serviceDesc);
        // Get the JAXBContext...Since this is a cached object we incur no penalty by looking at this point.
        Holder<JAXBUtils.CONSTRUCTION_TYPE> holder = new Holder<JAXBUtils.CONSTRUCTION_TYPE>();
        try {
            JAXBContext context = JAXBUtils.getJAXBContext(marshalDesc.getPackages(), holder,
                                                           marshalDesc.getPackagesKey(), cl, null);
        } catch (JAXBException e) {
            throw ExceptionFactory.makeWebServiceException(e);
        }
        if (holder.value == JAXBUtils.CONSTRUCTION_TYPE.BY_CONTEXT_PATH) {
            // If JAXBContext was constructed with a context path, this indicates that ObjectFactory (or other
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

     */
    protected static boolean isDocLitWrappedMinimal(OperationDescription op) {
        if (isDocLitWrapped(op)) {
            ServiceDescription serviceDesc = op.getEndpointInterfaceDescription()
                    .getEndpointDescription().getServiceDescription();
            MarshalServiceRuntimeDescription marshalDesc =
                    MarshalServiceRuntimeDescriptionFactory.get(serviceDesc);
            String requestWrapper = marshalDesc.getRequestWrapperClassName(op);
           
           
            if (op.isOneWay()) {
                if (!exists(requestWrapper)) {
                        if(log.isDebugEnabled()){
                                log.debug("OneWay Request wrapper class name is NULL.");
                        }
                        return true;
                }
               
                return false;
            } else  { //This is 2-way or async so both wrappers should exist
                if (!exists(requestWrapper)) {
                    if(log.isDebugEnabled()){
                        log.debug("Request wrapper class name is NULL.");
                    }
                    return true;
                }

                String responseWrapper = marshalDesc.getResponseWrapperClassName(op);
                if (!exists(responseWrapper)) {
                    if(log.isDebugEnabled()){
                        log.debug("Response wrapper class name is NULL.");
                    }
                    return true;
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

            //      for document processing, we will assume that the name corresponds to
            //      a schema root element)
            //   4) The type of the data block is defined by schema; thus in most cases
            //      an xsi:type will not be present
            ParameterDescription[] pds = operationDesc.getParameterDescriptions();
            MarshalServiceRuntimeDescription marshalDesc =
                    MethodMarshallerUtils.getMarshalDesc(endpointDesc);
            TreeSet<String> packages = marshalDesc.getPackages();

            // Remember this unmarshal information so that we can speed up processing
            // the next time.
            if (shouldRegisterUnmarshalInfo(operationDesc, message.getMessageContext())) {
                MethodMarshallerUtils.registerUnmarshalInfo(message.getMessageContext(),
                                                            packages,
                                                            marshalDesc.getPackagesKey());
            }

            // Get the return value.
            Class returnType = operationDesc.getResultActualType();
            Object returnValue = null;
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

            //   2) The data blocks are located underneath the body. 
            //   3) The name of the data blocks (m:param) are defined by the schema
            //   4) The type of the data block (data:foo) is defined by schema (and probably
            //      is not present in the message
            ParameterDescription[] pds = operationDesc.getParameterDescriptions();
            MarshalServiceRuntimeDescription marshalDesc =
                    MethodMarshallerUtils.getMarshalDesc(endpointDesc);
            TreeSet<String> packages = marshalDesc.getPackages();

            // Remember this unmarshal information so that we can speed up processing
            // the next time.
            if (shouldRegisterUnmarshalInfo(operationDesc, message.getMessageContext())) {
                MethodMarshallerUtils.registerUnmarshalInfo(message.getMessageContext(),
                                                            packages,
                                                            marshalDesc.getPackagesKey());
            }

            // Unmarshal the ParamValues from the message
            List<PDElement> pvList = MethodMarshallerUtils.getPDElements(pds,
                                                                         message,
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

            //   4) The type of the data block is defined by schema; thus in most cases
            //      an xsi:type will not be present

            // Get the operation information
            ParameterDescription[] pds = operationDesc.getParameterDescriptions();
            MarshalServiceRuntimeDescription marshalDesc =
                    MethodMarshallerUtils.getMarshalDesc(endpointDesc);
            TreeSet<String> packages = marshalDesc.getPackages();

            // Create the message
            MessageFactory mf = (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
            Message m = mf.create(protocol);

            // Put the return object onto the message
            Class returnType = operationDesc.getResultActualType();
            if (returnType != void.class) {
                AttachmentDescription attachmentDesc =
                    operationDesc.getResultAttachmentDescription();
                if (attachmentDesc != null) {
                    if (attachmentDesc.getAttachmentType() == AttachmentType.SWA) {
                        // Create an Attachment object with the signature value
                        Attachment attachment = new Attachment(returnObject,
                                                               returnType,
                                                               attachmentDesc,
                                                               operationDesc.getResultPartName());
                        m.addDataHandler(attachment.getDataHandler(),
                                         attachment.getContentID());
                        m.setDoingSWA(true);
                    } else {
                        throw ExceptionFactory.
                          makeWebServiceException(Messages.getMessage("pdElementErr"));
                    }
                } else {
                    Element returnElement = null;
                    QName returnQName = new QName(operationDesc.getResultTargetNamespace(),
                                                  operationDesc.getResultName());
                    if (marshalDesc.getAnnotationDesc(returnType).hasXmlRootElement()) {
                        returnElement = new Element(returnObject, returnQName);
                    } else {
                        /* when a schema defines a SimpleType with xsd list jaxws tooling generates art-effects with array rather than a java.util.List
                         * However the ObjectFactory definition uses a List and thus marshalling fails. Lets convert the Arrays to List.
                         */
 
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

            //   4) The type of the data block (data:foo) is defined by schema (and probably
            //      is not present in the message

            // Get the operation information
            ParameterDescription[] pds = operationDesc.getParameterDescriptions();
            MarshalServiceRuntimeDescription marshalDesc =
                    MethodMarshallerUtils.getMarshalDesc(endpointDesc);
            TreeSet<String> packages = marshalDesc.getPackages();

            // Create the message
            MessageFactory mf = (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
            Message m = mf.create(protocol);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

    public Message marshalFaultResponse(Throwable throwable, OperationDescription operationDesc,
                                        Protocol protocol) throws WebServiceException {

        EndpointInterfaceDescription ed = operationDesc.getEndpointInterfaceDescription();
        EndpointDescription endpointDesc = ed.getEndpointDescription();
        MarshalServiceRuntimeDescription marshalDesc =
                MethodMarshallerUtils.getMarshalDesc(endpointDesc);

        // We want to respond with the same protocol as the request,
        // It the protocol is null, then use the Protocol defined by the binding
        if (protocol == null) {
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.MarshalServiceRuntimeDescription

    public Throwable demarshalFaultResponse(Message message, OperationDescription operationDesc)
            throws WebServiceException {

        EndpointInterfaceDescription ed = operationDesc.getEndpointInterfaceDescription();
        EndpointDescription endpointDesc = ed.getEndpointDescription();
        MarshalServiceRuntimeDescription marshalDesc =
                MethodMarshallerUtils.getMarshalDesc(endpointDesc);

        // Note all exceptions are caught and rethrown with a WebServiceException
        try {
            Throwable t = MethodMarshallerUtils
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.