Imports System.ServiceModel

' NOTE: You can use the "Rename" command on the context menu to change the interface name "Ii3Screen_Live" in both code and config file together.
<ServiceContract([Namespace]:="https://www.comptechweb.com/WebServices/i3Screen_Live/")>
Public Interface Ii3Screen_Live

    '<OperationContract()>
    'Function authenticate_sso(data As String) As String

    '<OperationContract()>
    'Function AuthenticateToken(data As String) As String

    <OperationContract()>
    Function BackgroundReports(params As BackgroundReportsIn) As BackgroundReportsOut
    
    <OperationContract()>
    Function HelloWorld(params As HelloWorldIn) As HelloWorldOut


    <MessageContract(IsWrapped:=False)>
    Class BackgroundReportsIn
        <MessageBodyMember(Order:=1)>
        Property userid As String
        <MessageBodyMember(Order:=2)>
        Property password As String
        <MessageBodyMember(Order:=3)>
        Property data As String
    End Class

    <MessageContract(IsWrapped:=False)>
    Class BackgroundReportsOut
        Sub New(status As String, Optional errorMessage As String = Nothing)
            response = "<response><Status>" & HttpUtility.HtmlEncode(status) & "</Status>"
            If errorMessage IsNot Nothing Then
                response &= "<Error>" & HttpUtility.HtmlEncode(errorMessage) & "</Error>"
            End If
            response &= "</response>"
        End Sub
        <MessageBodyMember>
        Property response As String
    End Class

    <MessageContract(IsWrapped:=False)>
    Class HelloWorldIn
        <MessageBodyMember>
        Property name As String
    End Class

    <MessageContract(IsWrapped:=False)>
    Class HelloWorldOut
        Sub New(val As String)
            [return] = val
        End Sub
        <MessageBodyMember>
        Property [return] As String
    End Class

End Interface

