wsdl feature the beginning

I wanted to share Tim's latest blog article Using SOAP with Scala with you guys.

It seems I have inadvertently become “that guy who does SOAP with Scala”.

Also wanted to share a bit of the background. I'd known SOAP was doable because majority of the WSDL is actually XSD, and also @max4f has implemented it. But originally, I was going to wait a while till I implement WSDL/SOAP support. What got me moving quicker was @timperrett's tweet on 4/26:

Has anyone ever built some kind of monadic abstraction on SOAP? If so, i want to hear your thoughts!

scalaxb 0.6.1

goodbye sbaz, hello conscript

sbaz allowed quick installation of scalaxb, but it also had its share of problems like scala version dependencies and contaminating the REPL classpath.
Starting 0.6.1, scalaxb will no longer be supporting sbaz and recommend all users to switch to conscript for installing scalaxb.

$ sudo sbaz remove scalaxb
$ cs eed3si9n/scalaxb

no Array

  • xs:base64Binary now maps to scalaxb.Base64Binary instead of Array[Byte].
  • Both scalaxb.HexBinary and scalaxb.Base64Binary are backed by Vector[Byte] internally.
  • Other built-in types that previously mapped to Array[String] now maps to Seq[String].


scalaxb plugin for Maven was contributed by @martiell.

sbt-scalaxb for sbt 0.10

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

libraryDependencies += "org.scalaxb" %% "sbt-scalaxb" % "0.6.1"

and this in your build.sbt:

sourceGenerators in Compile <+= scalaxb.identity

bug fixes and minor enhancements

  • Fixes list derived types (#54 reported by @ikwzm).
  • Fixes handling of empty sequences (#55).
  • Fixes naming of local elements with duplicate name and structure (#56).
  • Adds @implicitNotFound attributes on fromXML etc.
  • Adds --no-runtime option to skip generating scalaxb.scala (#45 requested by @martiell).
  • Implements camel casing of wsdl operation name (#52 requested by @timperrett).
  • Removes X prefix on wsdl message case classes (#51 requested by @timperrett).
  • Adds --chunk-size option to handle 200+ parameters (#58 reported by @ecin).

mvn-scalaxb: Running scalaxb from Maven

Running scalaxb from Maven

The scalaxb-maven-plugin is provided to allow scalaxb to be run as part of a maven build.

vmware uses scalaxb and Salat

John Stanford talking about using scalaxb and Salat to persist case classes into MongoDB:
- Using Salat with scalaxb generated classes

He was also the first to post on the new scalaxb Google Group. Join us, and contribute your ideas.

scalaxb 0.6.0

new feature

bug fixes and other minor enhancements

  • XML bindings are generated as foo_xmlprotocol.scala.
  • Uses Scala 2.9.0-1.
  • Web API uses Unfiltered 0.3.3.
  • Adds default argument for xs:anyAttribute.
  • Adds support for xs:anySimpleType. (#34 reported by @psnively)
  • Fixes xs:any naming. (#35 reported by @psnively)
  • Adds typeclass instance for DataRecord. (#40 reported by @psnively)
  • Fixes DataRecord round trip. (#43)
  • Fixes mapping of xs:choice of xs:anyType. (#44 reported by @psnively)

wsdl 1.1 support

During the .com boom, everyone has written a SOAP service or two, which were typically cataloged using WSDL. If you study a WSDL document, you'll discover that a good portion of the document is actually embedded XML Schema document describing the layout of the messages sent back and forth. The rest are details. Since scalaxb is handling the XML Schema, it was only matter of time to extend this into supporting WSDL.


  1. Download a wsdl document locally.
  2. If you're using sbt-scalaxb place it under src/main/wsdl.

Here's the sample setup:

scalaxb 0.5.4

  • Added sbt-scalaxb plugin by @max4f.
  • Added --package-dir, which generates package directory structure.
  • scalaxb is now available via conscript: cs eed3si9n/scalaxb.
  • Fixes generated code for cross-package choices (GH-33).

sbt-scalaxb is in the house

A big thanks to Max (@max4f) for writing a scalaxb plugin for sbt, and letting me pull it into the project.
If you're not using simple build tool, why?

Here are the steps to compile-xsd task from sbt.

step 1. Plugins.scala

Add the following to your project/plugins/Plugins.scala.

import sbt._
class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
  val scalaxb = "org.scalaxb" % "sbt-scalaxb" % "0.6.0"
  val scalaToolsNexusSnapshots = "Scala Tools Nexus Snapshots" at ""
  val scalaToolsNexusReleases  = "Scala Tools Nexus Releases" at ""

scalaxb 0.5.3

breaking changes (no import)

  • Moved helper functions from Scalaxb object into scalaxb package object.
  • Moved default typeclass instances from DefaultXMLProtocol trait to the package object of the generated class. (inspired by @jsuereth at #nescala)


import scalaxb._
import Scalaxb._
import ipo._
import DefaultXMLProtocol._
val shipTo = fromXML[Address](subject)


val shipTo = scalaxb.fromXML[ipo.Address](subject)

bug fixes and minor enhancements

  • Maps xs:integer, etc. to BigInt.
  • Fixed substitution group parsing (GH-25 reported by @dbolene)
  • Implements attributeFormDefault, elementFormDefault, and form support. (GH-26 reported by @dbolene)
  • Fixed parsing long sequence. (GH-29 reported by E-Fir)
  • Implements UTF-8 and UTF-16 BOM handling. (GH-31 reported by @fredferrao)
  • Prints version number. (GH-24 requested by @dbolene)
  • Prints better parser error message. (GH-27 reported by @dbolene)

scalaxb 0.5.2

  • Fixes <xs:sequence> handling. (GH-19)
  • Fixes <xs:attributeGroup> handling. (GH-21)
  • Improves error message when a referenced schema or referenced component is missing.
  • Searches for missing schema in the current directory. (GH-23)
Syndicate content