- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 WSO2 ESB 4.9.0 中的 WSO2 Facebook 连接器从 Facebook 检索数据。我在下面提供了代理配置。
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="facebook_getFeed"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence onError="fault">
<property name="messageType" value="application/json" scope="axis2"/>
<log level="full"/>
<property name="apiUrl" expression="json-eval($.apiUrl)"/>
<property name="apiVersion" expression="json-eval($.apiVersion)"/>
<property name="accessToken" expression="json-eval($.accessToken)"/>
<property name="userId" expression="json-eval($.userId)"/>
<property name="numOfFeeds" expression="json-eval($.numOfFeeds)"/>
<property name="fields" expression="json-eval($.fields)"/>
<facebook.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<accessToken>{$ctx:accessToken}</accessToken>
<apiVersion>{$ctx:apiVersion}</apiVersion>
</facebook.init>
<facebook.getFeeds>
<userId>{$ctx:userId}</userId>
<numOfFeeds>{$ctx:numOfFeeds}</numOfFeeds>
<fields>{$ctx:fields}</fields>
</facebook.getFeeds>
<respond/>
</inSequence>
<outSequence>
<property name="messageType" value="application/json" scope="axis2"/>
<send/>
</outSequence>
</target>
<description/>
</proxy>
我遇到的问题是,每当我向服务发出 POST 请求时,就会超时。检查 ESB 错误日志,似乎存在“构建直通流时出错”。
[2015-12-15 15:16:54,284] ERROR - RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:149)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:363)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2052)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 18 more
[2015-12-15 15:16:54,377] ERROR - SequenceMediator Error while building message
org.apache.axis2.AxisFault: Error while building Passthrough stream
at org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:283)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:142)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:363)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:149)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
... 13 more
引用上面的代理配置,我有一个日志中介器,它实际上成功地打印了 JSON 有效负载,所以这会让我认为它与消息格式化程序有关?
Axis2.xml 文件中的消息格式化程序/生成器配置如下:
<!--JSON Message Formatters-->
<messageFormatter contentType="application/json" class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
<!--JSON Message Builders-->
<messageBuilder contentType="application/json" class="org.apache.synapse.commons.json.JsonStreamBuilder"/>
此文件中的其他所有内容均按照默认配置。
这里可能出了什么问题?
使用 Soap UI(有效负载中 Conceal 的 IP 和访问 token ):
POST http://[SERVER_IP]:8280/services/facebook_getFeed <br>
HTTP/1.1 <br>
Accept-Encoding: gzip,deflate <br>
Content-Type: application/json <br>
Content-Length: 207 <br>
Host: [SERVER_IP]:8280 <br>
Connection: Keep-Alive <br>
User-Agent: Apache-HttpClient/4.1.1 (java 1.5) <br>
有效负载数据:
{
"apiUrl":"https://graph.facebook.com",
"apiVersion":"v2.4",
"accessToken":"[TOKEN HERE]",
"userId":"409521282507981",
"numOfFeeds":"10",
"fields":"message,id,created_time"
}
根据@RavindraRanwala的要求:
[2015-12-15 17:29:38,650] DEBUG - wire >> "POST /services/facebook_getFeed HTTP/1.1[\r][\n]"
[2015-12-15 17:29:38,652] DEBUG - wire >> "Accept-Encoding: gzip,deflate[\r][\n]"
[2015-12-15 17:29:38,653] DEBUG - wire >> "Content-Type: application/json[\r][\n]"
[2015-12-15 17:29:38,653] DEBUG - wire >> "Content-Length: 207[\r][\n]"
[2015-12-15 17:29:38,663] DEBUG - wire >> "Host: [SERVER_IP]:8280[\r][\n]"
[2015-12-15 17:29:38,663] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]"
[2015-12-15 17:29:38,664] DEBUG - wire >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
[2015-12-15 17:29:38,665] DEBUG - wire >> "[\r][\n]"
[2015-12-15 17:29:38,666] DEBUG - wire >> "{[\n]"
[2015-12-15 17:29:38,666] DEBUG - wire >> ""apiUrl":"https://graph.facebook.com",[\n]"
[2015-12-15 17:29:38,667] DEBUG - wire >> ""apiVersion":"v2.4",[\n]"
[2015-12-15 17:29:38,668] DEBUG - wire >> ""accessToken":"[ACCESS_TOKEN]",[\n]"
[2015-12-15 17:29:38,669] DEBUG - wire >> ""userId":"409521282507981",[\n]"
[2015-12-15 17:29:38,669] DEBUG - wire >> ""numOfFeeds":"10",[\n]"
[2015-12-15 17:29:38,679] DEBUG - wire >> ""fields":"message,id,created_time"[\n]"
[2015-12-15 17:29:38,679] DEBUG - wire >> "}"
[2015-12-15 17:29:38,812] INFO - LogMediator To: /services/facebook_getFeed, MessageID: urn:uuid:27814841-6067-466c-b55f-b7fdd67c8d3b, Direction: request, Payload: {
"apiUrl":"https://graph.facebook.com",
"apiVersion":"v2.4",
"accessToken":"[ACCESS_TOKEN]",
"userId":"409521282507981",
"numOfFeeds":"10",
"fields":"message,id,created_time"
}
[2015-12-15 17:29:38,909] INFO - TimeoutHandler This engine will expire all callbacks after : 120 seconds, irrespective of the timeout action, after the specified or optional timeout
[2015-12-15 17:29:40,267] DEBUG - wire << "GET /409521282507981/feed?limit=10&access_token=[ACCESS_TOKEN]&fields= HTTP/1.1[\r][\n]"
[2015-12-15 17:29:40,269] DEBUG - wire << "Accept-Encoding: gzip,deflate[\r][\n]"
[2015-12-15 17:29:40,278] DEBUG - wire << "Content-Type: application/json[\r][\n]"
[2015-12-15 17:29:40,279] DEBUG - wire << "Host: graph.facebook.com:443[\r][\n]"
[2015-12-15 17:29:40,280] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
[2015-12-15 17:29:40,281] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2015-12-15 17:29:40,281] DEBUG - wire << "[\r][\n]"
[2015-12-15 17:29:40,554] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]"
[2015-12-15 17:29:40,557] DEBUG - wire >> "Access-Control-Allow-Origin: *[\r][\n]"
[2015-12-15 17:29:40,558] DEBUG - wire >> "Content-Type: text/javascript; charset=UTF-8[\r][\n]"
[2015-12-15 17:29:40,559] DEBUG - wire >> "X-FB-Trace-ID: E5Iewv3ixeR[\r][\n]"
[2015-12-15 17:29:40,560] DEBUG - wire >> "X-FB-Rev: 2091546[\r][\n]"
[2015-12-15 17:29:40,561] DEBUG - wire >> "ETag: "ca13846784e4a3383090ca79b7a295fd23aa5641"[\r][\n]"
[2015-12-15 17:29:40,561] DEBUG - wire >> "Pragma: no-cache[\r][\n]"
[2015-12-15 17:29:40,562] DEBUG - wire >> "Cache-Control: private, no-cache, no-store, must-revalidate[\r][\n]"
[2015-12-15 17:29:40,563] DEBUG - wire >> "Facebook-API-Version: v2.5[\r][\n]"
[2015-12-15 17:29:40,563] DEBUG - wire >> "Expires: Sat, 01 Jan 2000 00:00:00 GMT[\r][\n]"
[2015-12-15 17:29:40,564] DEBUG - wire >> "Vary: Accept-Encoding[\r][\n]"
[2015-12-15 17:29:40,565] DEBUG - wire >> "Content-Encoding: gzip[\r][\n]"
[2015-12-15 17:29:40,565] DEBUG - wire >> "X-FB-Debug: G+b1bsKrSFxPDc4u1RDGIpHACsTbiJV6n1nGgNfMYwc0IqGO2fif1pnr9/o/dhQ1DLSpl7pXheknjzMwvH948w==[\r][\n]"
[2015-12-15 17:29:40,575] DEBUG - wire >> "Date: Tue, 15 Dec 2015 06:29:46 GMT[\r][\n]"
[2015-12-15 17:29:40,576] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
[2015-12-15 17:29:40,578] DEBUG - wire >> "Content-Length: 814[\r][\n]"
[2015-12-15 17:29:40,579] DEBUG - wire >> "[\r][\n]"
[2015-12-15 17:29:40,580] DEBUG - wire >> "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x3][0xad][0x93][0xef]o[0xa3]6[0x18][0xc7][0xff][0x15][0xc4][0x8b]J[0xd3]z[0x89]⌂[0x3][0x96][0xaa][0x89]$M[0xbb][0xb4][0xd7]6[0x97]\[0xda][0xb0]L[0x91]K[0x1c]B![0x98][0x82][0x9][0xcd]z[0xfd][0xdf]g[0xba]{Q[0xe5][0xa6]p[0x9a][0x6][0xbc][0xb0][0x85][0xad][0xcf][0xd7][0x1f]?[0xcf][0xab][0xbd][0x12]Z[0xd8][0xfc][0x8f]W{+[0xcb]RD[0xd2][0xe6][0xf6
3][0x97][0x96][0xf9][0x84]u[0xa5]D*,[0xfe][0x8b]}j[0x87][0x85][0x14]Z[0xae][0x96]:[0xde]6k[0x10][0x80][0xf8][0x13][0x84][0x9f][0x90];[0x5][0x88][0x3][0xc8][0xb1][0xfb]+0[0x8f]Y[0x19][0xaf][0xcc]⌂[0x2]<[0x8a] r[0x11][0x5][0x8e][0xe7][0xc2]%[0xc4].t[0x10]c[0x18][0x1][0x87]B[0x97][0xd8]o[0xa7][0x1f][0x91][0x13][0xb5][0x95]z[0x13]gQ[0xc3][0xad][0xb]e[0x6][0x1b]Y[0xc8][0xce]q0[0xe0][0x80]q[0xe0][0x1d][0x5][0x13][0x88] c[0x84][0xb9][0x1
][0x10]y[0x7][0xdc]QUjK[0xcb]R7[0xe8]T[0x85]B[0xc7]*[0xb3]D$[0xe2][0xac][0xd3]9Fw[0xa6][0x8]sJ8[0xa6][0xed]t[0xc]IC'[0xc][0x1e][0xd0][0xef][\n]"
[2015-12-15 17:29:40,592] DEBUG - wire >> "[0xa9][0xf5][0xde]*k)[0xb5][0x95][0xa7]"[0x94][0x96]V[0xd6]F[0xec][0xa4][0x95]VY[0xb8]i[\r][0x80][0x10][0x87][0xc7][0xbd]7[0x1](1/u[0xcc][0xdc]=[0x8][0xf0][0xbb]U[0x8b][0xd2]j[0xc4]'[0x8d][0x0][0xf1][0xa8]*[0xdd]L[0xcb][0xf].B][0x89]4[0xdd][0xb7]E[0x81][0x88]#[0xa7]5[\n]"
[2015-12-15 17:29:40,595] DEBUG - wire >> "![0xd8]3Q<[0x0][0xf0]A[0x94][0xdb][0x8d]%[0xb2][0x95][0xb5][0x15][0xfb]Gy[0x18][0xc1][0x94][0x84]L[0xd3][0x9f][0xb8][0x10]@9[0x81][0xad]!0[0x81][0xc]![0xc2][0x98]w[0x18][0xc2]7[0x9][0xc2][0x8d][0xc][0x13][0xeb][0x7][0x11][0xc7][0xd1][0x88]c[0xc2]I{-[0x98]6[0xf0]L-P[0xec][0xb2][0x1f][0xce]⌂[0xfa].@[0xa4][0xa5]2[0x3][0xa5]M[0xfd][[0xb9]2[0xe5][0xb9].[0xd4][0xd6]d[0x91]VU[0xca][0xa2]E[0x81][
0x4][0x8f][0xa3]v[0x5]f[\n]"
[2015-12-15 17:29:40,596] DEBUG - wire >> ")uMq[0x1e][0xd6][0xa4][0xff][0x1]*[0xde][0x91]mD[0xe0]p[0xc4]Z[0x89][0xc0][0x81][0xa0]!:[0x18][0x1d][0x12][0x9b]S[0xff]T[0xc7]AN[0xcd][0xd7][0xde][0xef][0x0]3dX[0x18][0xb8][0xc0]~[0xfb][0xf3][0xd4][0xce]Ed[0xca][0xdb][0xe6][0xaf]v^[0xc8]][0xac][0xaa][0xd2]l[0xdc]h[0x9d][0x97]|[0xd1]]t[0xa3]B[0xe4][0x9b][0xce][0xda][0xb4][0xdf][0xa3]RI'T[n[0xea]t[0xd1][0xdd][0xa1][0xe]]t[0xf][0x0][0x8b][0x
xca][0xd5]oi[0xbc][0x8d][0xf5][0x19][0x4]'e[0x9c][0x85][0xf2][0xcc][0xdc]+e[0xc0],uOD[0x18][0x9a][0xa3]-[0xb5]Jdv[0x6][0x1d][0xe8]0[0x8][0x8c]l[0x88][0x18]`[0xee][0xb7]Y[0xaa][0xcb][0xde]6z[0xca][0xa6][0x18][0xe6]j[0xb6][0xbf][0xf4][0x96]U[0x8][0x7][0xe]B[0xf5][0xc9]r[0xf9]O[0xd0][0xef]{e[0x16].[0xfd][0x95]?N@[0x8][0x8a]z[0x94][0x8c][0xb0]?q[0x82][0xde][0xa4][0x1e]^[0x87][0xec]9[0xae]f~[0x92]D[0x14][0xf5]\[0x15][0xf4][0xcb]"[0xbc]
]d=[0xbc]x[0x92][0xee]\&[0xdb][0xfb]r[0xf0][0xbc]&[0x81]/[0xf4]|[0x15][0x5][0xfe][0xe7]/[0x8f][0xf1][0x1d]<⌂[0xa9][0xf7]+_EW[0x15]c[0x13]W[0xcb]$y[0xbe][0x9a]{[0xeb][0x9b][0x88][0xc2]r[0x1a][0xf4][0xf2][0xcf][0xf7][0xa3]][0x1d][0xc][0x82]A[0x13][0xe5][0xbb][0xa9]3hLg[0xf2]E[0xff]⌂[0xca][0xfe][0xbb][0xa1]*[0xd3]q[0xfa].[0x9b][0x9a].[0x82][0xde][0xbf]+[0x1b][0xf4][0xc7][0xf2][0xe6]|>[0xc3]t|[[0x8f]]q3[0x8c][0xf1][0xae][0x9f][0x93][0
xe8]k[0x8c]/[0xef][0xee]f[0xe7][0xc9][0xa4][0xbe][0x8c][0x3]?[0xbd][0xdf][0xe5]_[0xfb]/[0xfb][0xb1][0x1f][0xf4][0xc9]5[0xb9][0x9e][0x5]f0[0xdd][0x8f]Y[0xe0][0xc3][0xc9][0xee]<{[0xc8].[0xd4]z>[0xa4]^[0xc8]*⌂=[0x99][0xc6][0xf][0x4][0xdc]#:q[0x9d][0xa2][0xff][0xc4]n[0x91][0xfc][0xcb][0x1b]^[0xd4][0xf]Q[0xa3][0xcc]~{[0xfb][0x1b][0x92][0x12][0xdf])M[0x7][0x0][0x0]"
[2015-12-15 17:29:40,674] ERROR - RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:149)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:679)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:244)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2052)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 19 more
[2015-12-15 17:29:40,902] ERROR - TemplateMediator Error while building message
org.apache.axis2.AxisFault: Error while building Passthrough stream
at org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:283)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:142)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:98)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:72)
at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:154)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:679)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:244)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:149)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:133)
... 14 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2052)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 19 more
[2015-12-15 17:29:40,991] ERROR - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:85e6d771-e7c6-4764-8431-01e0fb4782e6, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Error while building message, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
nv:Body/></soapenv:Envelope>
最佳答案
非常感谢@RavindraRanwala 和@ThusithaThilinaDayaratne 引导我解决了这个问题。
查阅线路日志后,Facebook API 似乎正在使用文本/javascript 内容类型进行响应。我没有在 ESB 中启用消息生成器/格式化程序来处理此内容类型,因此该过程最终失败。我所需要做的就是打开我的 axis2.xml 配置文件并附加以下消息构建器:
<!--JSON Message Builders-->
<messageBuilder contentType="application/json" class="org.apache.synapse.commons.json.JsonStreamBuilder"/>
<messageBuilder contentType="text/javascript" class="org.apache.synapse.commons.json.JsonStreamBuilder"/>
...和格式化程序:
<!--JSON Message Formatters-->
<messageFormatter contentType="application/json" class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
<messageFormatter contentType="text/javascript" class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
Facebook 连接器的最新文档似乎位于 GitHub 页面,其中澄清了所有必要的构建器/格式化程序信息:
关于facebook - WSO2 ESB : Unexpected Character Error when submitting JSON to Proxy Service,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34281426/
int i; System.out.print("Please enter a string: "); String string_1 = input.nextLine(); System.out
我想要一个正则表达式来检查 a password must be eight characters including one uppercase letter, one special charac
在此先感谢您的帮助。 在命令行输入“example”时,Python 返回“example”。我在网上找不到任何东西来解释这一点。所有引用资料都在 print 命令的上下文中谈到字符串,我得到了所有关
我有 CSV 格式的数据,这些数据在字符编码方面被严重打乱,可能在不同的软件应用程序(LibreOffice Calc、Microsoft、Excel、Google Refine、自定义 PHP/My
我正在为 Latex 使用 Sublime Text,所以我需要使用特定的编码。但是,在某些情况下,当我粘贴从不同程序(大多数情况下为单词/浏览器)复制的文本时,我收到以下消息: "Not all c
在 flutter 中,我使用了一个php文件,该文件从数据库查询返回json响应,但是当我尝试解码json时,出现此错误: E/flutter ( 8294): [ERROR:flutter/lib
我在 Flutter 项目中遇到异常。错误如下所示: Exception has occurred. FormatException (FormatException: Unexpected char
这个问题已经有答案了: Why doesn't my compare work between char and int in Java? (4 个回答) 已关闭 3 年前。 我试图在我的代码中找出
我在 Flutter 项目中遇到异常。错误如下所示: Exception has occurred. FormatException (FormatException: Unexpected char
我是 python 新手,需要一些帮助。我应该编写一个脚本,从键盘读取单词,直到输入单词 999。对于除 999 之外的每个单词,报告该单词是否有效。如果单词的第一个字符等于最后一个字符,则该单词有效
我正在实现自己的词法分析器,并且刚刚了解了 C# 如何处理字 rune 字:https://msdn.microsoft.com/en-us/library/aa691087(v=vs.71).asp
我有这个字符串: var test = "toto@test.com"; 我想用空值替换“@”字符后的所有字符。我想得到这个字符串: var test = "toto" 最佳答案 试试这个: test
我将数据库从 sqlite 更改为 postgresql 以用于我网站的生产,但出现此错误。当我在本地使用 sqlite 时,它没有出现这个错误。使用 Django。 ProgrammingErr
我正在为我的实验表制作凯撒密码,并使其能够加密 3 代入(凯撒密码),这是练习的重点。但是有一件事困扰着我。首先,如果我输入 3 以外的字符,则有一个尾随字符。例如,输入“恶意软件”,然后输入 2 作
遵循 this question 中的逻辑,以下代码应该有效: #include int main(){ printf("%c", '\0101'); return 0; } 然而,
我在处理一段代码时遇到错误: Too many characters in character literal error 使用 C# 和 switch 语句遍历字符串缓冲区并读取标记,但在这一行中出
给定一个元素,其值为: Distrib = SU & Prem <> 0 我要转<或 >进入 <或 >因为下游应用程序需要
从表面上看,他们似乎都在做同样的事情。但似乎是后者as(,"character")更强大。 作为示例,请考虑以下内容: library(rvest) temp % html_node("div p")
我刚开始使用python,所以很可能只是在做一些愚蠢的事情。我正在从表中读取数据,需要将它们放入txt文件的列中。我无法说服我的代码创建新行。 这是我的代码- file = open("test_m.
在尝试刷新我的项目的 Fortran 90 知识时,我在使用内部文件时遇到了一些奇怪的情况。考虑示例代码: ! ---- internal_file_confusion.f90 ---- progra
我是一名优秀的程序员,十分优秀!