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

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


     * simulate a different Dispatch<String> flow
     * @throws Exception
     */
    public void testStringOutflow2() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // Create a Block using the sample string as the content.  This simulates
        // what occurs on the outbound JAX-WS dispatch<String> client
        Block block = f.createFrom(sampleText, null, null);

        // We didn't 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


     * simulate a different String parameter flow
     * @throws Exception
     */
    public void testStringOutflow3() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // 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(sampleText, null, sampleQName);

        // Make sure the QName is correct.
        QName qName = block.getQName();
        assertTrue(sampleQName.equals(qName));

View Full Code Here

     * normal Dispatch<String> input flow
     * @throws Exception
     */
    public void testStringInflow() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // On inbound, there will already be a XMLStreamReader (probably from OM)
        // 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 String);
View Full Code Here

     * slightly more complicated Dispatch<String> inflow
     * @throws Exception
     */
    public void testStringInflow2() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // On inbound, there will already be a XMLStreamReader (probably from OM)
        // 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

     * slightly more complicated String  inflow
     * @throws Exception
     */
    public void testStringInflow3() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // On inbound, there will already be a XMLStreamReader (probably from OM)
        // 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);

        // Let's assume we need to get the QName to find the operation name.
        QName qName = block.getQName();
        assertTrue(sampleQName.equals(qName));

View Full Code Here

     * normal Dispatch<String> flow
     * @throws Exception
     */
    public void testStringOutflow() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // Create a Block using the sample string as the content.  This simulates
        // what occurs on the outbound JAX-WS dispatch<String> client
        Block block = f.createFrom(sampleText, null, null);

        // We didn't pass in a qname, so the following should return false
        assertTrue(!block.isQNameAvailable());

        // Assuming no handlers are installed, the next thing that will happen
View Full Code Here

     * simulate a different Dispatch<String> flow
     * @throws Exception
     */
    public void testStringOutflow2() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // Create a Block using the sample string as the content.  This simulates
        // what occurs on the outbound JAX-WS dispatch<String> client
        Block block = f.createFrom(sampleText, null, null);

        // We didn't 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

     * simulate a different String parameter flow
     * @throws Exception
     */
    public void testStringOutflow3() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // 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(sampleText, null, sampleQName);

        // Make sure the QName is correct.
        QName qName = block.getQName();
        assertTrue(sampleQName.equals(qName));

View Full Code Here

     * normal Dispatch<String> input flow
     * @throws Exception
     */
    public void testStringInflow() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // On inbound, there will already be a XMLStreamReader (probably from OM)
        // 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 String);
View Full Code Here

     * slightly more complicated Dispatch<String> inflow
     * @throws Exception
     */
    public void testStringInflow2() throws Exception {
        // Get the BlockFactory
        XMLStringBlockFactory f = (XMLStringBlockFactory)
        FactoryRegistry.getFactory(XMLStringBlockFactory.class);

        // On inbound, there will already be a XMLStreamReader (probably from OM)
        // 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

TOP

Related Classes of org.apache.axis2.jaxws.message.factory.XMLStringBlockFactory

Copyright © 2018 www.massapicom. 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.