Previous | Next | (P-PDF) Engineering
Topic: SOAP Adobe Collaboration .Net Web Service
Conf: (P-PDF) Engineering, Msg: 164959
From: Seenuvasan
Date: 3/11/2008 12:50 AM
I've written a web service in .Net to store the comments for the PDF documents. But, the SDKSoap Sample is not calling the ReadFile function. Can you please anyone help me to find out the error.
Please find the code below (VB.Net).
Imports System.IO
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
_
_
_
Public Class Service
Inherits System.Web.Services.WebService
Private Function GetErrTxtPathNameas() As String
Dim errTxtPathNameas As String = ConfigurationManager.AppSettings.GetValues("FilePath")(0)
Return errTxtPathNameas
End Function
Public Function ReadFile(ByVal strFileName As String) As String
Try
Dim sr As StreamReader
sr = New StreamReader(GetErrTxtPathNameas() & strFileName & ".txt")
Return sr.ReadToEnd() '(IIf(sr.ReadToEnd() <> "", sr.ReadToEnd(), ""))
Catch ex As Exception
Return "Good" ' Err.Description
End Try
End Function
Public Function WeiteFile(ByVal strText As String, ByVal strFileName As String) As String
Try
writeLog(GetErrTxtPathNameas() & strFileName & ".txt")
writeLog(strText)
Dim sw As StreamWriter
'sLogFormat used to create log files format
'this variable used to create log filename format "
sw = New StreamWriter(GetErrTxtPathNameas() & strFileName & ".txt", True)
sw.WriteLine(strText)
sw.Flush()
sw.Close()
Return strText
Catch ex As Exception
Return Err.Description
End Try
End Function
Public Function writeLog(ByVal strText As String) As String
Dim sw As StreamWriter
'sLogFormat used to create log files format
'this variable used to create log filename format "
sw = New StreamWriter(GetErrTxtPathNameas() & "log.txt", True)
sw.WriteLine(strText)
sw.Flush()
sw.Close()
Return ""
End Function
End Class
Thanks in advance.