Sunday, December 13, 2009

Consume Web Service client in EJB

See this article

Example:
@Stateless(mappedName = "ejb/eisAccountingService")
public class EisAccountingServiceBean implements EisAccountingServiceLocal, EisAccountingServiceRemote {
    
    @WebServiceRef(name = "DipexExImServiceSoap", value = DipexExImService.class)
    private DipexExImServiceSoap wsService;
    
    public void addReceiptCard(ReceiptCard receiptCard) {
        MaterialPrijemka mr = new MaterialPrijemka();
        // set mr here
        wsService.materialPrijem(mr);
    }
}