esercizi webservices wsdl

This commit is contained in:
2015-06-29 00:45:45 +02:00
parent 620edb5049
commit 53c280b729
60 changed files with 1741 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
package exam;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.Iterator;
import java.util.List;
public class ClientPrintAllCDs {
public static void main (String[] args) throws NamingException{
// added method main and signature exception
Context ctx =new InitialContext();
RemoteEJB r = (RemoteEJB) ctx.lookup("java:global/web/EJB!exam.RemoteEJB");
List<CD> l = r.findall();
Iterator<CD> i = l.iterator();
while (i.hasNext()){
CD temp = i.next();
System.out.print(temp.getId() + " " + temp.getTitle() + " " + temp.getAuthor() + " " +temp.getPrice() + "\n");
}
}
}