stoicflame/enunciate — pull request #7 by npombourcq (2012-06-25 16:50:25+00:00)
Title: Fix handling of namespaces for XmlElementWrapper

Fix the code dealing with `@XmlElementWrapper` to use `getWrapperNamespace` instead of `getNamespace`.

When a collection is annotated as follows:

```java
@XmlElementWrapper(name = "items")
@XmlElementRef
public List
getItems()
```

where Item is a base abstract type with 2 subtypes, each annotated with @XmlRootElement, one gets the following exception during doc generation:

```
java.lang.UnsupportedOperationException: No single reference for this element: multiple choices.
at org.codehaus.enunciate.contract.jaxb.ElementRef.getNamespace(ElementRef.java:238)
at org.codehaus.enunciate.modules.docs.GenerateExampleXmlMethod.generateExampleXml(GenerateExampleXmlMethod.java:210)
at org.codehaus.enunciate.modules.docs.GenerateExampleXmlMethod.generateExampleXml(GenerateExampleXmlMethod.java:155)
at org.codehaus.enunciate.modules.docs.GenerateExampleXmlMethod.exec(GenerateExampleXmlMethod.java:119)
```

This commit fixes this issue.