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>" &
        "<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></IP>" &
        "<LISTEN_PORT>80</LISTEN_PORT>" &
        "<HOST_NAME/>" &
        "</MCU_IP>" &
        "<!-- The user And password strings.-->" &
        "<USER_NAME>PMC</USER_NAME>" &
        "<COMPRESSION>false</COMPRESSION>" &
        "</LOGIN>" &
        "</ACTION>" &

 Dim uri As String = ""
            req = System.Net.WebRequest.Create(uri)
            req.Method = "POST"
            req.ContentType = "text/xml"
            Dim writer As New System.IO.StreamWriter(req.GetRequestStream())
            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


Most Viewed Post

solution for facebook waiting

Connect Sony XPLOD MEX-BT2500 Bluetooth CD Receiver with ur mobile

Crystal Report : Show data horizontally (Left to right) i.e. columns as rows

Google+ Followers