1 16 17 23 24 package samples.userguide.example6; 25 26 public class Main { 27 28 public static void main (String [] args) throws Exception { 29 samples.userguide.example6.WidgetPrice binding = new WidgetPriceServiceLocator().getWidgetPrice(); 30 ((WidgetPriceSoapBindingStub)binding).setMaintainSession(true); 31 try { 32 ((WidgetPriceSoapBindingStub) binding).setWidgetPrice("FOO", "$1.00"); 33 } catch (java.rmi.RemoteException re) { 34 throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re ); 35 } 36 try { 37 java.lang.String value = null; 38 value = binding.getWidgetPrice("FOO"); 39 if (value == null || 40 !value.equals("$1.00")) 41 System.out.println("Wrong Price" + value); 42 } catch (java.rmi.RemoteException re) { 43 throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re ); 44 } 45 } 46 } 47 48 | Popular Tags |