Creating and accessing XML Web services

These questions are based on Cert-70-554VB – MSCert: UPGRADE – MCSD Microsoft .NET Skills to MCPD Enterprise Application Developer Using the Microsoft .NET Framework: Part 2 – Section 1 Microsoft Developer Self-Test Software Practice Test.


Objective: Creating and accessing XML Web services
SubObjective: Create and configure an XML Web service method


Single Answer, Multiple Choice


You are an enterprise application developer at ESoft Corp. You are creating an XML Web service named ClaimService for an insurance organization. The Web service connects to multiple data sources, including a DB2 and SQL Server 2005 database, to retrieve and process customer claim data. The ClaimService Web service is defined as:


Public Class ClaimService
  Inherits WebService
                <WebMethod()> _
                Public Function ProcessClaim(ByVal ClaimID As String) As Integer
                                ‘Implementation code
                End Function
End Class


The ProcessClaim method must authenticate with each database using the network credentials of the client application. The client application requires all users to log into the Windows domain before processing or accessing claim data. Which code should you use to invoke the ProcessClaim method?



  1. Dim proxy As New ClaimService
    Dim nc As New System.Net.NetworkCredential(“CurrentUser”,”Pa$$w0rd”)
    Dim cc As New System.Net.CredentialCache()
    cc.Add(New Uri(proxy.Url), “Basic”, nc)
    proxy.Credentials = cc
    proxy.ProcessClaim(“1001″)


  1. Dim proxy As New ClaimService
    proxy.Credentials = System.Net.CredentialCache.DefaultCredentials
    proxy.ProcessClaim(“1001″)


  1. Dim proxy As New ClaimService
    Dim cc As New System.Net.CredentialCache()
    proxy.Credentials = cc.DefaultNetworkCredentials
    proxy.ProcessClaim(“1001″)


  1. Dim proxy As New ClaimService
    proxy.Credentials =


    1. System.Net.CredentialCache.DefaultNetworkCredentials
    proxy.ProcessClaim(“1001″)



cmadmin

ABOUT THE AUTHOR

Posted in Uncategorized|

Comment:

Powered by WebDesk