Utilized XStrem in Green Integration

840 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
840
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Utilized XStrem in Green Integration

  1. 1. Utilized XStrem in Green Integration– Take CMCS Project for Example Albert Guo
  2. 2. Agenda <ul><li>Scenario </li></ul><ul><ul><li>System architecture </li></ul></ul><ul><ul><li>Where to launch </li></ul></ul><ul><ul><li>XML content example </li></ul></ul><ul><li>XStream </li></ul><ul><ul><li>What is XStream </li></ul></ul><ul><ul><li>XStream Features </li></ul></ul><ul><ul><li>Quick Start </li></ul></ul><ul><ul><li>XStream FAQ </li></ul></ul><ul><li>How to Implement </li></ul><ul><ul><li>Example1 </li></ul></ul><ul><ul><li>Example2 </li></ul></ul><ul><li>Summary </li></ul>© 2006 PTC
  3. 3. Scenario
  4. 4. System Architecture © 2006 PTC CIS Green Windchill Project Management Document Management Change Management Pro/E Wildfire Pro/E Work Space Pro/E PDMLink Supplier Management GSM/GCM Product Management (Part /BOM) Interface Table SAP ERP ProjectLink ODBC xml
  5. 5. Where to launch © 2006 PTC New Part Application Workflow New BOM Workflow Active BOM Workflow Export BOM to GSM xml
  6. 6. XML content example © 2006 PTC If the part has child, this part will be enclosed by <ProductLocationMapping>. If the part does not have child, then this part will be enclosed by <Line>
  7. 7. XStream
  8. 8. What is XStream <ul><li>http://xstream.codehaus.org/index.html </li></ul><ul><li>XStream is a simple library to serialize objects to XML and back again. </li></ul>© 2006 PTC serialize objects XML People.java name=albert birthplace=Jia-Yi People.xml <people> <name>albert</name> <birthplace>Jia-Yi</birthplace> </people>
  9. 9. XStream Architecture © 2006 PTC
  10. 10. XStream Features <ul><li>Ease of use </li></ul><ul><ul><li>A high level facade is supplied that simplifies common use cases. </li></ul></ul><ul><li>No mappings required </li></ul><ul><ul><li>Most objects can be serialized without need for specifying mappings. </li></ul></ul><ul><li>Performance </li></ul><ul><ul><li>Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput. </li></ul></ul><ul><li>Error messages </li></ul><ul><ul><li>When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem </li></ul></ul>© 2006 PTC
  11. 11. Quick Start © 2006 PTC
  12. 12. XStream FAQ © 2006 PTC
  13. 13. How to Implement
  14. 14. Steps © 2006 PTC
  15. 15. Example1
  16. 16. Example1 (1/2) © 2006 PTC People (name, tel, fax, email)
  17. 17. Example1 (2/2) © 2006 PTC
  18. 18. Example2
  19. 19. Analysis XSD or TLD © 2006 PTC Attribute for BOM POJO within BOM POJO with BOM Attribute for ProductLocationMapping POJO within ProductLocationMapping
  20. 20. Analysis XSD or TLD © 2006 PTC Attribute for ProductStructure Attribute for Line
  21. 21. Generate POJO © 2006 PTC
  22. 22. Set data into POJO (1/3) © 2006 PTC Enclosed by <Line> tag Enclosed by <ProductLocationMapping> tag
  23. 23. Set data into POJO (2/3) © 2006 PTC
  24. 24. Set data into POJO (3/3) © 2006 PTC
  25. 25. Initializing XStream Object & Serializing object to XML and write xml object into file © 2006 PTC
  26. 26. Summary
  27. 27. Summary © 2006 PTC Digester only have unmarshal function Betwixt/XStream have both marshal and unmarshal function Utilized JAXB to generate Java class from XSD

×