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

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


        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(context.getJAXBContext());
        QName expectedQName = jbi.getElementName(jaxb);
       
    // Create a Block using the sample string as the content.  This simulates
    // what occurs with an outbound JAX-WS JAXB parameter
    Block block = f.createFrom(jaxb, context, expectedQName);
   
    // We did pass in a qname, so the following should return false
    assertTrue(block.isQNameAvailable());
   
    // Assume that we need to find the QName (perhaps to identify the operation and
View Full Code Here


        sw.flush();
    StringReader sr = new StringReader(sw.toString());
    XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
   
    // Create a Block from the inflow. 
    Block block = f.createFrom(inflow, context, null);
   
    // Assuming no handlers are installed, the next thing that will happen
    // is the proxy code will ask for the business object.
    Object bo = block.getBusinessObject(true);
    assertTrue(bo instanceof EchoString);
View Full Code Here

        sw.flush();
    StringReader sr = new StringReader(sw.toString());
    XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
   
    // Create a Block from the inflow. 
    Block block = f.createFrom(inflow, context, null);
       
    // Assume that we need to find the QName (perhaps to identify the operation and
    // determine if handlers are installed).   This is not very perfomant since
    // it causes an underlying parse of the String...but we need to support this.
    QName qName = block.getQName();
View Full Code Here

        sw.flush();
    StringReader sr = new StringReader(sw.toString());
    XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
   
    // Create a Block from the inflow. 
    Block block = f.createFrom(inflow, context, expectedQName);
   
    // We passed in a qname, so the following should return false
    assertTrue(block.isQNameAvailable());
   
    // Assume that we need to find the QName (perhaps to identify the operation and
View Full Code Here

            // Put the object into the message
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);

            Block block = factory.createFrom(object,
                                             new JAXBBlockContext(packages, packagesKey),
                                             wrapperQName);
            m.setBodyBlock(block);

            return m;
View Full Code Here

            // Put the object into the message
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);

            Block block = factory.createFrom(object,
                                             new JAXBBlockContext(packages, packagesKey),
                                             wrapperQName);
            m.setBodyBlock(block);

            return m;
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.setMessage(msg);
View Full Code Here

            // Put the object into the message
            JAXBBlockFactory factory =
                    (JAXBBlockFactory)FactoryRegistry.getFactory(JAXBBlockFactory.class);

            Block block = factory.createFrom(object,
                                             new JAXBBlockContext(packages),
                                             wrapperQName)// The factory will get the qname from the value
            m.setBodyBlock(block);

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

            }

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

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

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.