Package test

Examples of test.ObjectFactory


    // 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);
View Full Code Here


     * Serializing it.
     */
  public void testJAXBSourceInFlow1()throws Exception{
    //  Create a jaxb object
    try{
          ObjectFactory factory = new ObjectFactory();
          EchoString jaxb = factory.createEchoString();
          jaxb.setInput("Hello World");
          JAXBContext context = JAXBContext.newInstance("test");
        
          JAXBSource src = new JAXBSource(context.createMarshaller(), jaxb);
          BlockFactory f = (SourceBlockFactory)
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory bf = (JAXBBlockFactory)
            FactoryRegistry.getFactory(JAXBBlockFactory.class);
       
        // Create the JAX-B object
        ObjectFactory of = new ObjectFactory();
        EchoStringResponse obj = of.createEchoStringResponse();
        obj.setEchoStringReturn("sample return value");
       
        // Create the JAXBContext
        JAXBBlockContext context = new JAXBBlockContext(EchoStringResponse.class.getPackage().getName());
       
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory bf = (JAXBBlockFactory)
            FactoryRegistry.getFactory(JAXBBlockFactory.class);
       
        // Create the JAX-B object
        ObjectFactory of = new ObjectFactory();
        EchoStringResponse obj = of.createEchoStringResponse();
        obj.setEchoStringReturn("sample return value");
       
        // Create the JAXBContext
        JAXBBlockContext context = new JAXBBlockContext(EchoStringResponse.class.getPackage().getName());
      
View Full Code Here

    * Simple XML/HTTP Message Test
    * @throws Exception
    */
   public void testSimple() throws Exception {
       Dispatch<Object> dispatch = getDispatch();
       ObjectFactory factory = new ObjectFactory();
       EchoString request = factory.createEchoString();        
       request.setInput("SYNC JAXB XML PAYLOAD TEST");
      
       // Invoke the Dispatch<Object>
        TestLogger.logger.debug(">> Invoking sync Dispatch with JAX-B Parameter");
       EchoString response = (EchoString) dispatch.invoke(request);
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory bf = (JAXBBlockFactory)
            FactoryRegistry.getFactory(JAXBBlockFactory.class);
       
        // Create the JAX-B object
        ObjectFactory of = new ObjectFactory();
        EchoStringResponse obj = of.createEchoStringResponse();
        obj.setEchoStringReturn("sample return value");
       
        // Create the JAXBContext
        JAXBBlockContext context =
            new JAXBBlockContext(EchoStringResponse.class.getPackage().getName());
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory bf = (JAXBBlockFactory)
            FactoryRegistry.getFactory(JAXBBlockFactory.class);
       
        // Create the JAX-B object
        ObjectFactory of = new ObjectFactory();
        EchoStringResponse obj = of.createEchoStringResponse();
        obj.setEchoStringReturn("sample return value");
       
        // Create the JAXBContext
        JAXBBlockContext context =
            new JAXBBlockContext(EchoStringResponse.class.getPackage().getName());
View Full Code Here

     */
    public void testPersist_File() throws Exception {
       
        // Create the JAX-B object that is typical from a JAX-WS app
        String sampleJAXBText = "sample return value";
        ObjectFactory of = new ObjectFactory();
        EchoStringResponse obj = of.createEchoStringResponse();
        obj.setEchoStringReturn("sample return value");
       
        // The JAXB object is stored in the Axiom tree as an OMSourcedElement.
        // The typical structure is
        //   OM SOAPEnvelope
View Full Code Here

     */
    public void testPersist_InMemory() throws Exception {
       
        // Create the JAX-B object that is typical from a JAX-WS app
        String sampleJAXBText = "sample return value";
        ObjectFactory of = new ObjectFactory();
        EchoStringResponse obj = of.createEchoStringResponse();
        obj.setEchoStringReturn("sample return value");
       
        // The JAXB object is stored in the Axiom tree as an OMSourcedElement.
        // The typical structure is
        //   OM SOAPEnvelope
View Full Code Here

       
        // Force marshal by type
        context.setProcessType(Data.class);
       
        // Create an Data value
        ObjectFactory factory = new ObjectFactory();
        Data value = factory.createData();
        value.setInput("Hello World");
       
        // Create a JAXBElement
        QName qName = new QName("urn://sample", "data");
        JAXBElement jaxbElement = new JAXBElement(qName, Data.class, value);
View Full Code Here

TOP

Related Classes of test.ObjectFactory

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.