Package org.apache.axis2.jaxws.message.factory

Examples of org.apache.axis2.jaxws.message.factory.JAXBBlockFactory.createFrom()


            // 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


            // 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

        JAXBBlockContext context =
            new JAXBBlockContext(EchoStringResponse.class.getPackage().getName());
       
        // Create a JAXBBlock using the Echo object as the content.  This simulates
        // what occurs on the outbound JAX-WS Dispatch<Object> client
        Block block = bf.createFrom(obj, context, null);
       
        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
View Full Code Here

       
        System.out.println("JAXBContext= " + context);
       
        // Create a JAXBBlock using the Echo object as the content.  This simulates
        // what occurs on the outbound JAX-WS Dispatch<Object> client
        Block block = bf.createFrom(obj, context, null);
       
        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
View Full Code Here

        JAXBBlockContext context =
            new JAXBBlockContext(EchoStringResponse.class.getPackage().getName());
      
        // Create a JAXBBlock using the Echo object as the content.  This simulates
        // what occurs on the outbound JAX-WS Dispatch<Object> client
        Block block = bf.createFrom(obj, context, null);
       
        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
View Full Code Here

        JAXBBlockContext context =
                new JAXBBlockContext(jaxbObj.getClass().getPackage().getName());

        // Create a JAXBBlock using the Echo object as the content. This simulates
        // what occurs on the outbound JAX-WS Dispatch<Object> client
        Block block = bf.createFrom(jaxbObj, context, null);

        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
        return m;
    }
View Full Code Here

            // on the binding information available.
            Protocol proto = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());

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

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

        QName paramQName = new QName("urn://sample", "param", "m");
        JAXBElement e = new JAXBElement(paramQName, StockPrice.class, obj);
       
        // Create a JAXBBlock using the param object as the content.  This simulates
        // what occurs on the outbound JAX-WS Proxy client
        Block block = bf.createFrom(e, context, null);
       
        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
View Full Code Here

        QName paramQName = new QName("urn://sample", "param", "m");
        JAXBElement e = new JAXBElement(paramQName, StockPrice.class, obj);
       
        // Create a JAXBBlock using the param object as the content.  This simulates
        // what occurs on the outbound JAX-WS Proxy client
        Block block = bf.createFrom(e, context, null);
       
        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
View Full Code Here

        JAXBContext jbc = JAXBContext.newInstance("test");
        JAXBBlockContext blockCtx = new JAXBBlockContext(jbc);
       
        // Create the Block
        JAXBBlockFactory blockFactory = (JAXBBlockFactory) FactoryRegistry.getFactory(JAXBBlockFactory.class);
        Block block = blockFactory.createFrom(echo, blockCtx, null);
       
        msg.setBodyBlock(block);
       
        MessageContext mc = new MessageContext();
        mc.setMEPContext(new MEPContext(mc));
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.