Invoking the Web Service Method
Add a Button to your Solution
Put a button control onto the Windows form and set the following properties:
Text: GetVehicleInfo
Name: btnGetInfo.
Double click the button to generate a button event handler and be taken to the code window.
Add Button Handler Code to Invoke the Method
The getVehicleInformation method takes an AssetIdentifier as a parameter. The AssetIdentifier has two attributes: the scac and the id. The scac isn't used at this time so set it to blank. Set the id to a the identifier of a vehicle that exists in the database on the target server.
getVehicleInformation returns a VehicleInfo object. Instantiate the object and use it as the return value of the method.
Add the following code to the button handler to invoke the getVehicleInformation method.
|
You should still be able to build the solution without error.