错误{API_LOGGER ...} - DataMapper中介:映射失败WSO2

时间:2017-08-02 17:50:13

标签: api wso2 datamapper

我对datamapper有一点问题,我试图创建一个传递一些小消息并遇到问题,如何吼叫:

TID[-1234] [EI] [2017-08-02 14:37:18,356] ERROR {org.wso2.carbon.mediator.datamapper.DataMapperMediator} - DataMapper mediator : mapping failed org.wso2.carbon.mediator.datamapper.engine.input.readers.XMLInputReader.xmlTraverse(XMLInputReader.java:174) org.wso2.carbon.mediator.datamapper.engine.input.readers.XMLInputReader.read(XMLInputReader.java:120) org.wso2.carbon.mediator.datamapper.engine.input.InputBuilder.buildInputModel(InputBuilder.java:59) org.wso2.carbon.mediator.datamapper.engine.core.mapper.MappingHandler.doMap(MappingHandler.java:88) org.wso2.carbon.mediator.datamapper.DataMapperMediator.transform(DataMapperMediator.java:309) org.wso2.carbon.mediator.datamapper.DataMapperMediator.mediate(DataMapperMediator.java:259) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) org.apache.synapse.rest.Resource.process(Resource.java:343) org.apache.synapse.rest.API.process(API.java:399) org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:123) org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:101) org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69) org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:304) org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:78) org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:326) org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372) org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151) org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:748) 
TID[-1234] [EI] [2017-08-02 14:37:18,357] ERROR {API_LOGGER.vendedor} - DataMapper mediator : mapping failed org.wso2.carbon.mediator.datamapper.engine.input.readers.XMLInputReader.xmlTraverse(XMLInputReader.java:174) org.wso2.carbon.mediator.datamapper.engine.input.readers.XMLInputReader.read(XMLInputReader.java:120) org.wso2.carbon.mediator.datamapper.engine.input.InputBuilder.buildInputModel(InputBuilder.java:59) org.wso2.carbon.mediator.datamapper.engine.core.mapper.MappingHandler.doMap(MappingHandler.java:88) org.wso2.carbon.mediator.datamapper.DataMapperMediator.transform(DataMapperMediator.java:309) org.wso2.carbon.mediator.datamapper.DataMapperMediator.mediate(DataMapperMediator.java:259) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) org.apache.synapse.rest.Resource.process(Resource.java:343) org.apache.synapse.rest.API.process(API.java:399) org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:123) org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:101) org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69) org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:304) org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:78) org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:326) org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372) org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151) org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:748) 

DataMapper_01 DataMapper_02

如果有人能帮助我,我会非常感激。

谢谢。

1 个答案:

答案 0 :(得分:0)

我能够解决我的问题。

问题是,我的项目有一个ContentType属性,但没有MessageType属性,我在数据映射之后和ContentType属性之前创建了它。这解决了我的问题。

感谢您的帮助。