jersey post xml文件

时间:2014-11-03 12:29:30

标签: java xml post jersey

我想将xml文件发布到我的服务器,然后删除该文件。

这是我的html文件:

<form action="rest/installationService/postInstallationTasks" method="post" enctype="multipart/form-data" id="uploadForm">
    <input type="file" id = "uploadFile" name="filename" class="fileUpload" multiple>
    <div style="float: right">
        <button id="px-submit" type="submit"  >upload</button>
    </div>
</form>

这里是installation.xml

<installations>
  <installation>
    <address>湖北省武汉市武昌区华城广场1号</address>
    <customerId>0</customerId>
    <id>2</id>
    <isComplete>0</isComplete>
    <postDate>2014-10-31T00:00:00+08:00</postDate>
    <uploadFlag>0</uploadFlag>
    <username>root</username>
  </installation>
  <installation>
    <address>湖北省武汉市武昌区华城广场2号</address>
    <customerId>0</customerId>
    <id>4</id>
    <isComplete>0</isComplete>
    <postDate>2014-10-31T00:00:00+08:00</postDate>
    <uploadFlag>0</uploadFlag>
    <username>root</username>
  </installation>
</installations>

并且有一个Installation类并在其上添加@XmlRootElement;

我如何在我的服务器上书写?

0 个答案:

没有答案