Reputation: 53
I need to write custom POJOCommandMediator
. According to wso2doc I have to implement org.apache.synapse.Command
. I create simple jar with one class:
...
public class PojoCommandMediator implements Command {
@Override
public void execute() {
}
But every time I deploy my jar i see
Class not found in the path' error in Design Sequence editor.
I successfully wrote a custom class mediator before, but here I faces with some difficulties.
So, I have a few questions:
Is it right i have to create by hand mediators directory (by default it absent) and put my command mediator jar in: ESB_HOME\repository\components\mediators
folder?
Is where any additional requirements for Custom POJO Command what I need to know except implement execute method and build jar for successful command class loading in wso2?
Thanks for any help! :)
Upvotes: 2
Views: 363
Reputation: 985
You can deploy the jar file with the custom POJOCommandMediator in the ESB_HOME/repository/components/lib folder. That way upon restart, the ESB will pick up your class.
---Edit---
Actual issue seems to be with the UI componenet which gives an Authorization error. Instead of adding it through the design view, you can go to the source view of the proxy configuration and add the following.
<inSequence>
<pojoCommand name="class-name"/>
</inSequence>
This way the POJOCommand will be deployed properly. Hope it helps.
Upvotes: 1