我的工作MAC OS X執行存儲過程 - 10.7.5與WSO2 ESB 4.6.0和數據服務功能 - 4.0.5ESB 4.6.0與數據服務器插件 - 無法與REF_CURSOR
的Java Java版本「1.6.0_37」 Java™SE運行時環境(內部版本1.6.0_37-b06-434-11M3909) Java HotSpot™64位服務器虛擬機(版本20.12-b01-434,混合模式)
我想用ref遊標執行存儲過程。
這裏是我的DS
<data name="RZM">
<config id="RZS_Data">
<property name="driverClassName">oracle.jdbc.driver.OracleDriver</property>
<property name="url">XXXX</property>
<property name="username">XXXX</property>
<property name="password">XXXX</property>
<property name="defaultTransactionIsolation">TRANSACTION_READ_COMMITTED</property>
</config>
<query id="TEST" useConfig="RZS_Data">
<sql>call RT_PROC_GET_VERSION(:in_app_id,:in_version_id,?,?,?)</sql>
<result element="Results" rowName="Result">
<element column="app_url" name="app_url" optional="true" xsdType="string"/>
<element column="out_message" name="OutMessage" optional="true" xsdType="string"/>
<element column="out_err_message" name="out_err_message" optional="true" xsdType="string"/>
</result>
<param name="in_app_id" ordinal="1" sqlType="INTEGER" type="INOUT"/>
<param name="in_version_id" ordinal="2" sqlType="STRING" type="INOUT"/>
<param name="compare_from_id" ordinal="3" paramType="ARRAY" sqlType="ORACLE_REF_CURSOR" type="OUT"/>
<param name="out_message" ordinal="4" sqlType="STRING" type="OUT"/>
<param name="out_err_message" ordinal="5" sqlType="STRING" type="OUT"/>
</query>
<operation name="TOP">
<call-query href="TEST">
<with-param name="in_app_id" query-param="in_app_id"/>
<with-param name="in_version_id" query-param="in_version_id"/>
</call-query>
</operation>
</data>
我收到以下錯誤所有我不知道爲什麼我得到這個錯誤的時間
[2013-02-14 18:00:14,400] ERROR - DataService DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:in_version_id
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: RZM
Location: /RZM.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: TOP
Current Params: {}
DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:in_version_id
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: RZM
Location: /RZM.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: TOP
Current Params: {}
at org.wso2.carbon.dataservices.core.engine.CallQuery.extractParams(CallQuery.java:208)
at org.wso2.carbon.dataservices.core.engine.CallQuery.executeElement(CallQuery.java:177)
at org.wso2.carbon.dataservices.core.engine.CallQueryGroup.executeElement(CallQueryGroup.java:111)
at org.wso2.carbon.dataservices.core.engine.OutputElement.execute(OutputElement.java:89)
at org.wso2.carbon.dataservices.core.description.operation.Operation.execute(Operation.java:71)
at org.wso2.carbon.dataservices.core.engine.DataService.invoke(DataService.java:548)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:99)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:110)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
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.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
at org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:435)
at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:227)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:45)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:434)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:219)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
[2013-02-14 18:00:14,402] ERROR - PassThroughHttpSender Failed to submit the response
org.apache.axis2.AxisFault: DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:in_version_id
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: RZM
Location: /RZM.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: TOP
Current Params: {}
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:78)
at org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:435)
at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:227)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:45)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:434)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:219)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:in_version_id
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: RZM
Location: /RZM.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: TOP
Current Params: {}
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:105)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:110)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
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.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
... 12 more
[2013-02-14 18:00:14,403] ERROR - ServerWorker Error processing POST request for : /services/RZM.SOAP12Endpoint/TOP
org.apache.axis2.AxisFault: Failed to submit the response
at org.apache.synapse.transport.passthru.PassThroughHttpSender.handleException(PassThroughHttpSender.java:496)
at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:229)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:45)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:434)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:219)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.axis2.AxisFault: DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:in_version_id
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: RZM
Location: /RZM.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: TOP
Current Params: {}
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:78)
at org.apache.synapse.transport.passthru.PassThroughHttpSender.submitResponse(PassThroughHttpSender.java:435)
at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:227)
... 10 more
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:in_version_id
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: RZM
Location: /RZM.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: TOP
Current Params: {}
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:105)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:110)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
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.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
... 12 more
。我試圖用「TryIt」服務執行DS。輸入XML是繼
<body>
<p:TOP xmlns:p="http://ws.wso2.org/dataservice">
<!--Exactly 1 occurrence-->
<p:in_app_id>1296</p:in_app_id>
<!--Exactly 1 occurrence-->
<p:in_version_id>2.2</p:in_version_id>
</p:TOP>
</body>
存儲過程定義開始與以下
create or replace procedure RT_PROC_GET_VERSION (in_app_id in number,
in_version_id in varchar2,
out_version_detail out sys_refcursor,
out_message out varchar2,
out_err_message out varchar2)
is
begin
open out_version_detail for
select
app_url, switch_board_url, version
.
.
end RT_PROC_GET_VERSION;
能否請你幫忙嗎? 感謝 作者Abhijit