hello,
i'm trying to use the throttle mediator for a simple use : restrict the
use of a proxy to a particular ip address
here is my configuration :
<syn:proxy name="InfosEtuMetier2" transports="https http"
startOnLoad="true" statistics="enable" trace="enable">
<syn:target outSequence="main">
<syn:inSequence>
<syn:throttle trace="enable" id="OZ">
<syn:policy>
<wsp:Policy
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle">
<throttle:ThrottleAssertion>
<throttle:ID
throttle:type="IP">193.54.39.29</throttle:ID>
</throttle:ThrottleAssertion>
</wsp:Policy>
</syn:policy>
<syn:onReject>
<syn:sequence key="reject"/>
</syn:onReject>
<syn:onAccept>
<syn:send>
<syn:endpoint key="InfosEtuMetier"/>
</syn:send>
</syn:onAccept>
</syn:throttle>
</syn:inSequence>
</syn:target>
</syn:proxy>
but it fails with this error :
21:59:30,594 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
INFO Start : Throttle mediator
21:59:30,595 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
TRACE Message : <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soapenv:Body><recupererSitFamWS
xmlns="gouv.education.apogee.commun.servicesmetiers.InfosEtuMetier_01062007"><_code
xsi:nil="true" /><_temoinEnService xsi:nil="true" /><_temoinAD
xsi:nil="true" /></recupererSitFamWS></soapenv:Body></soapenv:Envelope>
21:59:30,595 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
TRACE Initializing using static throttling policy : <wsp:Policy
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle">
<throttle:ThrottleAssertion> <throttle:ID
throttle:Type="IP">193.54.39.29</throttle:ID>
</throttle:ThrottleAssertion> </wsp:Policy>
21:59:30,597 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
ERROR Error processing the throttling policy
21:59:30,597 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
WARN Executing fault handler due to exception encountered
21:59:30,598 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
WARN Fault handler - setting ERROR_MESSAGE : Error processing the
throttling policy
21:59:30,598 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
WARN Fault handler - setting ERROR_DETAIL :
org.apache.synapse.SynapseException: Error processing the throttling
policy at
org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:220)
at
org.apache.synapse.mediators.throttle.ThrottleMediator.mediate(ThrottleMediator.java:145)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:125)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:140)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145) at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:226)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:190)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595) Caused by:
org.wso2.throttle.ThrottleException: Error was ocuured during throttle
policy processing Invalied Throttle Policy configuration at
org.wso2.throttle.ThrottlePolicyProcessor.handleException(ThrottlePolicyProcessor.java:385)
at
org.wso2.throttle.ThrottlePolicyProcessor.processPolicy(ThrottlePolicyProcessor.java:366)
at
org.apache.synapse.mediators.throttle.ThrottleMediator.mediate(ThrottleMediator.java:129)
... 10 more
21:59:30,599 [193.54.39.95-spdev2.univ-nancy2.fr] [HttpServerWorker-18]
WARN Fault handler - setting ERROR_EXCEPTION :
org.apache.synapse.SynapseException: Error processing the throttling policy
any idea?
best regards