Examples of createFrom()


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

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

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

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

        QName paramQName = new QName("urn://sample", "param", "m");
        JAXBElement e = new JAXBElement(paramQName, StockPrice.class, obj);
       
        // Create a JAXBBlock using the param object as the content.  This simulates
        // what occurs on the outbound JAX-WS Proxy client
        Block block = bf.createFrom(e, context, null);
       
        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
View Full Code Here

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

        QName paramQName = new QName("urn://sample", "param", "m");
        JAXBElement e = new JAXBElement(paramQName, StockPrice.class, obj);
       
        // Create a JAXBBlock using the param object as the content.  This simulates
        // what occurs on the outbound JAX-WS Proxy client
        Block block = bf.createFrom(e, context, null);
       
        // Add the block to the message as normal body content.
        m.setBodyBlock(block);
       
        // Check to see if the message is a fault.  The client/server will always call this method.
View Full Code Here

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

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

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

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

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

            }

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

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

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

                    XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(sr);
                    MessageFactory mf = (MessageFactory)
                            FactoryRegistry.getFactory(MessageFactory.class);
                    Protocol protocol = requestMsgContext.getAxisMessageContext().isDoingREST() ?
                            Protocol.rest : null;
                    Message msg = mf.createFrom(xmlreader, protocol);
                    requestMsgContext.setMessage(msg);
                } catch (Throwable e) {
                    throw ExceptionFactory.makeWebServiceException(e);
                }
            }
View Full Code Here

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

                        (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
                // If the value contains just the xml data, then you can create the Message directly from the
                // Block.  If the value contains attachments, you need to do more.
                // TODO For now the only value that contains Attachments is SOAPMessage
                if (value instanceof SOAPMessage) {
                    message = mf.createFrom((SOAPMessage)value);
                } else {
                    block = factory.createFrom(value, null, null);
                    message = mf.createFrom(block, null, proto);
                }
            } catch (Exception e) {
View Full Code Here

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

                // TODO For now the only value that contains Attachments is SOAPMessage
                if (value instanceof SOAPMessage) {
                    message = mf.createFrom((SOAPMessage)value);
                } else {
                    block = factory.createFrom(value, null, null);
                    message = mf.createFrom(block, null, proto);
                }
            } catch (Exception e) {
                throw ExceptionFactory.makeWebServiceException(e);
            }
        }
View Full Code Here

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

                message.setBodyBlock(block);
            } else {
                // Message mode..rare case

                // Create Message from block
                message = mf.createFrom(block, null, proto);
            }

        } catch (Exception e) {
            throw ExceptionFactory.makeWebServiceException(e);
        }
View Full Code Here

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

        if (soapEnv != null) {
            MessageFactory msgFactory =
                    (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
            try {
                Protocol protocol = msgContext.isDoingREST() ? Protocol.rest : null;
                message = msgFactory.createFrom(soapEnv, protocol);
            } catch (Exception e) {
                throw ExceptionFactory.makeWebServiceException(
                    Messages.getMessage("msgFromMsgErr"), e);
            }
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.