From dbc1715e7a44f16e469164e32dc37ec32997f179 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 16 Jun 2014 13:02:06 +0200 Subject: [PATCH] SOAP: fixes xs:anyType returning xml.Node. fixes #265 --- build.sbt | 2 +- cli/src/main/scala/scalaxb/compiler/wsdl11/GenSource.scala | 4 ++-- cli/src/main/scala/scalaxb/compiler/xsd/Args.scala | 2 +- notes/1.2.1.markdown | 6 ++++++ 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 notes/1.2.1.markdown diff --git a/build.sbt b/build.sbt index 1669b8c9d..8fa630b08 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import Dependencies._ import Common._ val commonSettings = Seq( - version := "1.2.0", + version := "1.2.1-SNAPSHOT", organization := "org.scalaxb", homepage := Some(url("http://scalaxb.org")), licenses := Seq("MIT License" -> url("https://github.com/eed3si9n/scalaxb/blob/master/LICENSE")), diff --git a/cli/src/main/scala/scalaxb/compiler/wsdl11/GenSource.scala b/cli/src/main/scala/scalaxb/compiler/wsdl11/GenSource.scala index a7dc9455e..d1b120e38 100644 --- a/cli/src/main/scala/scalaxb/compiler/wsdl11/GenSource.scala +++ b/cli/src/main/scala/scalaxb/compiler/wsdl11/GenSource.scala @@ -30,7 +30,7 @@ trait GenSource { import Module.{NL, indent, camelCase} import scala.xml.Node import scalaxb.compiler.xsd.{ReferenceTypeSymbol, SimpleTypeDecl, ComplexTypeDecl, BuiltInSimpleTypeSymbol, - XsTypeSymbol, AnyType, XsAnyType} + XsTypeSymbol, AnyType, XsAnyType, Single} val WSDL_SOAP11 = "http://schemas.xmlsoap.org/wsdl/soap/" val WSDL_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/" @@ -599,7 +599,7 @@ trait {interfaceTypeName} {{ (part.typeValue, part.element) match { case (Some(typeValueQName), _) => val typeSymbol = toTypeSymbol(typeValueQName) - xsdgenerator.buildArg(selector, typeSymbol, None) + xsdgenerator.buildArg(xsdgenerator.buildTypeName(typeSymbol), selector, Single, None) case (_, Some(elementQName)) => val elem = xsdgenerator.elements(splitTypeName(elementQName)) xsdgenerator.buildArg(elem, selector, None, false) diff --git a/cli/src/main/scala/scalaxb/compiler/xsd/Args.scala b/cli/src/main/scala/scalaxb/compiler/xsd/Args.scala index e5b69908c..aadd671a1 100644 --- a/cli/src/main/scala/scalaxb/compiler/xsd/Args.scala +++ b/cli/src/main/scala/scalaxb/compiler/xsd/Args.scala @@ -43,7 +43,7 @@ trait Args extends Params { def buildFromString(typeName: String, selector: String): String = typeName + ".fromString(" + selector + ")" - // called by buildConverter and buildPartArg + // called by buildConverter def buildArg(selector: String, typeSymbol: XsTypeSymbol, stackItem: Option[String]): String = typeSymbol match { case AnyType(symbol) => selector case symbol: BuiltInSimpleTypeSymbol => buildArg(buildTypeName(symbol), selector, Single, stackItem) diff --git a/notes/1.2.1.markdown b/notes/1.2.1.markdown new file mode 100644 index 000000000..ac6e6e4cc --- /dev/null +++ b/notes/1.2.1.markdown @@ -0,0 +1,6 @@ + [265]: https://github.com/eed3si9n/scalaxb/issues/265 + +## SOAP bug fixes + +- Fixes xs:AnyType handling. [#265][265] +