scalaxb 0.7.0

Additional resolvers required

The logger is changed to logula.
For sbt-scalaxb, additional resolvers are now required:

resolvers ++= Seq(
  "sonatype-public" at "",
  "" at "")

addSbtPlugin("org.scalaxb" % "sbt-scalaxb" % "0.7.0")

bug fixes and minor enhancements

  • Fixes inner simple types being detected as duplicates. #136 reported by @bampoosa
  • Adds a few missing settings to sbt-scalaxb. #144 reported by @devinus
  • Fixes xs:any namespace attribute not defaulting to ##any. #147 reported by @champloo
  • Fixes soap 1.2 output wrapper. #143
  • Fixes handling of wsdl with mixed complex type. #149 reported by @jcranky
  • Fixes handling of wsdl with header outputs. #150 reported by @jcranky


  • mvn-scalaxb was updated by @martiell
  • Updated for deployment to Sonatype open source repository hosting.
  • M2E 1.1 compatible: no longer requires an m2e connector plugin or
    lifecycle mapping metadata in the pom.xml when used with m2eclipse 1.1.
  • Don't swallow stack traces when propagating exceptions from scalaxb.

multiple configs

A few people have asked me on how to configure a sbt build so scalaxb can be used multiple times, so let's take a look.
Here's the code:

$ git clone -b multipleconfigs git://
$ cd scalaxb-sample/multipleconfigs/

Now open the directory using your favorite editor.

In src/ we have main/scala/main.scala, main/xsd/ipo.xsd, and main/xsd/w.xsd.

when to go multiple configs?

scalaxb 0.6.8

bug fixes and minor enhancements

  • Fixes handling of cross-namespace extension. #135 reported by @psnively
  • Fixes parsing to reject extra elements at the end. #124
  • Relaxes wsdl parsing to handle out-of-order wsdls. #87
  • wsdl generates baseAddress as a def. #134 by @hedefalk

scalaxb 0.6.7

bug fixes and minor enhancements

  • Adds support for merging duplicate simple types. #116 reported by @OlegYch
  • Fixes substitution group parsing. #119 reported by @bmjsmith and #133 reported by @psnively
  • Fixes DataRecord equality. #120 reported by @deanhiller
  • Fixes package name of wsdl generated file. #117 reported by @hedefalk and @OlegYch
  • Fixes handling of empty input messages in wsdl. #122 reported by @hedefalk
  • Fixes handling of varg parameters in wsdl generated file. #125 reported by @hedefalk
  • Fixes simultaneous use of soap 1.1 and soap 1.2. #130 reported by @ben-manes
  • Fixes wsdl protocol package name.

scalaxb 0.6.6

bug fixes and minor enhancements

  • scalaxb changes were made by @eed3si9n
  • Fixes generated default scope by adding back the default namespace. #91 reported by @martiell
  • Fixes toXML handling of xs:anyAttribute. #95 reported by @deanhiller
  • Fixes generated defaultScope when the schema is unqualified. #97 reported by @deanhiller
  • Fixes xs:any repeating namespace bindings by merging them. #98 reported by @deanhiller
  • Fixes handling of xs:any with namespace="##local". #101 reported by @deanhiller
  • Adds --lax-any to ignore xs:any's namespace constraint. #103 requested by @deanhiller
  • Adds --version to display help message. #106 requested by @deanhiller
  • Adds --attribute-prefix to prefix parameters mapping an attribute. #92 reported by ido
  • Adds handling of xs:include without targetNamespace. #102 reported by @berntan
  • Adds handling of locally declared namespace binding. #105 reporetd by gerri
  • Fixes round trip of parsed QName. #114
  • Adds default argument to optional, multiple, and nillable params. #113 requested by @OlegYch

wsdl/soap related

  • Fixes handling of wsdl when soap bindings is not the first element. #104
  • Adds handling of soap messages with attributes. #99 reported by @berntan
  • Adds handling of soap messages with soap headers. #100 reported by @berntan
  • sbt-scalaxb and mvn-scalaxb processes wsdl first.
  • Fixes handling of wsdl with empty messages. #93 reported by @mbroue
  • Fixes handling of rpc-style return message on soap 1.1. #94 reported by @dkhenry



This page describes sbt-scalaxb for scalaxb 1.5.0 and above. See the following for older versions:

automate using sbt new

The following steps has been scripted into a giter8 template called eed3si9n/scalaxb.g8. For a quick project, run the following after installing sbt 0.13.13+.

$ sbt new eed3si9n/scalaxb.g8

scalaxb 0.6.5

breaking changes

In an effort to solve namespace conflicts and to increase consistency among the plugins, sbt plugins best practices was created. Here are the changes based on its recommendations:

keys are under ScalaxbKeys object

Keys provided by sbt-scalaxb now resides in ScalaxbKeys object. Place the following at the top of your build.sbt:

import ScalaxbKeys._

Scala identifiers for the keys remain the same (e.g. packageName), but key names accessible from the shell are now prefixed with scalaxb- (e.g. scalaxb-package-name).

settings are scoped under scalaxb task

scalaxb-specific settings are now scoped under scalaxb task. The default settings scalaxbSettings is scoped additionally by Compile configuration (no moreScalaxb configuration!).

seq(scalaxbSettings: _*)

packageName in scalaxb in Compile := "ipo"

sourceGenerators in Compile <+= scalaxb in Compile

If you wish to use scalaxb task multiple times in a project, you can do so by creating custom configurations in build.scala.

val Xsd = config("xsd") extend(Compile)
val Wsdl = config("wsdl") extend(Compile)
lazy val appSettings = buildSettings ++
  inConfig(Xsd)(baseScalaxbSettings ++ inTask(scalaxb)(customScalaxbSettings("xmlschema"))) ++
  inConfig(Wsdl)(baseScalaxbSettings ++ inTask(scalaxb)(customScalaxbSettings("wsdl11")))

def customScalaxbSettings(base: String): Seq[Project.Setting[_]] = Seq(
  sources <<= xsdSource map { xsd => Seq(xsd / (base + ".xsd")) },
  packageName := base,

bug fixes and minor enhancements

  • Fixes namespace binding conflict. #84 reported and fixed by jxstanford
  • Fixes anyType support in wsdl. #88 reported by radirk
  • Fixes SOAPAction header in wsdl.
  • Fixes Fault handling in wsdl.
  • Uses Logback internally for logging.

scalaxb 0.6.4

bug fixes and minor enhancements

  • Fixes sbt-scalaxb. #83
  • Fixes QName parsing to resolve URI. #82

scalaxb 0.6.3

bug fixes and minor enhancements

  • Fixes xs:gMonthDay support. #74
  • Fixes substitution group parsing. #79 reported by @jxstanford
  • Fixes SOAP 1.2 Content-Type HTTP header. #80
  • Adds RPC-style SOAP message support. #77
  • Changes the default protocol file name to xmlprotocol.scala.
  • Adds --protocol-file and --protocol-package option. #76
  • Duplicated types are now ignored. #78 requested by @timperrett

scalaxb 0.6.2

sbt-scalaxb for sbt 0.10.1

To call scalaxb from sbt 0.10.1, put this in your project/plugins/build.sbt:

libraryDependencies <+= (sbtVersion) { sv => "org.scalaxb" %% "sbt-scalaxb" % ("sbt" + sv + "_0.6.2") }

and this in build.sbt:

seq(sbtscalaxb.Plugin.scalaxbSettings: _*)

sourceGenerators in Compile <+= scalaxb.identity

bug fixes and minor enhancements

  • Adds --contents-limit option to set the limit of long sequence.
  • Adds --prepend-family option to prepend family name to classes generated from child elements (#69 reported by @devinus).
  • Adds soap 1.1 support (#66 reported by @s_m_stewart and @meglio)
  • All modules built using sbt 0.10.1.
Syndicate content