0

我在多个表中插入其中一些是直接插入,还有一些是我们需要拆分这意味着使用迭代调解器我已经使用两个代理完成并添加故障序列如果我的 DSS 关闭,插入也可以,它将正确的故障传递给客户端.问题是当 dss 中出现错误时,像这样的 ..primarykey voilation 我<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]
4

1 回答 1

0

正如错误所说:“非法处理指令目标(“xml”);xml(不区分大小写)由规范保留。 ”您似乎在从 DSS 返回的响应中使用了保留字“xml”。请仔细检查来自 DSS 的 XML 响应,并通过 XML 验证器(可能使用 Eclipse XML 验证器)运行响应以查看响应是否正常。

于 2013-03-25T08:51:20.067 回答