working project
This commit is contained in:
		| @@ -36,21 +36,21 @@ public class DAO { | ||||
|         exchange.getIn().setBody("SELECT * FROM package WHERE material_id = 1"); | ||||
|     } | ||||
|  | ||||
|     public void test2(Exchange exchange) throws InterruptedException { | ||||
|     public void test(Exchange exchange) throws InterruptedException { | ||||
|  | ||||
|         HashMap map = (HashMap) exchange.getIn().getBody(); | ||||
|         MaterialType materialType = new MaterialType(); | ||||
|         materialType.setId((Integer) map.get("id")); | ||||
|         materialType.setMaterialNumber((String) map.get("number")); | ||||
|         materialType.getMaterialType(); | ||||
|         materialType.setMaterialName(); | ||||
|         materialType.setDescription(); | ||||
|         materialType.setIsDeleted(); | ||||
|         materialType.getMaterialType(map.get("type")); | ||||
|         materialType.setMaterialName((String) map.get("name")); | ||||
|         materialType.setDescription((String) map.get("description")); | ||||
|         materialType.setIsDeleted((Boolean) map.get("is_deleted")); | ||||
|  | ||||
|  | ||||
|         //   System.out.println(tmp.getDescription()+tmp.getMaterialName()); | ||||
|         Thread.sleep(10000); | ||||
|         exchange.getIn().setBody("SELECT * FROM package WHERE material_id = 1"); | ||||
|         Thread.sleep(3000); | ||||
|         exchange.getIn().setBody(materialType); | ||||
|     } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -88,7 +88,7 @@ public class Main { | ||||
|                         .to("activemq:queue:materialTest"); | ||||
|  | ||||
|                 from("activemq:queue:materialTest") | ||||
|                         .bean(new DAO(), "test2") | ||||
|                         .bean(new DAO(), "test") | ||||
|                         .marshal(XMLDataFormat) | ||||
|                         .to("activemq:queue:test"); | ||||
|  | ||||
|   | ||||
							
								
								
									
										26
									
								
								target/classes/META-INF/JAXB/episode_default-cli.xjb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								target/classes/META-INF/JAXB/episode_default-cli.xjb
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||||
| <jaxb:bindings version="2.1" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"> | ||||
|   <!-- | ||||
|  | ||||
| This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2  | ||||
| See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>  | ||||
| Any modifications to this file will be lost upon recompilation of the source schema.  | ||||
| Generated on: 2021.11.18 at 12:37:46 PM CET  | ||||
|  | ||||
|   --> | ||||
|   <jaxb:bindings scd="x-schema::"> | ||||
|     <jaxb:schemaBindings map="false"> | ||||
|       <jaxb:package name="generated"/> | ||||
|     </jaxb:schemaBindings> | ||||
|     <jaxb:bindings scd="~materialType"> | ||||
|       <jaxb:class ref="generated.MaterialType"/> | ||||
|     </jaxb:bindings> | ||||
|     <jaxb:bindings scd="~package"> | ||||
|       <jaxb:class ref="generated.Package"/> | ||||
|     </jaxb:bindings> | ||||
|     <jaxb:bindings scd="~material_typeType"> | ||||
|       <jaxb:typesafeEnumClass ref="generated.MaterialTypeType"/> | ||||
|     </jaxb:bindings> | ||||
|   </jaxb:bindings> | ||||
| </jaxb:bindings> | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/DAO.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/DAO.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/Main$1.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/Main$1.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/Main.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/Main.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/Material$enumType.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/Material$enumType.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/Material.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/Material.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/MyAggregator.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/MyAggregator.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/MyBuilder$enumType.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/MyBuilder$enumType.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/MyBuilder.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/MyBuilder.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/com/release11/Package.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/com/release11/Package.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/generated/MaterialType.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/generated/MaterialType.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/generated/MaterialTypeType.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/generated/MaterialTypeType.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/generated/ObjectFactory.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/generated/ObjectFactory.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								target/classes/generated/Package.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								target/classes/generated/Package.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										20
									
								
								target/classes/material.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								target/classes/material.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| <material> | ||||
|     <material_number>7</material_number> | ||||
|     <material_type>A1</material_type> | ||||
|     <material_name>LEGO 17272</material_name> | ||||
|     <description>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</description> | ||||
|     <is_deleted>false</is_deleted> | ||||
|     <packages> | ||||
|         <package_number>11988</package_number> | ||||
|         <ean>80975098498590834</ean> | ||||
|         <unit_of_measure>pcs</unit_of_measure> | ||||
|         <dimension>17x17x17</dimension> | ||||
|         <description>Lorem ipsum dolor sit amet, consectetur adipiscing elit</description> | ||||
|     </packages> | ||||
|     <packages> | ||||
|         <package_number>118</package_number> | ||||
|         <ean>877854875843774</ean> | ||||
|         <unit_of_measure>pcs</unit_of_measure> | ||||
|         <dimension>20x20x20</dimension> | ||||
|     </packages> | ||||
| </material> | ||||
							
								
								
									
										45
									
								
								target/classes/material.xsd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								target/classes/material.xsd
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| <?xml version="1.0" encoding="utf-8" ?> | ||||
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||||
|  | ||||
|     <xs:complexType name="package"> | ||||
|         <xs:sequence> | ||||
|             <xs:element name="id" type="xs:int"/> | ||||
|             <xs:element name="material_id" type="xs:int"/> | ||||
|             <xs:element name="package_number" type="xs:int"/> | ||||
|             <xs:element name="ean" type="xs:string"/> | ||||
|             <xs:element name="unit_of_measure" type="xs:string"/> | ||||
|             <xs:element name="dimension" type="xs:string"/> | ||||
|             <xs:element name="description" type="xs:string" minOccurs="0"/> | ||||
|         </xs:sequence> | ||||
|     </xs:complexType> | ||||
|  | ||||
|     <xs:simpleType name="material_typeType" final="restriction"> | ||||
|         <xs:restriction base="xs:string"> | ||||
|             <xs:enumeration value="A1"/> | ||||
|             <xs:enumeration value="A2"/> | ||||
|             <xs:enumeration value="A3"/> | ||||
|             <xs:enumeration value="B1"/> | ||||
|             <xs:enumeration value="B2"/> | ||||
|             <xs:enumeration value="B3"/> | ||||
|             <xs:enumeration value="Z1"/> | ||||
|             <xs:enumeration value="Z2"/> | ||||
|             <xs:enumeration value="Z3"/> | ||||
|         </xs:restriction> | ||||
|     </xs:simpleType> | ||||
|  | ||||
|     <xs:complexType name="materialType"> | ||||
|         <xs:sequence> | ||||
|             <xs:element name="id" type="xs:int"/> | ||||
|             <xs:element name="material_number" type="xs:string"/> | ||||
|             <xs:element name="material_type" type="material_typeType"/> | ||||
|             <xs:element name="material_name" type="xs:string"/> | ||||
|             <xs:element name="description" type="xs:string"/> | ||||
|             <xs:element name="is_deleted" type="xs:boolean"/> | ||||
|             <xs:element name="packages" type="package" maxOccurs="unbounded"/> | ||||
|         </xs:sequence> | ||||
|     </xs:complexType> | ||||
|  | ||||
|     <xs:element name="material" type="materialType"/> | ||||
|  | ||||
|  | ||||
| </xs:schema> | ||||
							
								
								
									
										15
									
								
								target/classes/test.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								target/classes/test.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||
| <material> | ||||
|     <material_number>number8186</material_number> | ||||
|     <material_type>Z3</material_type> | ||||
|     <material_name>name2686</material_name> | ||||
|     <description>description7225</description> | ||||
|     <is_deleted>true</is_deleted> | ||||
|     <packages> | ||||
|         <package_number>number2274</package_number> | ||||
|         <ean>5903339152912</ean> | ||||
|         <unit_of_measure>unit1350</unit_of_measure> | ||||
|         <dimension>18x30x18</dimension> | ||||
|         <description>description7460</description> | ||||
|     </packages> | ||||
| </material> | ||||
| @@ -115,9 +115,10 @@ public class MaterialType { | ||||
|      * @return | ||||
|      *     possible object is | ||||
|      *     {@link MaterialTypeType } | ||||
|      *      | ||||
|      * | ||||
|      * @param type | ||||
|      */ | ||||
|     public MaterialTypeType getMaterialType() { | ||||
|     public MaterialTypeType getMaterialType(Object type) { | ||||
|         return materialType; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user