简体   繁体   English

使用rest api将块Blob列表放在Azure存储上时,指定的XML在语法上不是有效语法错误

[英]XML specified is not syntactically valid error while putting block blob list on azure storage using rest api

I'm trying to put block blob list to azure storage, but I'm getting "XML specified is not syntactically valid" error. 我试图将块Blob列表放到Azure存储中,但是却出现“指定的XML在语法上无效”错误。 I'm using REST API in java. 我在Java中使用REST API。

XML: XML:

<?xml version="1.0" encoding="utf-8"?>
<BlockList>
  <Latest>AA==</Latest>
  <Latest>AQ==</Latest>
  <Latest>Ag==</Latest>
  <Latest>Aw==</Latest>
  <Latest>BA==</Latest>
  <Latest>BQ==</Latest>
  <Latest>Bg==</Latest>
  <Latest>Bw==</Latest>
  <Latest>CA==</Latest>
  <Latest>CQ==</Latest>
  <Latest>Cg==</Latest>
  <Latest>Cw==</Latest>
  <Latest>DA==</Latest>
  <Latest>DQ==</Latest>
  <Latest>Dg==</Latest>
  <Latest>Dw==</Latest>
  <Latest>EA==</Latest>
  <Latest>EQ==</Latest>
  <Latest>Eg==</Latest>
  <Latest>Ew==</Latest>
  <Latest>FA==</Latest>
  <Latest>FQ==</Latest>
  <Latest>Fg==</Latest>
  <Latest>Fw==</Latest>
  <Latest>GA==</Latest>
  <Latest>GQ==</Latest>
  <Latest>Gg==</Latest>
</BlockList>

I'm sending it using HttpRequest.put(url).send(...) 我正在使用HttpRequest.put(url).send(...)发送它

Any ideas what could be a problem here? 有什么想法可能是这里的问题吗?

Update: There are no errors when putting block list without any block: 更新:放置没有任何阻止的阻止列表时没有错误:

<?xml version="1.0" encoding="utf-8"?>
<BlockList>
</BlockList>

I was having the same problem implementing straight against the REST API without a library. 我在没有库的情况下直接针对REST API实现时遇到了同样的问题。 The default API version (unless you specify an alternate) doesn't support this xml schema for multipart uploads. 默认的API版本(除非您指定备用版本)不支持此xml模式用于分段上传。 Switching to x-ms-version: 2011-08-18 fixed the problem for me. 切换到x-ms-version: 2011-08-18为我解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure REST API使用java获取存储Blob大小详细信息 - Azure REST API to get Storage Blob Size Details using java 使用azure-storage-api java的downloadAttributes上不存在指定的Blob - The specified blob does not exist on downloadAttributes with azure-storage-api java Azure:使用存储API查找存储是通用存储还是Blob存储 - Azure: find if storage is general purpose or blob storage using storage API 从REST客户端使用AZURE表存储服务时,如何解决指定的资源不存在错误 - How to fix The specified resource does not exist error while consuming AZURE Table Storage service from REST Client 用于块Blob的Azure存储服务REST API:内容长度问题 - Azure Storage service REST API for block Blobs : Content Length Issue 错误 Sping Boot 列出 Azure Blob 存储中的所有文件 - Error Sping Boot list all files in Azure Blob Storage 如何使用Dasein API连接Azure云(blob存储) - How to connect with Azure cloud (blob storage) using dasein API 如何使用 Java API 禁用 azure 存储帐户的 blob 版本控制? - How to disable the blob versioning for an azure storage account using Java API? 上传时我想使用 Azure blob 存储方法 uploadFromFile() 覆盖现有的 blob - While uploading i want to overwrite existing blob using Azure blob Storage method uploadFromFile() 列出 azure blob 容器中的文件时发生错误 - Error occured while list the files from azure blob container
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM