Академический Документы
Профессиональный Документы
Культура Документы
3 4
5 6
1
3/20/2016
7 8
9 10
11 12
2
3/20/2016
15 16
17 18
3
3/20/2016
19 20
21 22
4
3/20/2016
25 26
btnLoginActionPerformed authenticate
• Open the ClientFrame file and find the • Right-click on the authenticate method and
btnLoginActionPerformed skeleton method, select Web Service Client Resources -> Call
which was generated Web Service Operation
• Add a call to the authenticate method
• Further, create the authenticate method
27 28
btnLoginActionPerformed /2 authenticate /2
• Select the • Code is automatically generated to invoke the
authenticate method authenticate web method on the web service
and click OK
29 30
5
3/20/2016
authenticate /3 authenticate /4
• The call to authenticate returns a object of
type TeamLeader
– Declare an instance of TeamLeader outside
of the authenticate method
– Assign what the call to the web service
returns to it
– Pass the contents from the username and
password fields to the method invocation on • Next we need to create the showProjects method
the web service
– If an instance is returned, call the
showProjects method
31 32
showProjects showProjects /2
• Similarly to the authenticate method, generate the • Add code to assign the returning array of Project
code for calling the getListOfProjects method • Loop through the array and extract the names for
display
Extracting
Project[] from
Passing the teamId extracted ArrayOfProject
33
from the TeamLeader object 34
obtained at authentication
6
3/20/2016
37 38
Summary
• By this point you should have successfully
completed the Java client which connects
to a .NET web service
• This demonstrates the cross-platform
interoperability of web services
39