title: JaxB unmarshal custom xml
body: <p>I'm currently attempting to unmarshal some existing XML into a few classes I have created by hand. Problem is, I always get an error that tells me, JaxB expects a weather element but finds a weather element. (?)</p>
  
  <blockquote>
    <p>javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.aws.com/aws", local:"weather"). Expected elements are &lt;{}api>,&lt;{}location>,&lt;{}weather></p>
  </blockquote>
  
  <p>I tried with and without "aws:" in the elements' name.</p>
  
  <p>Here's my weather class:</p>
  
  <pre><code>@XmlRootElement(name = "aws:weather")
  public class WeatherBugWeather
  {
      private WeatherBugApi api;
      private List&lt;WeatherBugLocation&gt; locations;
      private String uri;
  
      @XmlElement(name="aws:api")
      public WeatherBugApi getApi()
      {
          return this.api;
      }
  
      @XmlElementWrapper(name = "aws:locations")
      @XmlElement(name = "aws:location")
      public List&lt;WeatherBugLocation&gt; getLocations()
      {
          return this.locations;
      }
  
      public void setApi(WeatherBugApi api)
      {
          this.api = api;
      }
  
      public void setLocations(List&lt;WeatherBugLocation&gt; locations)
      {
          this.locations = locations;
      }
  
      @XmlAttribute(name="xmlns:aws")
      public String getUri()
      {
          return this.uri;
      }
  
      public void setUri(String uri)
      {
          this.uri = uri;
      }
  }
  </code></pre>
  
  <p>And that's the XML I try to parse:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;aws:weather xmlns:aws="http://www.aws.com/aws"&gt;
      &lt;aws:api version="2.0" /&gt;
      &lt;aws:locations&gt;
          &lt;aws:location cityname="Jena" statename="" countryname="Germany" zipcode="" citycode="59047" citytype="1" /&gt;
      &lt;/aws:locations&gt;
  &lt;/aws:weather&gt;
  </code></pre>
  
  <p>I'm not quite sure what I'm doing wrong. Any hints? I suspect the problem to be the xmlns definition, but I have no idea what to do about it. (You can see that by looking at the uri-property. That was one unsuccessful idea. ^^) And yes, I did try to set the namespace but that rather set's the namespace's uri instead of it's ... name.</p>