Examples of createFrom()


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

                SOAPMessage message = mf.createMessage();
                SOAPBody body = message.getSOAPBody();
                SOAPFault soapFault = XMLFaultUtils.createSAAJFault(xmlFault, body);

                MessageFactory msgFactory = (MessageFactory) FactoryRegistry.getFactory(MessageFactory.class);
                Message msg = msgFactory.createFrom(message);
                mepCtx.setMessage(msg);

            } else {
                WebServiceException wse = ExceptionFactory.makeWebServiceException(Messages.getMessage("cFaultMsgErr"));
                if (log.isDebugEnabled()) {
View Full Code Here

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

                    String content = env.toStringWithConsume();
                  
                    MessageFactory mf = (MessageFactory) FactoryRegistry.getFactory(MessageFactory.class);
                    StringReader sr = new StringReader(content);
                    XMLStreamReader stream = StAXUtils.createXMLStreamReader(sr);
                    Message msg = mf.createFrom(stream, mepCtx.getMessageObject().getProtocol());
                  
                    // This is required for proper serialization of the OM structure.
                    msg.getAsOMElement().build();
                   
                    mepCtx.setMessage(msg);
View Full Code Here

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

        OMElement omElement = builder.getSOAPEnvelope();
       
        // Create a SOAP 1.1 Message from the sample incoming XML
        MessageFactory mf = (MessageFactory)
            FactoryRegistry.getFactory(MessageFactory.class);
        Message m = mf.createFrom(omElement, null);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
        // The Message must respond appropriately without doing a conversion.
        boolean isFault = m.isFault();
        assertTrue(!isFault);
View Full Code Here

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

        OMElement omElement = builder.getSOAPEnvelope();
       
        // Create a SOAP 1.1 Message from the sample incoming XML
        MessageFactory mf = (MessageFactory)
            FactoryRegistry.getFactory(MessageFactory.class);
        Message m = mf.createFrom(omElement, null);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
        // The Message must respond appropriately without doing a conversion.
        boolean isFault = m.isFault();
        assertTrue(!isFault);
View Full Code Here

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

        // 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(sampleSoap12Envelope, null, null);
       
        // Create a Message with the full XML contents that we have
        Message m = mf.createFrom(block.getXMLStreamReader(true), 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.
        OMElement om = m.getAsOMElement();
View Full Code Here

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

        OMElement omElement = builder.getSOAPEnvelope();
       
        // The JAX-WS layer creates a Message from the OM
        MessageFactory mf = (MessageFactory)
            FactoryRegistry.getFactory(MessageFactory.class);
        Message m = mf.createFrom(omElement, null);
       
        // Make sure the right Protocol was set on the Message
        assertTrue(m.getProtocol().equals(Protocol.soap12));
       
        // Check the SOAPEnvelope to make sure we've got the right
View Full Code Here

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

        OMElement omElement = builder.getSOAPEnvelope();
       
        // The JAX-WS layer creates a Message from the OM
        MessageFactory mf = (MessageFactory)
            FactoryRegistry.getFactory(MessageFactory.class);
        Message m = mf.createFrom(omElement, null);
       
        // Make sure the right Protocol was set on the Message
        assertTrue(m.getProtocol().equals(Protocol.soap12));
       
        // Check the SOAPEnvelope to make sure we've got the right
View Full Code Here

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

                // TODO something is wrong here.  The message should be a response message, not
                // a request message.  I don't see how to change that.  (see the debugger...)
                // TODO probably also need to turn on message.WRITE_XML_DECLARATION
                MessageFactory msgFactory = (MessageFactory) FactoryRegistry.getFactory(MessageFactory.class);
                Message msg = msgFactory.createFrom(message);
                mepCtx.setMessage(msg);

            } else {
                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("cFaultMsgErr"));
            }
View Full Code Here

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

                        (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

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

                ArrayList<Block> list = new ArrayList<Block>();
                Iterator it = detail.getDetailEntries();
                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
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.