//Standard libraries import javax.xml.rpc.Service; import javax.xml.rpc.Stub; // Import for service import bnquote.BNQuoteService_Impl; import bnquote.BNQuotePortType; public class bnclient { public static float getPrice (String url, String isbn) throws Exception { System.out.println("EGEE Webservices Course - Example Client"); System.out.println("Making request..."); // Get a reference to the stub BNQuoteService_Impl service = new BNQuoteService_Impl(); BNQuotePortType port = service.getBNQuotePort(); float value = port.getPrice ("0672319225"); System.out.println("Response received."); return (value); } // Driver to illustrate the invocation of the service // This sample retrieves the price of the book "Understanding SOAP" public static void main(String[] args) { try { float returnedPrice = getPrice("http://services.xmethods.net:80/soap/servlet/rpcrouter","0596003994"); System.out.println(returnedPrice); System.out.println("Finished."); } catch (Exception e) {e.printStackTrace();} } }