eed3si9n/scalaxb — Issue #129: Compiling generated file fails due to name conflicts
Author: ben-manes
Created: 2011-12-10 01:10:32+00:00
State: open

# Steps:
1. Define a schema with two simple enum types. Use the name for an enumeration between the two types.
2. Generate Scala code
3. Compile

# Problem
Name collision causes the compilation to fail.

# Expectation
The types made uniquely through some prefix/namespace magic.

# Example:
The Salesforce Partner WSDL uses duplicate names for the StatusCode and ExceptionCode enums. The Scala code generated fails with errors like:

```
[ERROR] C:\projects\drdnc\target\generated-sources\scalaxb\com\drdnc\service\salesforce\generated\salesforce-partner.scala:1553: error: UNKNOWN_EXCEPTION is already defined as case class UNKNOWN_EXCEPTION
[INFO] case object UNKNOWN_EXCEPTION extends ExceptionCode { override def toString = "UNKNOWN_EXCEPTION" }
[INFO] ^
```

See the WSDL and Scala code here: https://gist.github.com/1454097