Examples of PurchaseOrderType


Examples of address.PurchaseOrderType

        // order defined by the propOrder annotation element in class
        // USAddress.       
        JAXBContext jc = JAXBContext.newInstance(PurchaseOrderType.class);
        Unmarshaller u = jc.createUnmarshaller();
        try {
            PurchaseOrderType poType = (PurchaseOrderType)u.unmarshal(new
            File("src/testData.xml"));
            System.out.println(poType.toString());
        } catch(javax.xml.bind.UnmarshalException e){
            System.out.println("Main: " + e);
        }   
    }
View Full Code Here

Examples of address.PurchaseOrderType

        // A bill to type
        USAddress billto = new USAddress("Robert Smith", "8 Oak Avenue",
        "Old Town", "PA", 95819);

        // A purchaseOrder
        PurchaseOrderType po = new PurchaseOrderType();
        po.billTo = billto;
        po.shipTo = billto;

        // Demonstates shipping and billing data printed in the property
        // order defined by the propOrder annotation element in class
View Full Code Here

Examples of com.acme.purchaseOrder.x2005.x08.PurchaseOrderType

       
        OrderService client =
            (OrderService) new XFireProxyFactory().create(serviceModel, url);
       
        PurchaseOrderDocument poDoc = PurchaseOrderDocument.Factory.newInstance();
        PurchaseOrderType po = poDoc.addNewPurchaseOrder();
       
        Address add = Address.Factory.newInstance();
        add.setName("Jane Doe");
        add.setStreet("123 Main St");
        add.setCountry("USA");
       
        po.setBillTo(add);
        po.setShipTo(add);
       
        po.setOrderDate(Calendar.getInstance());
       
        System.out.println("Purchase Order ID: " + client.receiveOrder(poDoc).getPurchaseOrderId());
    }
View Full Code Here

Examples of com.acme.purchaseOrder.x2005.x08.PurchaseOrderType

    }

    public PurchaseOrderIdDocument receiveOrder(PurchaseOrderDocument purchaseOrder)
        throws XFireFault
    {
        PurchaseOrderType order = purchaseOrder.getPurchaseOrder();
        order.setPurchaseOrderId(count++);

        PurchaseOrderIdDocument pid = PurchaseOrderIdDocument.Factory.newInstance();
        pid.setPurchaseOrderId(order.getPurchaseOrderId());

        return pid;
    }
View Full Code Here

Examples of com.example.ipo.jaxb.PurchaseOrderType

        expect(tContext1.getSourceDataType()).andReturn(sourceDataType).anyTimes();
        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        PurchaseOrderType po = new ObjectFactory().createPurchaseOrderType();
        Node node = t1.transform(po, tContext1);

        Assert.assertNotNull(node);

    }
View Full Code Here

Examples of com.example.ipo.jaxb.PurchaseOrderType

    @SuppressWarnings("unchecked")
    @Test
    public void testCopy() {
        ObjectFactory factory = new ObjectFactory();
        PurchaseOrderType poType = factory.createPurchaseOrderType();
        JAXBElement<PurchaseOrderType> po = factory.createPurchaseOrder(poType);
        JAXBElement<PurchaseOrderType> copy = (JAXBElement<PurchaseOrderType>)binding.copy(po, null, null);
        assertEquals(new QName("http://www.example.com/IPO", "purchaseOrder"), copy.getName());
    }
View Full Code Here

Examples of com.example.ipo.jaxb.PurchaseOrderType

    }

    @Test
    public void testCopyNonElement() {
        ObjectFactory factory = new ObjectFactory();
        PurchaseOrderType poType = factory.createPurchaseOrderType();
        poType.setComment("Comment");
        PurchaseOrderType copy = (PurchaseOrderType)binding.copy(poType, null, null);
        assertTrue(copy instanceof PurchaseOrderType);
        assertEquals("Comment", (copy).getComment());
    }
View Full Code Here

Examples of com.example.ipo.jaxb.PurchaseOrderType

        TransformationContext tContext1 = new TransformationContextImpl();
        tContext1.setSourceDataType(sourceDataType);


        JAXB2Node t1 = new JAXB2Node();
        PurchaseOrderType po = new ObjectFactory().createPurchaseOrderType();
        Node node = t1.transform(po, tContext1);

        Assert.assertNotNull(node);

    }
View Full Code Here

Examples of com.example.ipo.jaxb.PurchaseOrderType

    }

    @SuppressWarnings("unchecked")
    public void testCopy() {
        ObjectFactory factory = new ObjectFactory();
        PurchaseOrderType poType = factory.createPurchaseOrderType();
        JAXBElement<PurchaseOrderType> po = factory.createPurchaseOrder(poType);
        JAXBElement<PurchaseOrderType> copy = (JAXBElement<PurchaseOrderType>)binding.copy(po, null, null);
        assertEquals(new QName("http://www.example.com/IPO", "purchaseOrder"), copy.getName());
    }
View Full Code Here

Examples of com.example.ipo.jaxb.PurchaseOrderType

    }

    @SuppressWarnings("unchecked")
    public void testCopyNonElement() {
        ObjectFactory factory = new ObjectFactory();
        PurchaseOrderType poType = factory.createPurchaseOrderType();
        poType.setComment("Comment");
        PurchaseOrderType copy = (PurchaseOrderType)binding.copy(poType, null, null);
        assertTrue(copy instanceof PurchaseOrderType);
        assertEquals("Comment", (copy).getComment());
    }
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.