Scalaxb reads from XML, invokes "label", receives UnsupportedOperationException - why?

255 Views Asked by At

I'm using scalaxb to convert an instance of XML into another object as follows:

val x = xml.XML.load(inputStream)
println(x)

val ed = scalaxb.fromXML[entityDescriptor.scalaxb.EntityDescriptorType](x)
println(ed)

When it invokes fromXML, I receive the following exception:

scalaxb.ParserFailure: Error while parsing 
    urn:oasis:names:tc:SAML:2.0:protocol 
    urn:oasis:names:tc:SAML:1.1:protocol 
    urn:oasis:names:tc:SAML:1.0:protocol: 
    java.lang.UnsupportedOperationException: 
    class Group does not support method 'label'

The XML is well-formed and valid, according to Java's built-in XML Schema validator (I'm converting from a Java to a Scala project).

From my own investigation, it appears that somewhere in scalaxb, it has created an instance of scala.xml.Group, and it has invoked the label method, which for Group, has no implementation.

  1. Is this a bug, or am I doing something wrong?

  2. If it is a bug, is there a workaround?

  3. If it is not a bug, what am I doing wrong?

1

There are 1 best solutions below

1
On BEST ANSWER

Probably a scalaxb bug. Please open a Github issue. http://scalaxb.org/issue-reporting-guideline