cannot convert xml to jaxb
<p>I have a problem converting a xml to java class, cannot see the problem.</p>

<pre><code>public MyResponse getSmartFocusResponse(MyResponse myResponse, String data) throws JAXBException {
    try {
        JAXBContext jaxbContext = JAXBContext.newInstance(myResponse.getClass());
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();

        StringReader reader = new StringReader(data);
        MyResponse response = (MyResponse) unmarshaller.unmarshal(reader);

        return response;
    } catch (JAXBException e) {
        e.printStackTrace();
        throw e;
    }
}
</code></pre>

<p>here are the class I convert to:</p>

<pre><code>@XmlRootElement(name = "response")
public class MyResult {

private InnerResult result;
private String responseStatus;

@XmlElement(name = "result")
public void setResult(InnerResult uploadStatus) {
    this.result = uploadStatus;
}

@XmlAttribute(name = "responseStatus")
public void setResponseStatus(String responseStatus) {
    this.responseStatus = responseStatus;
}

public InnerResult getResult() {
    return result;
}

public String getResponseStatus() {
    return responseStatus;
}

}


@XmlRootElement(name = "result")
public class InnerResult {

private String content;
private String attribute;

@XmlAttribute(name = "xsi:type")
public void setAttribute(String attribute) {
    this.attribute = attribute;
}

@XmlElement
public void setContent(String content) {
    this.content = content;
}

public String getAttribute() {
    return attribute;
}

public String getContent() {
    return content;
}

}
</code></pre>

<p>Finally, here is the XML I try to convert:</p>

<pre><code>&lt;response responseStatus="success"&gt;
    &lt;result xsi:type="xs:string"&gt;
        connection closed
    &lt;/result&gt;
&lt;/response&gt;
</code></pre>

<p>The exception I catch is:</p>

<blockquote>
  <p>javax.xml.bind.UnmarshalException
   - with linked exception:
  [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 120; The prefix "xsi" for attribute "xsi:type" associated with an element type "result" is not bound.]</p>
</blockquote>