scalaxb

scalaxb is an XML data-binding tool for Scala that supports W3C XML Schema (xsd) and Web Services Description Language (wsdl) as the input file.

status

The latest is 1.1.2.
Many things still may not work. I'd really appreciate if you could run it against your favorite xsd file and let me know the result.

usage

$ scalaxb [options] <schema_file>...
 
  -d <directory> | --outdir <directory>
        generated files will go into <directory>
  -p <package> | --default-package <package>
        specifies the target package
  --package:<namespaceURI>=<package>
        specifies the target package for <namespaceURI>
  --class-prefix <prefix>
        prefixes generated class names
  --param-prefix <prefix>
        prefixes generated parameter names
  --prepend-family
        prepends family name to class names
  --wrap-contents <complexType>
        wraps inner contents into a seperate case class
  --contents-limit <size>
        defines long contents to be segmented (default: 20)
  --chunk-size <size>
        segments long sequences into chunks (default: 10)
  --package-dir
        generates package directories
  --protocol-file <name.scala>
        protocol file name (xmlprotocol.scala)
  --protocol-package <package>
        package for protocols
  --no-runtime
        skips runtime files
  -v | --verbose
        be extra verbose
  <schema_file>...
        input schema to be converted

scalaxb 1.1.2

bug fixes and minor enhancements

  • Fixes blank xs:enumeration value generating broken case object. #220 reported by @FranklinChen and others.
  • Fixes generated field for an attribute named value conflicting with the value field for xs:simpleContent. #221 reported by @lyle-janrain

scalaxb 1.1.1

breaking change to commandline

scalaxb cli used -p and --package to specify both the default package name and namespace-specific package names. scalaxb 1.1.1 uses -p and --default-package for the default package; and --package for namespace-specific package names.

bug fixes and minor enhancements

  • Avoids type names that only differs in case. #215 reported by @drdozer
  • Fixes handling of xs:all with minOccurs=0 and nillable. #216 reported by @minettiandrea
  • Fixes xsi:nil="1" not parsed as nil. #217 reported by @aoprisan
  • Improves handling of chameleon schema. #102
  • Configures dispatchVersion to 0.10.1 by default.
  • Updates sbt-scalaxb for sbt 0.13.

scalaxb 1.1.0

breaking changes

  • scalaxb now generates sys.error, so the generated code will no longer be compilable under Scala 2.8. #115 reported by @idot and others.

dispatchVersion

A new key dispatchVersion was added to generate Dispatch 0.10.x compatible code #210:

dispatchVersion in scalaxb in Compile := "0.10.0"

libraryDependencies <+=(dispatchVersion in scalaxb in Compile) { dv =>
  "net.databinder.dispatch" %% "dispatch-core" % dv
}

bug fixes and minor enhancements

  • Includes offending data in ParserFailure message. #206 requested by @caoilte
  • Fixes handling of QName enums. #208
  • sbt-scalaxb sorts *.xsd to avoid platform variance. #207 reported by @caoilte
  • sbt-scalaxb generates code only when the xsd files are modified. #199 requested by @fommil

scalaxb 1.0.2

bug fixes

  • Fixes handling of large groups. #188 reported by @workingDog
  • Fixes handling of xs:any with namespace constraints. #189
  • Removes upper limit on duplicate name resolution. #190
  • Fixes handling of enum values that are symbols. #191
  • Fixes xs:group references naming conflict. #192
  • Fixes handling of xs:choice that's made up of a foreign type. #193
  • Fixes handling of split xs:sequence whose only item is nillable and unbounded. #194
  • Fixes handling of xs:choice that includes a substitution group. #195
  • Fixes handling of complex types containing foreign xs:sequence. #196
  • Fixes handling of xs:group or a mixed complex type that includes an optional substitution group. #197
  • Fixes handling of complex types that directly or indirectly derives from xs:anySimpleType. #200/#203 reported by @sagarcjoshi
  • Fixes handling of mixed complex type that extends simple type. #205
  • Fixes DispatchHttpClients not handling non-200 results. reported and fixed by @dportabella in #204

scalaxb 1.0.1

bug fixes and minor enhancements

scalaxb 1.0.0

This is the first stable release of scalaxb.
Thanks to many people who tried it out, reported bugs, and contributed ideas and code.

breaking changes since 0.7

Some changes were made to adapt to Scala 2.10.0.

  • To avoid implicit conflict, the scalaxb package object no longer extends XMLStandardTypes.
  • scalaxb.XMLStandardTypes object was added to support explicitly importing implicits.
  • HexBinary class and Base64Binary class's toIndexedSeq method is now a field named vector.
  • The default http client for SOAP binding is upgraded to Dispatch 0.9.5.

bug fixes and minor enhancements

  • Fixes typo in element form check ("qualified") #168. Fixed by @mprihoda
  • More lenient handling of base64Binary encoding #173. Requested by @nmccready
  • Fixes generated code for named groups containing nillable choices #162. Reported by @rajish
  • Fixes attribute merging across namespace #174. Reporetd by @sbrownyarris
  • Fixes handling of chameleon schemas #176. Reported by @Marza
  • Fixes grandchildren types missing from generated XMLFormat of traits #178. Reported by @kidasoft
  • Fixes xs:boolean parsing #179. Fixed by @rssh

scalaxb 0.7.3

bug fixes

scalaxb 0.7.2

new logger

@martiell contributed a log4j wrapper that replaces logula. #161.
The main change is that our resolver is down to Sonatype:

resolvers += "sonatype-public" at "https://oss.sonatype.org/content/groups/public"

bug fixes and minor enhancements

  • Adds support for resolving SOAP encoding hrefs. #160. reported by @greenrd
  • Fixes xsi:type attribute wiping out other attributes due to SI-5843 #159. reported by @psnively
  • Fixes reserve word escaping when names contain trailing whitespaces. #163. reported by @dohzya

scalaxb 0.7.1

bug fixes and minor enhancements

  • Fixes RPC style soap. #153
  • Fixes generated code for imported groups. #156
Syndicate content