scalaxb 1.7.3

機能改善点

バグフィックス

  • 列として宣言された属性の処理の修正 #512 by @abestel

scalaxb 1.7.2

バグフィックス

  • toXML が呼ばれたときの Big decimal のフォーマットを XML Schema に準拠するよう修正した。#505 by @tOverney

scalaxb 1.7.1

バグフィックス

  • Big decimal のフォーマットを XML Schema に準拠するよう修正した。 #483 by @danslapman
  • StringOption[String] が比較されていたのを修正した。 #485 by @lespea
  • One-way SOAP 呼び出しを修正した。 #493 by @danslapman

scalaxb 1.7.0

breaking changes

  • ExecutionContext parameter is added to all methods returning Future[A], instead of hardcoding a execution context. #482 inspired by #407.

Starting scalaxb 1.7.0, an explicit import of ExecutionContext would be required as follows:

import scala.concurrent.ExecutionContext.Implicits._

symbol encoding strategy and capitalization

scalaxb 1.7.0 adds option to encode symbols.

  lazy val scalaxbCapitalizeWords  = settingKey[Boolean]("Attempts to capitalize class and attribute names to match the CamelCase convention")
  lazy val scalaxbSymbolEncodingStrategy = settingKey[SymbolEncodingStrategy.Value]("Specifies the strategy to encode non-identifier characters in generated class names")
 
  object SymbolEncodingStrategy extends Enumeration {
    val Discard = Value("discard")
    val SymbolName = Value("symbol-name")
    val UnicodePoint = Value("unicode-point")
    val DecimalAscii = Value("decimal-ascii")
    val Legacy151 = Value("legacy-1.5.1")
  }

#461 by @hosamaly

other enhancements

  • Handle multiple faults #438 by @SupraFii
  • Adds support for enum values list #446 by @bbarker
  • Supports Dispatch versions from 0.11.4 to 0.14.x #468 by @margussipria
  • Generates a default value for class parameters of anyAttribute #470 by @hosamaly
  • scala-xml 1.1.0 and scala-parser-combinators 1.1.0 #476 by @sullis
  • Uses sealed traits for enums #479 by @mrdziuban
  • Adds config option for setting scalaxbEnumNameMaxLength for enum name length #480 by @mrdziuban

bug fixes

  • Don't throw exception on http status code != 200 to allow Fault parsing #444 by @alexdupre
  • Fixes Soap11Fault bug when empty detail #450 by @dportabella

scalaxb 1.5.2

機能改善点

  • Gigahorse 0.3 及び異なるバックエンド (OkHttp と AHC) へのサポートを追加した。 #428 by @alexdupre

バグフィックス

  • JVM のコードサイズの制限を回避するため、fromAnySchemaType を分割するようにした。 #429 by @fltt

scalaxb 1.5.1

バグフィックス

  • 最後尾のアンダースコアが "u93" に置換されるようになった。 #415 by @varnerac
  • BigDecimal のフォーマットの修正。 #417 by @coutoPL

機能改善点

scalaxb 1.5.0

互換性の無い変更点

  • 型クラスのインスタンスの名前衝突をパケージ名をプレフィックスすることで修正した。 #385 by @anatoliykmetyuk
  • 可変長引数 (varargs) をデフォルトで使わないように変更した。
  • sbt-scalaxb を auto plugin 化した。

バグフィックス

  • 複数の implicit ヘッダを用いる SOAP operation の修正。 #380 by @joshlreese
  • SOAP ヘッダの値が合成された場合の修正。 #381 by @coutoPL
  • SOAP ヘッダパーツに関連したコード生成の修正。 #400 by @jankeesvanandel
  • enum の名前の衝突の修正。 #386 by @anatoliykmetyuk
  • enum のパーシングを修正して、例えば xsd:byte 型による 00 を取り扱えるようになった。 #388 by @anatoliykmetyuk

機能改善点

  • 可変 (mutable) case class を生成するための --mutable オプションを追加した。詳細は後ほど。
  • type 属性を用いた xs:any の変換。 #389 by @anatoliykmetyuk
  • パッケージ名を自動で選択する --autopackages オプションの追加。 #391 by @anatoliykmetyuk
  • 生成された case class を走査するための Visito を生成する --visitor オプションの追加。 #392 by @anatoliykmetyuk

sbt-scalaxb への変更

scalaxb 1.5.0 より sbt-scalaxb は auto plugin 化される。
scalaxbSettings 追加して、sourceGenerators in Compile する代わりに、ScalaxbPlugin を有効化するだけでよくなった。
他の全てのセッティングやタスクは "scalaxb" とプレフィックスされる。
例えば、以前の packageName というキーは scalaxbPackageName に変更された。

Before:

import ScalaxbKeys._
lazy val root = (project in file(".")).
  settings(
    name := "foo-project").
  settings(scalaxbSettings).
  settings(
    sourceGenerators in Compile += (scalaxb in Compile).taskValue,
    packageName in (Compile, scalaxb) := "generated"
    // packageNames in (Compile, scalaxb) := Map(uri("http://something/") -> "something"),
    // logLevel in (Compile, scalaxb) := Level.Debug
  )

After:

lazy val root = (project in file(".")).
  enablePlugins(ScalaxbPlugin).
  settings(
    name := "foo-project",
    scalaxbPackageName in (Compile, scalaxb) := "generated"
    // scalaxbAutoPackages in (Compile, scalaxb) := true
  )

#405 by @eed3si9n

可変 (mutable) case class

scalaxb 1.5.0 は可変な case class を生成するオプションを追加する。

case class Address(var name: String,
  var street: String,
  var city: String)

sbt-scalaxb では以下のように有効化できる:

lazy val root = (project in file(".")).
  enablePlugins(ScalaxbPlugin).
  settings(
    name := "foo-project",
    scalaxbPackageName in (Compile, scalaxb) := "generated",
    scalaxbGenerateMutable in (Compile, scalaxb) := true
  )

#390 by @AndreVanDelft

コントリビューター

バグ報告や pull request によって scalaxb の改善にお手伝いしていただいた皆さんにこの場を借りてお礼します。

git shortlog -sn --no-merges 1.4.1..release/1.5.0 によると今回のリリースでは以下の方々にコントリビュートしてもらった (敬称略): Anatoliy Kmetyuk (@anatoliykmetyuk), Eugene Yokota (@eed3si9n), Andre Van Delft (@AndreVanDelft), Jan-Kees van Andel (@jankeesvanandel), Joshua Reese (@joshlreese), and Mateusz Kołodziejczyk (@coutoPL).

scalaxb 1.4.1

互換性の無い変更点

  • Dispatch 0.11.3 サポートを追加して、defaultDispatchVersion も 0.11.3 へと変更した。 #352 by @DustinChaloupka

バグフィックス

  • implicit 及び explicit な SOAP ヘッダ処理の修正。#366 by @coutoPL

who is using scalaxb?

Here's a list of users who are using scalaxb, or have at some point.

Banno

Non-blocking SOAP feature was also contributed by @hoff2 from Banno.

Klout

Scoozie: Creating Big Data Workflows at Klout

Additionally, we would like to provide a shout-out to a great open-source project, scalaxb, an sbt plugin that takes .xsd files and creates matching Scala case classes. Scoozie populates these case classes, which are then automatically converted to XML by scalaxb. This plugin saved a lot of headache in the actual process of conversion to XML.

Novus

Dispatch forms the foundation of an in-house SOAP client at Novus together with scalaxb. Thanks to these tools our standard response to “Can you do SOAP?” is “Bring it on!” instead of “Ew, what’s this on my shoe?!”

VMWare vCloud

Using Salat with scalaxb generated classes:

scalaxb generates Scala case classes from XSDs and generates supporting helpers for going back and forth from case class to XML. Salat provides an interface to MongoDB based on case classes.

There are a couple hurdles, but both project owners have taken our suggestions seriously, and have smoothed out quite a few bumps.

scalaxb 1.4.0

SOAP/REST 関連の変更点

  • DispatchHttpClientsrequestTimeoutconnectionTimeout を追加した。 #304 by @eed3si9n
  • --no-dispatch-client オプション (generateDispatchClient := false) を追加した。 #322 by @liff
  • Dispatch の Http(request > as.scalaxb[A]) をサポートするための --dispatch-as オプション (generateDispatchAs := true) を追加した。 #332 by @arkadius

その他の機能改善点

  • 不明な XML 要素や順番違いを無視するための --ignore-unknown オプション (ignoreUnknown := true) を追加した。 #310 by @jet-black
  • 可変長引数のかわりに Seq を使う --no-varargs オプションを追加した。 #292/#309 by @lbruand and @Erwan56
  • 列挙の値が重複している場合の処理を改善した。 #308 by @donderom
  • 設定値を case class の列にリファクタリングした。 #342 by @eed3si9n

バグフィックス

  • 名前空間の重複を修正した。 #310/#291/#298 by @jet-black
  • CompilerMatcher の Windows でのファイル名やパス処理を修正した。 #307 by @joescii

コンパイラの警告

scalaxb 1.4.0 によって生成されるコードから警告が出ないように修正が加えられた。

  • 生成されるコードに SIP-18 インポートを追加した。 #294 by @carl297r
  • 生成されるコード内の "adapting argument list" およびその他のコンパイラ警告を除去した。 #321 by @liff
  • scalaxb 本体のコードからコンパイラ警告を除去した。 #335 by @justjoheinz
  • 生成されるコード内の後置記法を除去した。
  • 統合テスト時に -Xfatal-warnings オプションを追加した。 #343 by @eed3si9n

コントリビューター

バグ報告や pull request によって scalaxb の改善にお手伝いしていただいた皆さんにお礼を言いたい。

git shortlog -sn --no-merges 1.3.0..release/1.4.0 によると今回のリリースでは 10人にコントリビュートしてもらった (敬称略):
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)

Syndicate content