从 REST 服务调用资源会导致网络浏览器显示消息:
部署 REST 服务的服务器 (localhost) 仅提供安全的 HTTPS 连接。所以我真的不知道这种警告的根本原因是什么。这是 Web 浏览器接收到的 xml 文件。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<category xmlns="https://localhost/" id="1">
<description>des_swdevelopment</description>
<name>swdevelopment</name>
</category>
服务器端的 xsd 文件如下所示:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="https://localhost/"
targetNamespace="https://localhost/" elementFormDefault="qualified"
xmlns:pref="https://localhost/" >
<xs:element name="category">
<xs:complexType >
<xs:sequence>
<xs:element name="description" type="xs:string" />
<xs:element name="name" type="xs:string" />
</xs:sequence>
<xs:attribute name="id" type="xs:integer" />
</xs:complexType>
</xs:element>
</xs:schema>
安全警告提供两个选项。如果我选择“是”,浏览器只会显示:des_swdevelopmentswdevelopment
“否”选项正确显示 xml 文件,使用 RawCap 嗅探到的网络流量是:
根据 pcap 文件,我假设警告与xsd 文件中定义的http://www.w3.org/2001/XMLSchema url 有关。
这是正确的,我需要什么来防止这个警告?
[编辑:]这是我的项目设置: