eed3si9n/scalaxb — Issue #125: Compile error in xmlprotocol.scala on Seq vs. vararg
Author: hedefalk
Created: 2011-11-28 21:09:58+00:00
State: open

The following wsdl gives me compile errors:

```xml

```

The generated code:

```scala
trait Binding1Binding extends PortType1 {
def operation1(thing: Seq[dfk.ka.generated.Thing]): Either[scalaxb.Fault[Any], String] =
soapClient.requestResponse(scalaxb.toXML(TestElement(thing), Some("http://www.hedefalk.se/test/"), "TestElement", defaultScope),
Nil, defaultScope, baseAddress, "POST", Some(new java.net.URI("http://hedefalk.se/test"))) match {
case Left(x) => Left(x)
case Right((header, body)) =>
Right(scalaxb.fromXML[String](scala.xml.Elem("", "Body", scala.xml.Null, defaultScope, body.toSeq: _*)))
}
}
```
I have three compile errors here, but I think only the first is a real error while the following just is the type checker that get's hindered by the first:

type mismatch; found : Seq[dfk.ka.generated.Thing] required:
dfk.ka.generated.Thing

The case class is generated with a vararg of Thing but then used with a Seq from operation. Maybe a : _* would fix it or am I misusing sequences in some way?