UpdatePhone is Updating everything

Version 1
    This document was generated from CDN thread

    Created by: Simon Granger on 03-02-2012 10:12:41 AM
    When using the function UpdatePhoneReq, in the folloiwing code, it resets all the data back to defaults e.g calling search space.
     
    I am  only wanting to update 1 field on the phone, and that is it?
     
    Anyone spot what i am doing wrong??
     
     
       Function checkdevice(ByVal profilename As String, ByVal cmpubserver As String) As Boolean
            Dim mycmg As AXLAPIService
            Dim mypwd As String = System.Configuration.ConfigurationManager.AppSettings("ciscopwd").ToString()
            errortext = ""
            mycmg = New AXLAPIService(cmpubserver, "web_PhoneAdmin", mypwd)
            Dim req As GetPhoneReq = New GetPhoneReq
            Dim ureq As New UpdatePhoneReq
            Dim ures As StandardResponse
            Dim res As GetPhoneRes = New GetPhoneRes
            Dim vendconf As XVendorConfig = New XVendorConfig
            Dim rp As RPhone = New RPhone
            Dim fktype As XFkType = New XFkType
            req.ItemElementName = ItemChoiceType129.name
            req.Item = profilename
            rp.description = ""
            rp.name = ""
            rp.vendorConfig = vendconf
            rp.phoneTemplateName = fktype
            rp.securityProfileName = fktype
            rp.devicePoolName = fktype
            req.returnedTags = rp
            Try
                res = mycmg.getPhone(req)
            Catch ex As Exception
                errortext = errortext & "Device not found in CallManager.<BR>"
                Label1.Text = "The following errors have occurred:<BR>" & errortext
                Label1.ForeColor = Drawing.Color.Red
                Label1.Visible = True
                Return False
                Exit Function
            End Try
            Try
                Dim node As XmlNode
                vendconf = res.return.phone.vendorConfig
                For Each node In res.return.phone.vendorConfig.Any
                    If InStr(node.Name.ToLower, "video") Then
                        node.InnerText = 1
                    End If
                Next
                ' ureq.ItemElementNam()
                ureq.ItemElementName = ItemChoiceType32.uuid
                ureq.Item = res.return.phone.uuid
                ureq.vendorConfig = vendconf
                ureq.phoneTemplateName = res.return.phone.phoneTemplateName
                ureq.securityProfileName = res.return.phone.securityProfileName
                ureq.devicePoolName = res.return.phone.devicePoolName
                ures = mycmg.updatePhone(ureq)
                Return True
            Catch ex As Exception
                errortext = errortext & "Failed to enable video for device.<BR>"
                Label1.Text = "The following errors have occurred:<BR>" & errortext
                Label1.ForeColor = Drawing.Color.Red
                Label1.Visible = True
                Return False
                Exit Function
            End Try
            mycmg = Nothing