try
UebXml := TXMLDocument.Create(nil);
UebXml.Active := True;
UebXml.Version := '1.0';
UebXml.Encoding := 'UTF-8';
UebXml.Options := UebXml.Options + [doNodeAutoIndent];
UebXml.DocumentElement := UebXml.CreateNode('soapenv:Envelope', ntElement, '');
UebXml.DocumentElement.Attributes['xmlns:soapenv'] := 'http://schemas.xmlsoap.org/
soap/envelope/';
UebXml.DocumentElement.Attributes['xmlns:wsse'] := 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd';
UebXml.DocumentElement.Attributes['xmlns:wsu'] := 'http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
lXmlNode := UebXml.DocumentElement.AddChild('soapenv:Header').AddChild('wsse:Security');
lXmlNode.Attributes['soapenv:mustUnderstand'] := '1';
// lXmlNode.Attributes['xmlns:wsse'] := 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-secext-1.0.xsd';
// lXmlNode.Attributes['xmlns:wsu'] := 'http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
lXmlNode := lXmlNode.AddChild('wsse:UsernameToken');
lXmlNode.Attributes['wsu:Id'] := 'UsernameToken-102';
lXmlNode.AddChild('wsse:Username').NodeValue := 'XXX';
lXmlNode := lXmlNode.AddChild('wsse:Password');
lXmlNode.Attributes['Type'] := 'http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText';
lXmlNode.NodeValue := 'XXX';
lXmlNode := UebXml.DocumentElement.AddChild('soapenv:Body').AddChild('pripsCheckAvailability');
SOAPRequest.Size := 0;
SOAPRequest.Position := 0;
UebXml.Active := True;
UebXml.Active := True;
UebXml.SaveToStream(SOAPRequest);
finally
if assigned(UebXml) then
begin
UebXml.Active := false;
UebXml := nil;
end;
end;