I am trying to rejuvenate some old web service for spam processing that was originally written in AXIS 1.
I decided to try SLSB based web service and created this code based on existing API:
Comparing to the old service, that uses the same API, the amount of code is reduced hundredfold.
@SOAPBinding(style = Style.RPC)
public class SpamComplaintWS
* Web service operation
public SpamResult processSpamComplaint(
@WebParam(name = "email") String email,
@WebParam(name = "fromAddress") String fromAddress,
@WebParam(name = "mailDate") String mailDate)
SpamToken st = new SpamToken();
java.lang.String res = st.processSpamRecord(email, fromAddress, mailDate);
return (new SpamResult(res));
Unfortunately, that existing API has extensive DI from the original servlet context (3 context files).
I am quite new to ejb3, so I am not sure how should I inject these dependencies into my EJB.
Should I use @Reference annotation?
What is the best way to deploy this thing, i.e. instead of original war file should I create ear or sar?
I am using JBOSS 4.2, BTW.
I will appreciate any tips on this matter.