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

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


                // 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("We only support SOAP11 and SOAP12 for JAXWS handlers");
            }
View Full Code Here

                message.setXMLFault((XMLFault)value);
            } else if (providerServiceMode != null && providerServiceMode == Service.Mode.MESSAGE) {
                // For MESSAGE mode, work with the entire message, Headers and Body
                // This is based on logic in org.apache.axis2.jaxws.client.XMLDispatch.createMessageFromBundle()
                if (value instanceof SOAPMessage) {
                    message = msgFactory.createFrom((SOAPMessage)value);
                } else {
                    Block block = factory.createFrom(value, null, null);
                    message = msgFactory.createFrom(block, null, messageProtocol);
                }
            } else {
View Full Code Here

                // This is based on logic in org.apache.axis2.jaxws.client.XMLDispatch.createMessageFromBundle()
                if (value instanceof SOAPMessage) {
                    message = msgFactory.createFrom((SOAPMessage)value);
                } else {
                    Block block = factory.createFrom(value, null, null);
                    message = msgFactory.createFrom(block, null, messageProtocol);
                }
            } else {
                // PAYLOAD mode deals only with the body of the message.
                Block block = factory.createFrom(value, null, null);
                message = msgFactory.create(messageProtocol);
View Full Code Here

    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);
   
    assertTrue(m.isFault());
   
    if (m.isFault()) {
      XMLFault x = m.getXMLFault();
View Full Code Here

      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);

      assertTrue(m.isFault());
     
      if (m.isFault()) {
        XMLFault x = m.getXMLFault();
View Full Code Here

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

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

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

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

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.