1 57 58 package translated.messages; 59 60 import java.util.Locale ; 61 import org.apache.wsif.WSIFService; 62 import org.apache.wsif.WSIFServiceFactory; 63 import stockquote.wsifservice.StockquotePT; 64 import util.TestUtilities; 65 66 69 class TranslatedMessagesUtilities { 70 static String wsdlLocation = 71 TestUtilities.getWsdlPath("java\\test\\stockquote\\wsifservice") 72 + "Stockquote.wsdl"; 73 static String server = TestUtilities.getSoapServer().toUpperCase(); 74 75 static void doit(Locale name) { 76 try { 77 Locale.setDefault(name); 78 WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); 79 WSIFService service = 80 factory.getService( 81 wsdlLocation, 82 null, 83 null, 84 "http://wsifservice.stockquote/", 85 "StockquotePT"); 86 87 System.err.println("\nUsing locale '" + name + "'"); 88 StockquotePT stub = 89 (StockquotePT) service.getStub(server+"Port", StockquotePT.class); 90 91 float quote = stub.getQuote(""); 92 System.err.println(">> Received quote " + quote + " for ''"); 93 94 } catch (Exception e) { 95 System.out.println("Caught Locale exception " + e); 96 } 97 } 98 } 99 100 | Popular Tags |