我在多个表中插入其中一些是直接插入而另外一些是我们需要拆分它意味着使用迭代调解器我已经完成了使用两个代理并添加故障序列也插入是好的如果我的DSS关闭它正在通过正确故障发生在客户端。问题是当dss中的错误occuers像..primarykey这样的声音我在每个序列中都添加了这个属性<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
,即使它像这个错误一样抛出
ERROR - NativeWorkerPool Uncaught exception
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
at [row,col {unknown-source}]: [1,167]
并且它给出了ESB方面的错误,如上所述我附加了我的错误序列..
<sequence xmlns="http://ws.apache.org/ns/synapse" name="fault">
<property xmlns:ns="http://org.apache.synapse/xsd" name="actionid" expression="get-property('actionid')"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="actiondetailid" expression="get-property('actiondetailid')"/>
<dbreport>
<connection>
<pool>
<password>Youtility11</password>
<user>youtilitydba</user>
<url>jdbc:postgresql://localhost:5432/USCProduction</url>
<driver>org.postgresql.Driver</driver>
</pool>
</connection>
<statement>
<sql>
<![CDATA[ delete from tactiondetail where actiondetailid=?]]></sql>
<parameter xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('actiondetailid')" type="BIGINT"/>
</statement>
</dbreport>
<log level="full"/>
<dbreport>
<connection>
<pool>
<password>Youtility11</password>
<user>youtilitydba</user>
<url>jdbc:postgresql://localhost:5432/USCProduction</url>
<driver>org.postgresql.Driver</driver>
</pool>
</connection>
<statement>
<sql>
<![CDATA[ delete from tactiondetail where actionid=?]]></sql>
<parameter xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('actionid')" type="BIGINT"/>
</statement>
</dbreport>
<log>
<property name="MESSAGE" value="Executing default 'fault' sequence"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
</log>
<switch xmlns:ns="http://org.apache.synapse/xsd" source="get-property('ERROR_CODE')">
<case regex="500000">
<property name="ERROR_MESSAGE" value="duplicate key value violates or The system is attempting to access an inactive service " scope="default" type="STRING"/>
</case>
<case regex="101503">
<property name="ERROR_MESSAGE" value="Error connecting to the back end" scope="default" type="STRING"/>
</case>
</switch>
<payloadFactory>
<format>
<ResponseJSON xmlns="">
<Exception>$1</Exception>
<Status>$2</Status>
<Total>0</Total>
</ResponseJSON>
</format>
<args>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('ERROR_MESSAGE')"/>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('ERROR_CODE')"/>
</args>
</payloadFactory>
<header name="To" action="remove"/>
<property name="RESPONSE" value="true" scope="default" type="STRING"/>
<property name="NO_ENTITY_BODY" action="remove" scope="axis2"/>
<log level="full"/>
<send/>
</sequence>
每当dss关闭时传递故障消息但在dss运行模式时没有传递给出错误,如此
Caused by: com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
at [row,col {unknown-source}]: [1,167]
答案 0 :(得分:0)
正如错误所说:“ 非法处理指令目标(”xml“);规范保留xml(不区分大小写)。 ”似乎你是在从DSS返回的响应中使用保留字“xml”。请仔细检查来自DSS的XML响应,并通过XML验证器(可能使用Eclipse XML验证器)运行响应,以查看响应是否一切正常。