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,34 @@
package exam;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSContext;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
/**
* Created by Giovanni on 31/05/2015.
*/
public class ClientUpdatePrice {
public static void main(String[] args) throws NamingException {
//removed try catch e added signatute exception to main method
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("jms/javaee7/ConnectionFactory");
Destination d = (Destination) ctx.lookup("jms/javaee7/Topic");
try (JMSContext jmsContext = cf.createContext()) {
GeneralMessage gm = new GeneralMessage(args[0],Float.valueOf(args[1]));
jmsContext.createProducer().send(d, gm);
}
}
}