Commit a291dc7a by Patryk Czarnik

foto i MTOM

parent 01b2a1de
......@@ -6,6 +6,7 @@ import java.util.List;
import jakarta.jws.WebParam;
import jakarta.jws.WebResult;
import jakarta.jws.WebService;
import jakarta.xml.ws.soap.MTOM;
import sklep.db.CustomerDAO;
import sklep.db.DBConnection;
import sklep.db.DBException;
......@@ -15,8 +16,10 @@ import sklep.db.RecordNotFound;
import sklep.model.Customer;
import sklep.model.Order;
import sklep.model.Product;
import sklep.photo.PhotoUtil;
@WebService
@MTOM
public class Sklep {
@WebResult(name="product")
public List<Product> wszystkieProdukty() throws DBException {
......@@ -68,4 +71,9 @@ public class Sklep {
}
}
@WebResult(name="bytes")
public byte[] foto(@WebParam(name="id") int productId) throws DBException, RecordNotFound {
return PhotoUtil.readBytes(productId);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment