title: cURL request for HTTP POST is syntatically incorrect
body: <p>I am trying to execute the following command via cURL command line on Windows Server 2008 R2 running Apache Jersey REST on Tomcat 7.</p>
  
  <pre><code>curl -X POST -d "&lt;userList xmlns="urn:user"&gt;&lt;user role="ROLE_OPERATOR" loginName="test_login1"&gt;&lt;/user&gt;&lt;/userList&gt;" -H "Content-Type: application/xml" --basic --user username:password http://localhost:8080/meolutws/UserList/
  </code></pre>
  
  <p>When I issue the command, I get HTTP 400 with message: "The request sent by the client is syntatically incorrect".</p>
  
  <p>The method signature on the webservice looks something like this:</p>
  
  <pre><code>@POST
  @CONSUMES({"application/xml"})
  public Response createUsers(UserList users){
  }
  </code></pre>
  
  <p>UserList class is defined as follows:  </p>
  
  <pre><code>  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "UserList", namespace = "urn:user", propOrder = {
      "users"
  })
  @XmlRootElement(name = "userList", namespace = "urn:user")
  public class UserList
      implements Serializable
  {
  
      @XmlElement(name = "user")
      protected List&lt;User&gt; users;
  
      public List&lt;User&gt; getUsers() {
          if (users == null) {
              users = new ArrayList&lt;User&gt;();
          }
          return this.users;
      }
  }
  </code></pre>
  
  <p>And User is defined as follows:</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "User", namespace = "urn:user")
  @XmlRootElement(name = "user", namespace = "urn:user")
  public class User
      implements Serializable
  {
  
      @XmlAttribute(name = "loginName", required = true)
      protected String loginName;
  
      @XmlAttribute(name = "role", required = true)
      protected String role;
  
  
      public String getLoginName() {
          return loginName;
      }
  
      public void setLoginName(String value) {
          this.loginName = value;
      }       
  
      public String getRole() {
          return role;
      }
  
      public void setRole(String value) {
          this.role = value;
      }
  }
  </code></pre>
  
  <p>What am I missing?</p>