0
我已經創建了WSO2 ESB作爲一個API:得到錯誤而envoking休息API URL
<api xmlns="http://ws.apache.org/ns/synapse" name="getUUIDAPI" context="/getUUID">
<resource methods="GET" uri-template="?Name={searchValue}" inSequence="getUUIDIN" outSequence="CommonJsonOut"/>
</api>
,這讓我的API調用URL爲http://10.224.64.97:8280/getUUID
。現在,當我在我的瀏覽器試試這個休息服務爲:
http://10.224.64.97:8280/getUUID?Name=uvu
,在ESB我得到的錯誤是:
TID: [0] [ESB] [2013-06-26 10:25:50,796] ERROR {org.apache.axis2.description.ClientUtils} - The system cannot infer the transport information from the
/getUUID?Name=uvu?Name=uvu URL. {org.apache.axis2.description.ClientUtils}
TID: [0] [ESB] [2013-06-26 10:25:50,796] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out {org.apache.synapse.core.axis2.Axis2Sender}
org.apache.axis2.AxisFault: The system cannot infer the transport information from the /getUUID?Name=uvu?Name=uvu URL.
at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:81)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:115)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:456)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:316)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:329)
at org.apache.synapse.endpoints.WSDLEndpoint.send(WSDLEndpoint.java:69)
at org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:54)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:95)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.rest.Resource.process(Resource.java:306)
at org.apache.synapse.rest.API.process(API.java:308)
at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:76)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:63)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:182)
at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:367)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:204)
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:722)
正如你可以在上面的錯誤看到它被擊中網址是/getUUID?Name=uvu?Name=uvu
但我正在發送/getUUID?Name=uvu
。 爲什麼我得到這個奇怪的錯誤?如果我複製api文件,與api相關的序列到其他服務器的esb,然後我打上面的url我得到的迴應。 請幫助我。在此先感謝
我做過這樣也拉瑟但是當我再次調用服務,即/ getUUID/UVU它是/ getUUID/UVU/UVU – Roy
有點怪異你說的這最後的意思同樣的事情..聲明? 「如果我複製api文件,與api相關的序列到其他服務器的esb,然後我點擊上面的url我得到的迴應」 – Ratha
我的意思是說,如果我複製api的序列和端點從一個系統到另一個有時它在我的系統中,我創建了10個工作正常的api,但是當我將這些api移動到服務器時,我收到了上述發佈的錯誤 – Roy