maxep / maxb

The Mobile Architecture for XML Binding (MAXB) provides a XSD to IOS Objective-C and Android Java binding compiler based on JAXB XJC.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAXB

CI Status npm Release Issues

The Mobile Architecture for XML Binding (MAXB) provides a XSD to IOS Objective-C and Android Java binding compiler based on JAXB XJC.

##Note MAXB is initially a fork of mxjc.

MXJC (and related projects: mwsc, nano & pico) has been developed by bulldog2011 but stayed as is from 2013. As it is very well designed and implemented, I decided to fork and upgrade it.

##Feature Highlight

  1. Standard based : based on Oracle JAXB 2.1 XJC, recognize most standard XML Schema components.
  2. Objective-c Pico Binding Support : auto-generate PicoKit for IOS bindable classes from XML Schema or WSDL.
  3. Android Nano Binding Support : auto-generate NanoKit for Android bindable classes from XML Schema or WSDL.
  4. Doc Auto Generation : auto-generate code comments from XML Schema or WSDL annotations.
  5. JAXB Binding Customization : support JAXB binding customization in case the code generated by defaut binding does not meet real needs.

##How to Use

Download zip package from repository mentioned in version history below, latest stable release is 0.7.0, then extract the zip file and run mxjc script in command line:

Usage: maxb [-options ...] <schema file/URL/dir> ... [-b <bindinfo>] ...
If dir is specified, all schema files in it will be compiled.
Options:
-nano              :  target Nano for Android as code generation target (default)
-privateField      :  generate private fields, accessed by public accessors, only for nano binding
-pico              :  target Pico for IOS as code generation target
-prefix <prefix>   :  add prefix to the target classes, only for pico binding
(recommended to avoid possible name conflict)
-nv                :  do not perform strict validation of the input schema(s)
-b <file/dir>      :  specify external bindings files (each <file> must have its own -b)
If a directory is given, **/*.xjb is searched
-d <dir>           :  generated files will go into this directory
-p <pkg>           :  specifies the target package
-httpproxy <proxy> :  set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
-httpproxyfile <f> :  Works like -httpproxy but takes the argument in a file to protect password
-readOnly          :  generated files will be in read-only mode
-xmlschema         :  treat input as W3C XML Schema (default)
-wsdl              :  treat input as WSDL and compile schemas inside it (experimental,unsupported)
-verbose           :  be extra verbose
-quiet             :  suppress compiler output
-help              :  display this help message
-version           :  display version information

Version History

0.7.0 — April 9, 2015 : repository

0.6.1 — April 14, 2013 : repository

  • This version is compatible with Nano 0.7.0 and Pico 0.5.0
  • Enhancement: support generating public fields(default) for Nano
  • Enhancement: support generating fields ordering for Nano
  • Enhancement: support generating XSD any element for Nano

0.6.0 — March 25, 2013 : repository

  • This version is compatible with Nano 0.6.3 and Pico 0.5.0
  • Feature: support Pico binding for IOS 0.5.0
  • Enhancement: support generating XSD any element for Pico 0.5.0

0.5.1 — February 5, 2013 : repository

  • Initial version supporting Nano binding for Android.
  • This version is compatible with Nano 0.6.3

##Docs

  1. Scheam driven data binding with Nano and mxjc
  2. Schema Driven Web Serivce Client Development on Android, Part 1 : Hello eBay Finding
  3. Schema Driven Web Serivce Client Development on Android, Part 2 : eBay Search App

##Faq Link to Faq on Wiki

##Current Limitation

  1. xsd:choice is not supported and will be ignored if presents
  2. xsd nest anonymous type is only experimentally supported and is not recommended to use.
  3. only single target namespace is supported
  4. xsd any attribute is not supported

License

MAXB is available under the MIT license. See the LICENSE file for more info.

About

The Mobile Architecture for XML Binding (MAXB) provides a XSD to IOS Objective-C and Android Java binding compiler based on JAXB XJC.

License:MIT License


Languages

Language:Java 100.0%