在WSO2 API(1.6.0)上向已发布服务发送SOAP请求,在本例中为5 MB XML文本,服务器无法正确响应。我们期望正常的SOAP响应。如果我们将请求直接发送到后端服务器,则会成功处理该消息。可能有什么不对。
WSO2 AM,wso2carbon.log的日志文件显示以下消息:
TID: [0] [AM] [2014-05-05 16:01:35,007] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Illegal incoming connection state: REQUEST_DONE . Possibly two send backs are happening for the same request {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,012] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Trying to write response body while the handler is in an inconsistent state REQUEST_DONE {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,013] ERROR {org.apache.synapse.transport.passthru.SourceHandler} - Unexpected I/O error: java.nio.channels.ClosedChannelException {org.apache.synapse.transport.passthru.SourceHandler}
java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:265)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:474)
at org.apache.http.nio.reactor.ssl.SSLIOSession.sendEncryptedData(SSLIOSession.java:339)
at org.apache.http.nio.reactor.ssl.SSLIOSession.outboundTransport(SSLIOSession.java:419)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(AbstractIODispatch.java:150)
at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:181)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:346)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
at java.lang.Thread.run(Thread.java:744)
TID: [0] [AM] [2014-05-05 16:01:35,040] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Illegal incoming connection state: REQUEST_DONE . Possibly two send backs are happening for the same request {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,042] WARN {org.apache.synapse.transport.passthru.SourceHandler} - Trying to write response body while the handler is in an inconsistent state REQUEST_DONE {org.apache.synapse.transport.passthru.SourceHandler}
TID: [0] [AM] [2014-05-05 16:01:35,042] ERROR {org.apache.synapse.transport.passthru.SourceHandler} - Unexpected I/O error: java.nio.channels.ClosedChannelException {org.apache.synapse.transport.passthru.SourceHandler}
请求如下:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/> <soapenv:Body>
<leesAanvraag>
<aanvraagNummer>123</aanvraagNummer>
</leesAanvraag> ... repeat until size of message is 5M
<leesAanvraag>
<aanvraagNummer>123</aanvraagNummer>
</leesAanvraag>
<leesAanvraag>
<aanvraagNummer>123</aanvraagNummer>
</leesAanvraag>
</soapenv:Body> </soapenv:Envelope>
更新:我尝试了32KB的有效负载,在多次发送此有效负载后,发生错误并且WSO2 API管理器没有给出正确的响应。
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode
xmlns:axis2ns1="http://schemas.xmlsoap.org/soap/envelope/">axis2ns1:Server</faultcode><faultstring>Error
in
Sender</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
答案 0 :(得分:1)
请在/repository/conf/passthru-http.properties中输入超时值
http.socket.timeout = 120000(默认值为60000,120000是我们用于负载测试的值)