Examples of JAXBBlockFactory


Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

                throw ExceptionFactory.makeWebServiceException(e);
            }
        }
       
        try {
            JAXBBlockFactory factory =
                (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);

            Class clazz = value.getClass();
            JAXBBlockContext context = null;
            if (jaxbContext != null) {
                context = new JAXBBlockContext(jaxbContext);
            } else {
                context = new JAXBBlockContext(clazz.getPackage().getName());
            }
            // The protocol of the Message that is created should be based
            // on the binding information available.
            Protocol proto = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());

            // Create a block from the value
            elementQName = XMLRootElementUtil.getXmlRootElementQNameFromObject(value);
            Block block = factory.createFrom(value, context, elementQName);
            MessageFactory mf = (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);

            if (mode.equals(Mode.PAYLOAD)) {
                // Normal case
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

    static Object getValue(Message message, Mode mode, JAXBContext jaxbContext) {
        Object value = null;
        try {
            if (mode.equals(Mode.PAYLOAD)) {
                // Normal Case
                JAXBBlockFactory factory =
                        (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
                JAXBBlockContext context = new JAXBBlockContext(jaxbContext);
                Block block = message.getBodyBlock(context, factory);

                if (block != null) {
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

              String clsName = marshalDesc.getResponseWrapperClassName(operationDesc);
              Class cls = loadClass(clsName,endpointDesc);
              blockContext.setProcessType(cls);
            }
           
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            Block block = message.getBodyBlock(blockContext, factory);
            Object wrapperObject = block.getBusinessObject(true);

            // The child elements are within the object that
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

              String clsName = marshalDesc.getRequestWrapperClassName(operationDesc);
              Class cls = loadClass(clsName,endpointDesc);
              blockContext.setProcessType(cls);
            }
           
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            Block block = message.getBodyBlock(blockContext, factory);
            Object wrapperObject = block.getBusinessObject(true);

            // The child elements are within the object that
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

            if (operationDesc.hasResponseSwaRefAttachments()) {
                m.setDoingSWA(true);
            }

            // Put the object into the message
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            JAXBBlockContext blockContext = new JAXBBlockContext(packages, packagesKey);
            blockContext.setWebServiceNamespace(ed.getTargetNamespace());
            Block block = factory.createFrom(object,
                                             blockContext,
                                             wrapperQName);
            m.setBodyBlock(block);

            return m;
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

            if (operationDesc.hasRequestSwaRefAttachments()) {
                m.setDoingSWA(true);
            }

            // Put the object into the message
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            JAXBBlockContext blockContext = new JAXBBlockContext(packages, packagesKey);
            blockContext.setWebServiceNamespace(ed.getTargetNamespace());
            Block block = factory.createFrom(object,
                                             blockContext,
                                             wrapperQName);
            m.setBodyBlock(block);

            return m;
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

            if (!isResponseWrapperAnXmlRootElement(operationDesc, marshalDesc, endpointDesc)) {
              String clsName = marshalDesc.getResponseWrapperClassName(operationDesc);
              Class cls = loadClass(clsName,endpointDesc);
              blockContext.setProcessType(cls);
            }
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            Block block = message.getBodyBlock(blockContext, factory);
            Object wrapperObject = block.getBusinessObject(true);

            // The child elements are within the object that
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

            if (!isRequestWrapperAnXmlRootElement(operationDesc, marshalDesc, endpointDesc)) {
              String clsName = marshalDesc.getRequestWrapperClassName(operationDesc);
              Class cls = loadClass(clsName,endpointDesc);
              blockContext.setProcessType(cls);
            }
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            Block block = message.getBodyBlock(blockContext, factory);
            Object wrapperObject = block.getBusinessObject(true);

            // The child elements are within the object that
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

            if (!marshalDesc.getAnnotationDesc(cls).hasXmlRootElement()) {
                object = new JAXBElement(wrapperQName, cls, object);
            }

            // Put the object into the message
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            JAXBBlockContext blockContext = new JAXBBlockContext(packages, packagesKey);
            blockContext.setWebServiceNamespace(ed.getTargetNamespace());
            Block block = factory.createFrom(object,
                                             blockContext,
                                             wrapperQName)// The factory will get the qname from the value
            m.setBodyBlock(block);

            //  Now place the headers in the message
View Full Code Here

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory

            if (!marshalDesc.getAnnotationDesc(cls).hasXmlRootElement()) {
                object = new JAXBElement(wrapperQName, cls, object);
            }

            // Put the object into the message
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);
            JAXBBlockContext blockContext = new JAXBBlockContext(packages, packagesKey);
            blockContext.setWebServiceNamespace(ed.getTargetNamespace());
            Block block = factory.createFrom(object,
                                             blockContext,
                                             wrapperQName)// The factory will get the qname from the value
            m.setBodyBlock(block);

            // Now place the headers in the message
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.