[英]Error while building Passthrough stream First Element must contain the local name, Envelope , but found alerts
[英]Error "First Element must contain the local name, Envelop" when consuming JMS messages
當我的偵聽器運行時,它會在我運行時立即出現此錯誤。 無法弄清楚它是做什么的
2023-02-01 16:33:59,899] ERROR {JMSMessageReceiver} - Unknown error processing message org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found prov
我正在收聽的有效負載如下所示:
<prov><rowID>122</rowID><msisdn>110000171</msisdn>
以下是代理服務中的配置設置我正在聽消息:
<parameter name="transport.jms.Destination">PROV.MAP.RT</parameter>
<parameter name="transport.jms.ContentType">text/xml</parameter>
<parameter name="transport.jms.ConnectionFactory">ProvMapperRealtimeListener</parameter>
如果您使用 JMS 入站端點來偵聽隊列,請在入站 EP 配置中設置以下屬性。
<parameter name="transport.jms.ContentType">application/xml</parameter>
更新
在您的代理配置中更改以下屬性。
<parameter name="transport.jms.ContentType">application/xml</parameter>
解釋
當消息進入 WSO2 時,它將根據消息的內容類型轉換為可處理的格式。 對於此 WSO2 使用消息構建器,根據內容類型選擇適當的構建器。 默認情況下, text/plain
Content-Type 是使用 SOAP 消息生成器構建的,因此它需要正確的 SOAP 消息正文。 由於您有一個 XML 而不是它因上述錯誤而失敗。 一旦將 Content-Type 更改為application/xml
,它將被構建為 XML。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.