wso2代理服務出錯 (Error in wso2 proxy service)


問題描述

wso2代理服務出錯 (Error in wso2 proxy service)

我有以下使用 google 電子表格連接器的代理服務:

<?xml version="1.0" encoding="UTF‑8"?>
<proxy name="googleTest" startOnLoad="true" trace="disable"
  transports="http https" xmlns="http://ws.apache.org/ns/synapse" statistics="disable">
  <target>
    <inSequence>
      <property name="messageType" scope="axis2" type="STRING" value="application/json"/>
      <googlespreadsheet.updateCells configKey="access">
        <key>14sCud5RqFt7O44Ol_GnTBgwFbZSnWAW‑dJ833ryfWY8</key>
        <worksheetId>1</worksheetId>
        <cellId>R2C6</cellId>
        <inputValue>Inc</inputValue>
        <row>2</row>
        <col>6</col>
        <cellVersion>1dzdhc</cellVersion>
      </googlespreadsheet.updateCells>
      <log level="full"/>
    </inSequence>
    <outSequence/>
    <faultSequence/>
  </target>
</proxy>

但是我運行此代理時出現以下錯誤:

[2015‑11‑26 19:15:04,506] ERROR ‑ RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '[' (code 91) in prolog; expected '<'
 at [row,col {unknown‑source}]: [1,1]

我該如何解決這個問題?請幫忙


參考解法

方法 1:

The exception you're having is the following:

Unexpected character '[' (code 91) in prolog; expected '<'

This looks like it is an issue with the contentType. Is seems like you're sending JSON data (starting with [), but the output formatter expects XML (starting with <).

Add the following property to specify that you're sending json data:

<property name="messageType" value="application/json" scope="axis2"/>

(by Riyafa Abdul HameedFiveO)

參考文件

  1. Error in wso2 proxy service (CC BY‑SA 2.5/3.0/4.0)

#wso2-esb #google-sheets #google-spreadsheet-api #wso2






相關問題

WSO2 Carbon 管理控制台異常 (WSO2 Carbon Management Console Exception)

WSO2 ESB 中介序列與代理服務 (WSO2 ESB Mediation Sequence vs Proxy Service)

帶有 XPath 擴展的 WSO2 Developer Studio (WSO2 Developer Studio with XPath extensions)

我們可以使用 wso2esb Jms 消費消息嗎 (Can we Consume the Messages using wso2esb Jms)

使用 WSO2 peoplehr 連接器時出錯 (Error using WSO2 peoplehr connector)

在路徑中找不到 WSO2ESB 自定義中介 Java 類 (WSO2ESB Custom Mediator Java Class is not found in the path)

WSO2 豐富陣列 (WSO2 Enrich array)

wso2代理服務出錯 (Error in wso2 proxy service)

如何豐富 OM 屬性中的節點值? (How to enrich a node value in OM property?)

如何發送字符串內容作為來自 WSO2 ESB 代理的響應? (How to send string content as the response from WSO2 ESB Proxy?)

wso2-esb 集群後,每個 carbon 控制台(管理和工作人員)都不工作 (wso2-esb After clustering, every carbon console(management and worker) doesn't work)

WSO2 ESB:如何處理端點返回的內部錯誤 (WSO2 ESB: How to handle internal error returned by an endpoint)







留言討論