title: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"sRAssignments"). Expected elements are
body: <p>SRAssignments.java (wrapper class):</p>
  
  <pre><code>@XmlRootElement
  @XmlType(propOrder = {})
  public class SRAssignments
  {
  
  @XmlElement(name = "srAssignments", type = SRAssignment.class) private     
  List&lt;SRAssignment&gt; srAssignments = new ArrayList&lt;SRAssignment&gt;();
  
  public SRAssignments()
  {
  }
  
  @SuppressWarnings("javadoc")
  public SRAssignments(List&lt;SRAssignment&gt; srAssignments)
  {
      this.srAssignments = srAssignments;
  }
  
  @SuppressWarnings("javadoc")
  public List&lt;SRAssignment&gt; getAssignments()
  {
      return this.srAssignments;
  }
  
  
  @SuppressWarnings("javadoc")
  public void setAssignments(List&lt;SRAssignment&gt; srAssignments)
  {
      this.srAssignments = srAssignments;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>client code: </p>
  
  <pre><code>        StringBuilder getAssignmentsResponse = 
  (StringBuilder) RestClientUtil.sendGetMethod(urlGetAssignments
                  + URLEncoder.encode(technician, "UTF-8"));
        Unmarshaller unmarshaller =  RestClientUtil.getUnmarshaller(SRAssignments.class);
        reader = new StringReader(new String(getAssignmentsResponse));
        assignments = (SRAssignments) unmarshaller.unmarshal(reader);
  </code></pre>
  
  <p>XML content in getAssignmentsResponse shows: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;sRAssignments&gt;&lt;srAssignment&gt;&lt;assignedBy&gt;&lt;bonus&gt;0.0&lt;/bonus&gt;&lt;commission&gt;0.0&lt;/commission&gt;&lt;educationLevel&gt;1&lt;/educationLevel&gt;&lt;email&gt;email1@test.com&lt;/email&gt;&lt;empNo&gt;RMGR1&lt;/empNo&gt;&lt;firstName&gt;first1&lt;/firstName&gt;&lt;lastName&gt;last1&lt;/lastName&gt;&lt;role&gt;manager&lt;/role&gt;&lt;salary&gt;0.0&lt;/salary&gt;&lt;/assignedBy&gt;&lt;assignedOn&gt;2012-12-26T14:09:41.763-08:00&lt;/assignedOn&gt;&lt;comment&gt;remote agent assigning a request...&lt;/comment&gt;&lt;employee&gt;&lt;bonus&gt;0.0&lt;/bonus&gt;&lt;commission&gt;0.0&lt;/commission&gt;&lt;educationLevel&gt;1&lt;/educationLevel&gt;&lt;email&gt;email1@ge.com&lt;/email&gt;&lt;empNo&gt;TN1&lt;/empNo&gt;&lt;firstName&gt;first1&lt;/firstName&gt;&lt;lastName&gt;last1&lt;/lastName&gt;&lt;role&gt;technician&lt;/role&gt;&lt;salary&gt;0.0&lt;/salary&gt;&lt;/employee&gt;&lt;serviceRequest&gt;&lt;customer&gt;&lt;city&gt;city1&lt;/city&gt;&lt;companyName&gt;companyName1&lt;/companyName&gt;&lt;custNo&gt;RCN1&lt;/custNo&gt;&lt;email&gt;email1@ge.com&lt;/email&gt;&lt;firstName&gt;first1&lt;/firstName&gt;&lt;gender&gt;F&lt;/gender&gt;&lt;lastName&gt;last1&lt;/lastName&gt;&lt;midInit&gt;K&lt;/midInit&gt;&lt;phone&gt;4082229871      &lt;/phone&gt;&lt;state&gt;CA&lt;/state&gt;&lt;streetAddress&gt;streetAddress1&lt;/streetAddress&gt;&lt;title&gt;S   &lt;/title&gt;&lt;zipCode&gt;zipCode   &lt;/zipCode&gt;&lt;/customer&gt;&lt;dateCreated&gt;2012-12-26T14:09:38.678-08:00&lt;/dateCreated&gt;&lt;description&gt;Stress testing, customer is submitting a service request for some repair request.10Request by: Thread-1&lt;/description&gt;&lt;srNo&gt;107824&lt;/srNo&gt;&lt;status&gt;2&lt;/status&gt;&lt;/serviceRequest&gt;&lt;sraId&gt;34974&lt;/sraId&gt;&lt;status&gt;1&lt;/status&gt;&lt;/srAssignment&gt;&lt;/sRAssignments&gt;
  </code></pre>
  
  <h2>exception :</h2>
  
  <pre><code>    javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"sRAssignments"). Expected elements are &lt;{}customer&gt;,&lt;{}customerSurvey&gt;,&lt;{}employee&gt;,&lt;{}serviceRequest&gt;,&lt;{}srAssignment&gt;,&lt;{}srAssignments&gt;,&lt;{}surveyResponse&gt;
          at 
  com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:662)
          at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:258)
          at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:253)
          at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:120)
          at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1063)
          at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:498)
          at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:480)
          at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:150)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3104)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
          at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:217)
          at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:189)
          at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
          at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194)
          at com.ge.dsp.iworkRemote.remoteAgents.TechnicianRemoteAgent.getAssignmentsByEmployee(TechnicianRemoteAgent.java:134)
          at com.ge.dsp.iworkRemote.remoteAgents.TechnicianRemoteAgent.execute(TechnicianRemoteAgent.java:86)
          at com.ge.dsp.iworkRemote.remoteAgents.TechnicianRemoteAgent$TechnicianAgentRunner.run(TechnicianRemoteAgent.java:256)
          at java.lang.Thread.run(Thread.java:662)
  </code></pre>