我正在使用 WSO2 Developer Studio 3.8.0 进行 ESB 配置,每次打开某个 API 定义文件时,IDE 都会修改其内容。原始文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<api context="/das/assets" name="wso2das-assets-management" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST" protocol="http">
<inSequence>
<clone>
<target>
<sequence>
<log level="custom" separator=",">
<property expression="//*" name="Triggering EventStreamAdminService API call.."/>
</log>
<call>
<endpoint>
<address format="soap12" trace="disable" uri="https://192.168.219.142:9444/services/EventStreamAdminService.EventStreamAdminServiceHttpsSoap12Endpoint/"/>
</endpoint>
</call>
<log description="EventStreamAdminService API call response" level="full">
<property name="WSANSWER" value="true"/>
</log>
</sequence>
</target>
<target>
<sequence>
<log level="custom" separator=",">
<property expression="//*" name="Triggering EventStreamPersistenceAdminService API call.."/>
</log>
<call>
<endpoint>
<address format="soap12" trace="disable" uri="https://192.168.219.142:9444/services/EventStreamPersistenceAdminService.EventStreamPersistenceAdminServiceHttpsSoap12Endpoint/"/>
</endpoint>
</call>
<log
description="EventStreamPersistenceAdminService API call response" level="full">
<property name="WSANSWER" value="true"/>
</log>
</sequence>
</target>
</clone>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>
而IDe打开后修改的文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<api context="/das/assets" name="wso2das-assets-management" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST" protocol="http">
<inSequence>
<clone>
<target>
<sequence>
<log level="custom" separator=",">
<property expression="//*" name="Triggering EventStreamAdminService API call.."/>
</log>
<call/>
<log description="EventStreamAdminService API call response" level="full">
<property name="WSANSWER" value="true"/>
</log>
</sequence>
</target>
<target>
<sequence>
<log level="custom" separator=",">
<property expression="//*" name="Triggering EventStreamPersistenceAdminService API call.."/>
</log>
<call/>
<log
description="EventStreamPersistenceAdminService API call response" level="full">
<property name="WSANSWER" value="true"/>
</log>
</sequence>
</target>
</clone>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>
如您所见,调用标签的内容(属性和子标签)在文件打开后已被 IDE 删除。我想这是由于 IDE 施加的一些最佳实践或限制。有任何想法吗?