scalaxb 1.4.0

SOAP/REST changes

  • Adds requestTimeout and connectionTimeout to DispatchHttpClients. #304 by @eed3si9n
  • Adds --no-dispatch-client option (generateDispatchClient := false). #322 by @liff
  • Adds --dispatch-as option (generateDispatchAs := true) for Dispatch's Http(request > as.scalaxb[A]) support. #332 by @arkadius

other enhancements

  • Adds --ignore-unknown option (ignoreUnknown := true) to ignore unknown XML elements, as well as order in which they are arrived. #310 by @jet-black
  • Adds --no-varargs option to use Seq instead of the varargs. #292/#309 by @lbruand and @Erwan56
  • Improves handling of duplicate enumeration values. #308 by @donderom
  • Refactors configuration into a sequence of case classes. #342 by @eed3si9n

bug fixes

compiler warnings

The code generated by scalaxb 1.4.0 should no longer generate compiler warnings.

  • Adds SIP-18 imports to the generated code. #294 by @carl297r
  • Removes "adapting argument list" and other compiler warnings from the generetad code. #321 by @liff
  • Removes compiler warnings from the scalaxb code. #335 by @justjoheinz
  • Removes postfix usages in the generated code.
  • Adds -Xfatal-warnings during the integration tests. #343 by @eed3si9n


A huge thanks to everyone who has helped to improve scalaxb by reporting bugs and sending pull requests!

According to git shortlog -sn --no-merges 1.3.0..release/1.4.0 ten people contributed to this release: Eugene Yokota (@eed3si9n), @jet-black, Olli Helenius (@liff), Lucas Bruand (@lbruand), Markus Klink (@justjoheinz), Carl Livermore (@carl297r), Arek Burdach (@arkadius), Joe Barnes (@joescii), @Erwan56, Roman Parykin (@donderom).

scalaxb 1.3.0

breaking changes

  • Dropping SOAP RPC/encoded support.
  • Makes SOAP faultactor a String. #268 by @rubbish
  • Generates >22 case classes by default. #280
  • Generates attributes field to handle all attributes. #286

SOAP changes

  • Fixes the handling of message parts involving headers. #285 by @plaflamme
  • Fixes nillable fault support. #284
  • Makes http instances lazy. #279 by @rubbish
  • Implements toString methods for faults. #278

case class >22 and attributes change

Starting scalaxb 1.3.0, the generated code will be >22 by default. In addition, all attributes will be handled via attributes field.

To bring back the older behavior:

contentsSizeLimit in (Compile, scalaxb) := 20

namedAttributes in (Compile, scalaxb) := true

Related, 1.3.0 fixes attribute's default value handling #288.


Thanks to YourKit for supporting scalaxb! YourKit Java Profiler works great for profiling Scala applications.

scalaxb with Scala 2.11

Starting scalaxb 1.2.0 it supports Scala 2.11.x. Since Scala 2.11 modularizes XML and parser combinators, it requires additional setup on your part. Here's using sbt 0.13's multi-project build.sbt syntax:

import ScalaxbKeys._
lazy val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.0.2"
lazy val scalaParser = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.1"
lazy val dispatchV = "0.11.2" // change this to appropriate dispatch version
lazy val dispatch = "net.databinder.dispatch" %% "dispatch-core" % dispatchV
lazy val root = (project in file(".")).

scalaxb 1.2.1

This is a bug fix release focused on fixing the SOAP code generation. See using SOAP for more details.

SOAP bug fixes

  • Fixes xs:AnyType handling. #265
  • Fixes asFault not Throwable error. #264 reported by @romainreuillon
  • Fixes the generated code for multipart SOAP message. #267 reported by @tomhaigh
  • Fixes the definition of HttpClientsAsync to use concurrent.Future. #269 reported by @hedefalk
  • Adds --blocking command line option to generate blocking SOAP client.

minor enhancements

  • Masks scalaxb package that's used internally to generate code.

scalaxb 1.2.0

non-blocking SOAP

scalaxb 1.2.0 generates non-blocking SOAP code by default. Instead of Either[X, A], the SOAP call returns Future[A] and the fault, if any, is thrown as Future's failure semantics.

// default
def getQuote(symbol: Option[String]): Future[stockquote.GetQuoteResponse]
// async in (Compile, scalaxb) := false
def getQuote(symbol: Option[String]): Either[scalaxb.Fault[Any], stockquote.GetQuoteResponse]

This feature was contributed by @jlavallee and @hoff2 as #213/#259. See using soap for more details.

SOAP bug fixes

  • Escapes reserve words appearing as a parameter in SOAP. #252/#256 contributed by @romainreuillon
  • Escapes reserve words appearing as an operation name in SOAP. #241 reported by @rcgoodfellow
  • Fixes handling of nillable elements appearing in SOAP. #229 reported by @barnesjd
  • Fixes string encoding problems while posting SOAP. #231 reported by @hedefalk
  • Supports Dispatch 0.11.1.
  • Fixes response parsing for literal RPC style. #260 reported by @romainreuillon

bug fixes and minor enhancements

  • Drops Scala 2.9.0 and removing deprecated warnings.
  • Caches DatatypeFactory instance to ThreadLocal. #243 contributed by @malaporte
  • Fixes handing of zero-length prefix. #253/#255 contributed by @romainreuillon
  • Fixes mixed attribute not being inherited when extending a complex type. #228 reported by @choffmeister
  • Fixes non-terminating parser when unbounded is nested. #230 reported by @FranklinChen
  • Fixes handling of xs:element with default with minOccurs = 1. #245 reported by @alboko
  • Fixes handling of very long xs:enumeration value. #247 reported by @jcranky
  • Fixes handling of xs:element names with symbols when --class-prefix is passed. #251 reported by @romangarcia
  • Fixes xs:group parser getting inherited twice. #238 reported by @choeger

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.


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
Syndicate content