' String variables to hold the required client keys Dim product_code As String = "" ' Convert the binary data in the uploaded file to Base64Encoded string data Private Function ConvertFileToBase64(ByRef fileName As String) As String Dim return_value As String = fileName If System.IO.File.Exists(fileName) Then Dim fs As System.IO.FileStream = New System.IO.FileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read) Dim br As System.IO.BinaryReader = New System.IO.BinaryReader(fs) Dim binaryStream() As Byte = br.ReadBytes(fs.Length) return_value = Convert.ToBase64String(binaryStream) br.Close() fs.Close() fs.Dispose() End If Return return_value End Function ' Parse the resume on button click and display results in textarea Protected Sub btn_parse_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_parse.Click ' Instantiate the web service object Dim hireability As New com.resumeparser.processing.ParsingToolsService() Dim encoded As String = "" Dim file_name As String = "" If file_upload.HasFile Then Try file_upload.SaveAs("C:\\Resumes\\" + file_upload.FileName) encoded = ConvertFileToBase64("C:\\Resumes\\" + file_upload.FileName) file_name = file_upload.FileName ' Remove the file off server System.IO.File.Delete("C:\\Resumes\\" + file_upload.FileName) ' If the file contents are encoded, call the parsing request If encoded <> "" Then output.InnerText = hireability.ParseDocNew(product_code, file_name, encoded, "", "", "", "") End If Catch ex As Exception error_text.InnerText = "ERROR: " + ex.Message.ToString() End Try Else error_text.InnerText = "ERROR: You have not specified a file." End If End Sub Protected Sub btn_retrieve_Click(sender As Object, e As System.EventArgs) Handles btn_retrieve.Click ' Instantiate the web service object Dim hireability As New com.resumeparser.processing.ParsingToolsService() Try output.InnerText = hireability.retrieveCompletedDocsNew(product_code, "", "") Catch ex As Exception error_text.InnerText = "ERROR: " + ex.Message.ToString() End Try End Sub