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

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


        // which represents the message.  We will simulate this with inflow.
        StringReader sr = new StringReader(sampleText);
        XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);

        // Create a Block from the inflow. 
        Block block = f.createFrom(inflow, null, null);

        // Let's assume we need to get the QName to find the operation name.
        // This will cause an underlying parse
        QName qName = block.getQName();
        assertTrue(sampleQName.equals(qName));
View Full Code Here


                        (OMBlockFactory)FactoryRegistry.getFactory(OMBlockFactory.class);
                ArrayList<Block> list = new ArrayList<Block>();
                Iterator it = detail.getChildElements();
                while (it.hasNext()) {
                    OMElement om = (OMElement)it.next();
                    Block b = bf.createFrom(om, null, om.getQName());
                    list.add(b);
                }
                blocks = new Block[list.size()];
                blocks = list.toArray(blocks);
            }
View Full Code Here

                ArrayList<Block> list = new ArrayList<Block>();
                Iterator it = detail.getChildElements();
                while (it.hasNext()) {
                    DetailEntry de = (DetailEntry)it.next();
                    OMElement om = converter.toOM(de);
                    Block b = bf.createFrom(om, null, om.getQName());
                    list.add(b);
                }
                blocks = new Block[list.size()];
                blocks = list.toArray(blocks);
            }
View Full Code Here

    // what occurs on the outbound JAX-WS dispatch<OMElement> client
    StringReader sr = new StringReader(sampleText);
    XMLStreamReader inputReader = inputFactory.createXMLStreamReader(sr);
    StAXOMBuilder builder = new StAXOMBuilder(inputReader)
    OMElement om = builder.getDocumentElement();
    Block block = f.createFrom(om, null, null);
   
    // Assuming no handlers are installed, the next thing that will happen
    // is a XMLStreamReader will be requested...to go to OM.   At this point the
    // block should be consumed.
    XMLStreamReader reader = block.getXMLStreamReader(true);
View Full Code Here

    // what occurs on the outbound JAX-WS dispatch<OMElement> client
    StringReader sr = new StringReader(sampleText);
    XMLStreamReader inputReader = inputFactory.createXMLStreamReader(sr);
    StAXOMBuilder builder = new StAXOMBuilder(inputReader)
    OMElement om = builder.getDocumentElement();
    Block block = f.createFrom(om, null, 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

    // which represents the message.  We will simulate this with inflow.
    StringReader sr = new StringReader(sampleText);
    XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
   
    // Create a Block from the inflow. 
    Block block = f.createFrom(inflow, null, null);
   
    // Let's assume we need to get the QName to find the operation name.
    // This will cause an underlying parse
    QName qName = block.getQName();
    assertTrue(sampleQName.equals(qName));
View Full Code Here

        StreamSource ss = new StreamSource(new StringReader(sampleText));

        // Create a Block using the sample string as the content.  This simulates
        // what occurs on the outbound JAX-WS String parameter on the client.
        // In this case, we know the QName prior to creating the Block...so let's pass it in.
        Block block = f.createFrom(ss, null, sampleQName);

        // We passed in a qname, so it should be immediately available
        assertTrue(block.isQNameAvailable());

        // Make sure the QName is correct.
View Full Code Here

        // which represents the message.  We will simulate this with inflow.
        StringReader sr = new StringReader(sampleText);
        XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);

        // Create a Block from the inflow. 
        Block block = f.createFrom(inflow, null, null);

        // Assuming no handlers are installed, the next thing that will happen
        // is the proxy code will ask for the business object (String).
        Object bo = block.getBusinessObject(true);
        assertTrue(bo instanceof Source);
View Full Code Here

        // which represents the message.  We will simulate this with inflow.
        StringReader sr = new StringReader(sampleText);
        XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);

        // Create a Block from the inflow. 
        Block block = f.createFrom(inflow, null, null);

        // Let's assume we need to get the QName to find the operation name.
        // This will cause an underlying parse
        QName qName = block.getQName();
        assertTrue(sampleQName.equals(qName));
View Full Code Here

        // which represents the message.  We will simulate this with inflow.
        StringReader sr = new StringReader(sampleText);
        XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);

        // Create a Block from the inflow.  Assume that we know the QName already
        Block block = f.createFrom(inflow, null, sampleQName);

        // We passed in a qname, so the following should return false
        assertTrue(block.isQNameAvailable());

        // Let's assume we need to get the QName to find the operation name.
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.