ASP.NET XML API Login to Polycom RMX 4000 MCU

ASP.NET XML API Login to Polycom RMX 4000 MCU for Video Conferencing and Telepresence:

In txtXML text box we will put the XML for login to MCU. After execution we will get the response as xml in txtResponse.


Private Sub btnPost_Click(sender As Object, e As EventArgs) Handles btnPost.Click
        Dim req As System.Net.WebRequest = Nothing
        Dim rsp As System.Net.WebResponse = Nothing

txtXML.Text =  "  <TRANS_MCU><!-- The root Is the transaction name. -->" &
        "<TRANS_COMMON_PARAMS> " &
        "<MCU_TOKEN>0</MCU_TOKEN>" &
        "<MCU_USER_TOKEN>0</MCU_USER_TOKEN>" &
        "<MESSAGE_ID>1</MESSAGE_ID>" &
        "</TRANS_COMMON_PARAMS>" &
        "<!-- The next element Is the action (Login), And below it are the action's " &
        "parameters, in this case, the Login parameters. --> " &
        "<ACTION> " &
        "<LOGIN>" &
        "<!-- The next parameters are the MCU IP And the port number. -->" &
        "<MCU_IP>" &
        "<IP>10.1.253.119</IP>" &
        "<LISTEN_PORT>80</LISTEN_PORT>" &
        "<HOST_NAME/>" &
        "</MCU_IP>" &
        "<!-- The user And password strings.-->" &
        "<USER_NAME>PMC</USER_NAME>" &
        "<PASSWORD>PMC</PASSWORD>" &
        "<STATION_NAME>EMA.F3-JUDITHS</STATION_NAME>" &
        "<COMPRESSION>false</COMPRESSION>" &
        "</LOGIN>" &
        "</ACTION>" &
        "</TRANS_MCU>"

 Dim uri As String = "http://10.1.253.119"
            req = System.Net.WebRequest.Create(uri)
            req.Method = "POST"
            req.ContentType = "text/xml"
            Dim writer As New System.IO.StreamWriter(req.GetRequestStream())
            writer.WriteLine(txtXML.Text)
            writer.Close()
            rsp = req.GetResponse()
  Dim sr As New System.IO.StreamReader(rsp.GetResponseStream(), System.Text.Encoding.[Default])
                Dim backstr As String = sr.ReadToEnd()
                txtResponse.Text = backstr



Here is the response received from above xml. You will get mcutoken to be used for further communication with MCU, which i have written in my other posts.



-- By
Vinod Kotiya


Comments