79212538

Date: 2024-11-21 18:43:36
Score: 0.5
Natty:
Report link

First problem is solved by Making password as XMLText and PasswordType as XMLAttribute inside Password Class, then it geenrated XML correctly. Still not getting Namespace of BSVC Inside Body Attributes:

public class UsernameToken
    {
        [XmlElement("Username")]
        public string Username { get; set; }

        [XmlElement("Password")]
        public PasswordData Password { get; set; }
    }

    public class PasswordData
    {
        [XmlText]
        public string Password { get; set; }

        [XmlAttribute("Type")]
        public string PasswordType { get; set; }
    }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Rita