We are working with WSO2 ESB 4.8.1 with JAVA 1.7.0_55. Always, when we start the ESB and make the first request we receive this error:
TID: [0] [ESB] [2015-04-22 10:51:31,067] ERROR {org.apache.synapse.transport.passthru.util.RelayUtils} - Error while building Passthrough stream {org.apache.synapse.transport.passthru.util.RelayUtils}
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,62]
Message: White spaces are required between publicId and systemId.
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:129)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:107)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:82)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:68)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.apache.synapse.rest.Resource.process(Resource.java:297)
at org.apache.synapse.rest.API.process(API.java:298)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:76)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:50)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:220)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:225)
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: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,62]
Message: White spaces are required between publicId and systemId.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
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.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.SJSXPStreamReaderWrapper.next(SJSXPStreamReaderWrapper.java:138)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 22 more
TID: [0] [ESB] [2015-04-22 10:51:31,073] ERROR {org.apache.synapse.mediators.base.SequenceMediator} - Error while building message {org.apache.synapse.mediators.base.SequenceMediator}
org.apache.axis2.AxisFault: Error while building Passthrough stream
at org.apache.synapse.transport.passthru.util.RelayUtils.handleException(RelayUtils.java:236)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:111)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:82)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:68)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.apache.synapse.rest.Resource.process(Resource.java:297)
at org.apache.synapse.rest.API.process(API.java:298)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:76)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:50)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:220)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:225)
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: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,62]
Message: White spaces are required between publicId and systemId.
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:129)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:107)
... 17 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,62]
Message: White spaces are required between publicId and systemId.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
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.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.SJSXPStreamReaderWrapper.next(SJSXPStreamReaderWrapper.java:138)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 22 more
After this, we make same request and all works fine...
Any suggestion in order to avoid this error?
Analyzing response with this error we saw responses with this message:
"Error Code: 502 Proxy Error. The ISA Server denied the specified Uniform Resource Locator (URL).
After debug source code ESB we saw in the 'synapse-nhttp-transport' class there was a bug where, although the file /repository/conf/axis2/axis2.xml values contained in the 'nonProxyHosts', first call is always sent through the proxy.
The proxy itself was the one who cut the traffic and error produced was motivated by the response from it.
To fix has created a patch changing the class leaving it as follows:
public HttpHost selectProxy(final HttpHost target) {
if (this.proxy != null) {
if (knownProxyHosts.contains(target.getHostName().toLowerCase(Locale.US))) {
return this.proxy;
} else if (knownProxyHosts.contains(target,getHostName().toLowerCase(Locale.US))) {
return null;
} else {
// we are encountering this host for the first time
if (!isByPass(target.getHostName().toLowerCase(Locale.US))) {
return this.proxy;
} else {
return null;
}
}
}
return this.proxy;
}
Additionally, WSO2 has been notified to correct this bug.
Related
I'm stuck up on more errors in the same code mentioned in the question linked here.
I get this error as given below:-
(Error - 1)
ERROR {VFSUtils} - Couldn't verify the lock java.io.IOException: inputstream is closed
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2911)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
at com.jcraft.jsch.ChannelSftp.access$500(ChannelSftp.java:36)
at com.jcraft.jsch.ChannelSftp$2.read(ChannelSftp.java:1417)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:290)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
at org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
at org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.apache.synapse.commons.vfs.VFSUtils.verifyLock(VFSUtils.java:356)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:231)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:175)
at org.apache.synapse.transport.vfs.VFSTransportSender.acquireLockForSending(VFSTransportSender.java:396)
at org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:279)
at org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:214)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.eip.splitter.CloneMediator.mediate(CloneMediator.java:213)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:249)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:820)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:322)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:608)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:207)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:298)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
WARN {VFSTransportSender} - Couldn't get the lock for the file : sftp://{sftp_path}/abc.json, retry : 1 scheduled after : 30000
(Error - 2)
ERROR {VFSUtils} - Cannot get the lock for the file : sftp://{sftp_path}/abc.json before processing org.apache.commons.vfs2.FileSystemException: Could not write to "sftp://{sftp_path}/xyz.json.lock".
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1197)
at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:413)
at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:392)
at org.apache.synapse.commons.vfs.VFSUtils.createLockFile(VFSUtils.java:262)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:220)
at org.apache.synapse.commons.vfs.VFSUtils.acquireLock(VFSUtils.java:175)
at org.apache.synapse.transport.vfs.VFSTransportSender.acquireLockForSending(VFSTransportSender.java:396)
at org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:279)
at org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:214)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.eip.splitter.CloneMediator.mediate(CloneMediator.java:213)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:249)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:820)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:322)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:608)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:207)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:298)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: 4:
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:882)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:709)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:703)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:519)
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1193)
... 35 more
Caused by: java.io.IOException: Pipe closed
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:307)
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:377)
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2909)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:757)
... 39 more
(Error - 3)
ERROR {VFSUtils} - Couldn't release the lock for the file : sftp://{sftp_path}/def.json after processing
ERROR {VFSTransportSender} - IO Error while creating response file : sftp://{sftp_path}/def.json org.apache.commons.vfs2.FileSystemException: Could not write to "sftp://{sftp_path}/def.json".
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1197)
at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:413)
at org.apache.synapse.transport.vfs.VFSTransportSender.populateResponseFile(VFSTransportSender.java:352)
at org.apache.synapse.transport.vfs.VFSTransportSender.writeFile(VFSTransportSender.java:280)
at org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:189)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:678)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:86)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:586)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:409)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:77)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:123)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:214)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)
at org.apache.synapse.mediators.eip.splitter.CloneMediator.mediate(CloneMediator.java:213)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:249)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:820)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:322)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:608)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:207)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:298)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: 4:
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:882)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:709)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:703)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:519)
at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1193)
... 31 more
Caused by: java.io.IOException: Pipe closed
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:307)
at java.base/java.io.PipedInputStream.read(PipedInputStream.java:377)
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2909)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:757)
... 35 more
I'm reading from and writing to multiple files in a windows sftp.
Can this be an issue with my sftp server ? or can i make changes to the wso2 config files or add some property to the proxy that could fix this issue?
Looks to me like there's a permission issue on the ftp. I would first check those and if they are correct try with disabling the lock mechanism.
Not sure if it works if you set transport.vfs.Locking=false in the sftp url, another way could be set it to <property name="transport.vfs.Locking" scope="transport" value="false"> before you write to the ftp.
https://ei.docs.wso2.com/en/latest/micro-integrator/references/synapse-properties/transport-parameters/vfs-transport-parameters/
Hope that helps.
I'm trying consume a soap web service through WSO2 ei. When invoke a web service using wso2 obtain a exception.
In WSO2, this web service is created like Proxy Service - Pass Through Service and only send inbound mnessage to endpoint address without any transformation.
But if my client invoke directly web service without wso2, it woiks fine.
This is the wso2 ei logs:
[2018-06-28 08:35:53,701] [EI-Core] ERROR - RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
at [row,col {unknown-source}]: [1,50]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:65)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:177)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:155)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:108)
at org.apache.synapse.core.axis2.Axis2Sender.doSOAPFormatConversion(Axis2Sender.java:352)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:214)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:531)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:118)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:337)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:531)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Thanks,
José Luis
I'm using org.apache.synapse.commons.json.JsonStreamBuilder and org.apache.synapse.commons.json.JsonStreamFormatter in the wso2am 1.9.1, and I don't have problems with JSON malformed, but in wso2am 1.10.0, I got this error:
[2016-06-30 23:50:22,489] ERROR - AnonymousListMediator javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,10]
Message: Unexpected symbol: END_OBJECT
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,10]
Message: Unexpected symbol: END_OBJECT
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:653)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.buildNext(OMSourcedElementImpl.java:880)
at org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:122)
at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:343)
at org.apache.axiom.om.impl.traverse.OMChildrenIterator.getNextNode(OMChildrenIterator.java:36)
at org.apache.axiom.om.impl.traverse.OMAbstractIterator.hasNext(OMAbstractIterator.java:58)
at org.apache.synapse.commons.json.JsonUtil.removeIndentations(JsonUtil.java:414)
at org.apache.synapse.commons.json.JsonUtil.removeIndentations(JsonUtil.java:421)
at org.apache.synapse.commons.json.JsonUtil.removeJsonPayload(JsonUtil.java:624)
at org.apache.synapse.mediators.transform.PayloadFactoryMediator.mediate(PayloadFactoryMediator.java:158)
at org.apache.synapse.mediators.transform.PayloadFactoryMediator.mediate(PayloadFactoryMediator.java:100)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
at org.apache.synapse.mediators.MediatorFaultHandler.onFault(MediatorFaultHandler.java:86)
at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:102)
at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:89)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Yes, I have a JSON malformed in my application, but I can't fix this now, there is a way to get the same behavior that wso2am 1.9.1? This is a bug or api manager don't have to pass JSON malformed?
Edited: If I use org.apache.axis2.json.JSONStreamFormatter and org.apache.axis2.json.JSONStreamBuilder, I don't have the problems, but I saw that is cause a fail on the Prototyped APIS, the GET methods don't work after change this configuraton.
Thank you
You probably have wrong value in Content-Lenght header. Remove the header Content-Length.
One workaround is to build the message as a Plaintext content.You can use the following builder.
<messageBuilder contentType="text/plain"
class="org.apache.axis2.format.PlainTextBuilder"/>
I am trying to create an API in WSO2 ESB 4.9.0 that should return an image of JPEG type.
But I am getting this error: Caused by: org.apache.axis2.AxisFault: Error getting GZIP output stream.
So, is it possible to turn off GZIP compression in WSO2 ESB for image/jpeg message types?
TID: [-1234] [] [2016-03-23 08:17:09,833] ERROR
{org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator}
- Error getting GZIP output stream {org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator}
org.apache.axis2.AxisFault: Invalid null character in text to output
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:146)
at
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator.writeTo(GzipMessageFormatterDecorator.java:66)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:552)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:267)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at
org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:444)
at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:102)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
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.rest.Resource.process(Resource.java:297) at
org.apache.synapse.rest.API.process(API.java:335) at
org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:97)
at
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:52)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:266)
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:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
com.ctc.wstx.exc.WstxIOException: Invalid null character in text to
output at
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:462)
at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:289)
at
org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:250)
at
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerialize(OMTextImpl.java:415)
at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:562)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:875)
at
org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
at
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:143)
... 23 more Caused by: java.io.IOException: Invalid null character in
text to output at
com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:51)
at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:623)
at
com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:554)
at
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:460)
... 30 more TID: [-1234] [] [2016-03-23 08:17:09,838] ERROR
{org.apache.synapse.transport.passthru.PassThroughHttpSSLSender} -
Failed to submit the response
{org.apache.synapse.transport.passthru.PassThroughHttpSSLSender}
org.apache.axis2.AxisFault: Error getting GZIP output stream at
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator.handleException(GzipMessageFormatterDecorator.java:95)
at
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator.writeTo(GzipMessageFormatterDecorator.java:76)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:552)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:267)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at
org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:444)
at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:102)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
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.rest.Resource.process(Resource.java:297) at
org.apache.synapse.rest.API.process(API.java:335) at
org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:97)
at
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:52)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:266)
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:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.apache.axis2.AxisFault: Invalid null character in text to output
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:146)
at
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator.writeTo(GzipMessageFormatterDecorator.java:66)
... 22 more Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null
character in text to output at
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:462)
at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:289)
at
org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:250)
at
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerialize(OMTextImpl.java:415)
at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:562)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:875)
at
org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
at
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:143)
... 23 more Caused by: java.io.IOException: Invalid null character in
text to output at
com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:51)
at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:623)
at
com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:554)
at
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:460)
... 30 more TID: [-1234] [] [2016-03-23 08:17:09,841] ERROR
{org.apache.synapse.core.axis2.Axis2Sender} -
Content-Encoding:gzip,Content-Type:image/jpeg,Vary:Accept-Encoding,
Unexpected error sending message back
{org.apache.synapse.core.axis2.Axis2Sender}
org.apache.axis2.AxisFault: Failed to submit the response at
org.apache.synapse.transport.passthru.PassThroughHttpSender.handleException(PassThroughHttpSender.java:610)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:269)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at
org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:212)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:444)
at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:102)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
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.rest.Resource.process(Resource.java:297) at
org.apache.synapse.rest.API.process(API.java:335) at
org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:97)
at
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:52)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:266)
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:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
org.apache.axis2.AxisFault: Error getting GZIP output stream at
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator.handleException(GzipMessageFormatterDecorator.java:95)
at
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator.writeTo(GzipMessageFormatterDecorator.java:76)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:552)
at
org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:267)
... 20 more Caused by: org.apache.axis2.AxisFault: Invalid null
character in text to output at
org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:146)
at
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator.writeTo(GzipMessageFormatterDecorator.java:66)
... 22 more Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null
character in text to output at
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:462)
at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:289)
at
org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:250)
at
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerialize(OMTextImpl.java:415)
at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeChildren(OMSerializerUtil.java:562)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:875)
at
org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
at
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:143)
... 23 more Caused by: java.io.IOException: Invalid null character in
text to output at
com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:51)
at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:623)
at
com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:554)
at
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:460)
... 30 more TID: [-1234] [] [2016-03-23 08:17:09,844] ERROR
{org.apache.synapse.mediators.builtin.LogMediator} - Could not build
full log message: Can not serialize OM Element Envelope
{org.apache.synapse.mediators.builtin.LogMediator} TID: [-1234] []
[2016-03-23 08:17:09,845] ERROR {API_LOGGER.Photos} - Could not build
full log message: Can not serialize OM Element Envelope
{API_LOGGER.Photos} TID: [-1234] [] [2016-03-23 08:17:09,850] INFO
{org.apache.synapse.mediators.builtin.LogMediator} - To:
http://www.w3.org/2005/08/addressing/anonymous, WSAction: ,
SOAPAction: , MessageID:
urn:uuid:e4e1882c-6a04-4c77-b802-0aaf7d5f73cb, Direction: response,
MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0,
ERROR_MESSAGE =
Content-Encoding:gzip,Content-Type:image/jpeg,Vary:Accept-Encoding,
Unexpected error sending message back, Envelope:
{org.apache.synapse.mediators.builtin.LogMediator}
Judging by the error log* the ESB is parsing your image as an application/xml. So perhaps you have made a configuration error in the /repository/conf/axis2/axis2.xml file?
The builder and formatter should be defined as:
<messageBuilder contentType="image/jpeg" class="org.wso2.carbon.relay.BinaryRelayBuilder" />
<messageFormatter contentType="image/jpeg" class="org.wso2.carbon.relay.ExpandingMessageFormatter" />
See also: http://sachirajapakse.blogspot.nl/2015/10/send-images-for-rest-api-in-wso2-esb.html
*org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:143) ... 23 more Caused by: java.io.IOException: Invalid null character in text to output at (..)
I 've published an api, then suscribed an application to that api in it's environment. I 've generated the access token.
I try to access my api through the wso2 api gw using postman:
GET /api/1/lineas/1234567890/suscripcion/ultima-recarga HTTP/1.1
Host: localhost:8280
Authorization: Bearer a9a9417c18fd86715abba29812c591
Cache-Control: no-cache
And the request is never responded, in the logs I can see the following exception, could you give me a hint on what this exception means and what should I try to successfully call my api?
[2015-02-06 10:51:05,693] INFO - LogMediator To: /api/1/lineas/1234567890/suscripcion/ultima-recarga, MessageID: urn:uuid:6ab1d8e6-8562-40f9-b09e-b5c760bd0f4a, Direction: request, IN_MESSAGE = IN_MESSAGE, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body/></soapenv:Envelope>
[2015-02-06 10:51:07,244] INFO - EndpointContext Endpoint : admin--CRM_api_APIsandboxEndpoint_0 currently SUSPENDED will now be marked active since it processed its last message
[2015-02-06 10:51:07,265] ERROR - SequenceMediator Error while building message
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col {unknown-source}]: [1,1115]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:700)
at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
at org.apache.axis2.transport.TransportUtils.createSOAPEnvelope(TransportUtils.java:161)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:114)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:82)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:68)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler.mediate(APIManagerExtensionHandler.java:65)
at org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler.handleResponse(APIManagerExtensionHandler.java:195)
at org.apache.synapse.rest.API.process(API.java:282)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:83)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:51)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:220)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:492)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:228)
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.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col {unknown-source}]: [1,1115]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:606)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:479)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:464)
at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.java:3283)
at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3210)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2829)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1072)
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)
... 27 more
[2015-02-06 10:51:07,475] ERROR - SequenceMediator Error while building message
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col {unknown-source}]: [1,1115]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:700)
at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
at org.apache.axis2.transport.TransportUtils.createSOAPEnvelope(TransportUtils.java:161)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:114)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:82)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:68)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.apache.synapse.mediators.MediatorFaultHandler.onFault(MediatorFaultHandler.java:85)
at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:102)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:497)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:228)
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.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col {unknown-source}]: [1,1115]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:606)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:479)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:464)
at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.java:3283)
at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3210)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2829)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1072)
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)
... 23 more
[2015-02-06 10:51:07,492] ERROR - NativeWorkerPool Uncaught exception
java.lang.RuntimeException: org.apache.synapse.SynapseException: Error while building message
at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:110)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:497)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:228)
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.synapse.SynapseException: Error while building message
at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:313)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
at org.apache.synapse.mediators.MediatorFaultHandler.onFault(MediatorFaultHandler.java:85)
at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:102)
... 8 more
Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col {unknown-source}]: [1,1115]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:700)
at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:105)
at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:296)
at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:212)
at org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
at org.apache.axis2.transport.TransportUtils.createSOAPEnvelope(TransportUtils.java:161)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:114)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:82)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:68)
... 12 more
Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col {unknown-source}]: [1,1115]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:606)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:479)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:464)
at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.java:3283)
at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3210)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2829)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1072)
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)
... 23 more
thanks
As per the error message it seems your request body is corrupted. Please check whether the <HR> tag is closed (</HR>) in the request body.