Examples of JAXBBlockFactory


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

   * slightly more complicated Dispatch<JAXB> flow
   * @throws Exception
   */
  public void testJAXBOutflow2() throws Exception {
    // Get the BlockFactory
    JAXBBlockFactory f = (JAXBBlockFactory)
      FactoryRegistry.getFactory(JAXBBlockFactory.class);
   
        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());
       
        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(context.getJAXBContext());
        QName expectedQName = jbi.getElementName(jaxb);
       
    // Create a Block using the sample string as the content.  This simulates
    // what occurs with an outbound JAX-WS JAXB parameter
    Block block = f.createFrom(jaxb, context, expectedQName);
   
    // We did 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
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.