1 / 11

Java Web Services Developer JAXB

Java Web Services Developer JAXB. Ing. Lennon Shimokawa Miyashiro http://lshimokawa.net lshimokawa@gmail.com. JAXB. Java Architecture for XML Binding Binding entre XML Schemas y objetos Java Marshal y unmarshal Java--->XML XML--->Java. JAXB 2.0. Soporte para todos los Schemas W3C XML

garvey
Download Presentation

Java Web Services Developer JAXB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Web Services DeveloperJAXB Ing. Lennon Shimokawa Miyashiro http://lshimokawa.net lshimokawa@gmail.com

  2. JAXB • Java Architecture for XML Binding • Binding entre XML Schemas y objetos Java • Marshal y unmarshal • Java--->XML • XML--->Java

  3. JAXB 2.0 • Soporte para todos los Schemas W3C XML • Soporte Java-to-XML y XML-to-Java • Número de clases generadas reducidas • Validaciones

  4. Usos de JAXB • Generar clases Java JAXB desde XML schemas • Usar clases JAXB para hacer marshal y un marshal de contenido XML • Crear un Java content tree usando clases Java JAXB • Validar el contenido XML durante el proceso de unmarshalling en runtime • Customizar JAXB schema-to-Java bindings

  5. Arquitectura

  6. JAXB Binding Process

  7. JAXB Binding Process • Generar las clases a partir del XML Schema • Compilar las clases • Unmarshal • Generar el content tree • Validar • Procesar content tree • Marshal

  8. JAXB Compiler • xjc.bat para Windows • xjc.sh para Solaris/Linux • Transforma un schema XML a un conjunto de clases Java JAXB

  9. Unmarshalling • Convertir XML a objetos Java de JAXB

  10. Marshalling • Convertir objetos Java JAXB a XML • Usa UTF-8 por defecto

  11. JAXB default bindings • xsd:string java.lang.String • xsd:integer java.math.BigInteger • xsd:int int • xsd:long long • xsd:short short • xsd:decimal java.math.BigDecimal • xsd:float float • xsd:double double • xsd:boolean boolean • xsd:byte byte • xsd:QName javax.xml.namespace.QName • xsd:dateTime javax.xml.datatype.XMLGregorianCalendar

More Related