The paper discusses XML security key technologies related with security of Web service. Based on these discussions, Web service is integrated with some mature security architectures such as PKI. A new Web service layer security model is proposed, and its characteristics are described. Finally, the paper focuses on the implementation of the security services sub-layer XKMS, and describes its design methodology, architecture and realization in detail. 1 Intrduction As defined by the World Wide Web Consortium, Web services are[1] : (1) identified by URIs’; (2) accessible via standard Web protocols; (3) Capable of sending, receiving, and acting on XML-based message; (4) Capable of interacting with applications and programs that are not directly human-driven user interface. So XML technology has become a basic architecture in Web applications. 2 Related XML Security Technology[ 2,3,4] Related XML security technology is as follows: (1) XML Signature. It provides a syntax for representing s...