REST Java Web サービスにリダイレクトする http エンドポイントがあります。リクエストの本文にいくつかの属性が埋め込まれた application/x-www-form-urlencoded リクエストを受け取りました。
Web サービス内で、これらの属性を使用してミュール メッセージのステータスを更新したいと考えています。RequestContext.getEventContext() は非推奨になり、Doc は代わりに Callable を実装するように言っているため、私には機能していないようです.onCall メソッドは呼び出されません。
何か案が ?
私のコードの下:
enter code here
@Path("/restClass")
public class HelloREST implements Callable{
private String industry;
private String lob;
private String nuixlegalentity;
private org.apache.log4j.Logger log = Logger.getLogger(LoadClass.class);
@POST
@Path("/setPayload")
@Consumes("application/x-www-form-urlencoded")
public void setMessage(@FormParam("industry") String industryParam, @FormParam("lob") String lobParam,@FormParam("nuixlegalentity") String nuixlegalentityParam){
log.debug("**************INSIDE SETMESSAGE******************");
industry=industryParam;
lob=lobParam;
nuixlegalentity=nuixlegalentityParam;
}
@Override
public Object onCall(MuleEventContext eventContext) throws Exception{
log.debug("**************INSIDE ONCALL******************");
eventContext.getSession().setProperty("industry","industry");
eventContext.getSession().setProperty("lob",lob);
eventContext.getSession().setProperty("nuixlegalentity",nuixlegalentity);
return eventContext.getMessage();
}
}
}