// do the invocation
if (operation.executeRequestResponseOperation(input, output, fault)) {
// invocation succeeded, extract information from output
// message
LatLongReturn zipInfo =
(LatLongReturn) output.getObjectPart("GetLatLongResult");
System.out.println(
"This zip code is in "
+ zipInfo.getCity()
+ ","
+ zipInfo.getStateAbbrev()
+ " in "
+ zipInfo.getCounty()
+ " county\n"
+ "It extends from longitude "
+ zipInfo.getFromLongitude()
+ " to longitude "
+ zipInfo.getToLongitude()
+ "\n and from latitude "
+ zipInfo.getFromLatitude()
+ " to latitude "
+ zipInfo.getToLatitude());
} else {
System.out.println("Invocation failed");
// extract fault message info
}
}