samples.userguide.example6.WidgetPrice binding = new WidgetPriceServiceLocator().getWidgetPrice();
((WidgetPriceSoapBindingStub)binding).setMaintainSession(true);
try {
((WidgetPriceSoapBindingStub) binding).setWidgetPrice("FOO", "$1.00");
} catch (java.rmi.RemoteException re) {
throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re );
}
try {
java.lang.String value = null;
value = binding.getWidgetPrice("FOO");
if (value == null ||
!value.equals("$1.00"))
System.out.println("Wrong Price" + value);
} catch (java.rmi.RemoteException re) {
throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re );
}