You did not specify the technology, therefore, assuming you have not configured the equivalent of the .NET NameSpace Manager or similar, you can use the namespace agnostic Xpath as follows:
/*[local-name()='Envelope']/*[local-name()='Header']
/*[local-name()='ReplyTo']/*[local-name()='ReferenceParameters']
/*[local-name()='ServiceGroupId']/text()
Change Updated for Java
XPathFactory factory = XPathFactory.newInstance();
XPath xpath = factory.newXPath();
XPathExpression expression = xpath.compile("/*[local-name()='Envelope']/*[local-name()='Header']/*[local-name()='ReplyTo']/*[local-name()='ReferenceParameters']/*[local-name()='ServiceGroupId']/text()");
System.out.println(expression.evaluate(myXml));
NamespaceContext
NamespaceContext context = new NamespaceContextMap(
"soapenv", "http://schemas.xmlsoap.org/soap/envelope/",
"wsa", "http://www.w3.org/2005/08/addressing",
"axis2", "http://ws.apache.org/namespaces/axis2");
XPathFactory factory = XPathFactory.newInstance();
XPath xpath = factory.newXPath();
xpath.setNamespaceContext(context);
XPathExpression expression = xpath.compile("/soapenv:Envelope/soapenv:Header/wsa:ReplyTo/wsa:ReferenceParameters/axis2:ServiceGroupId/text()");
System.out.println(expression.evaluate(myXml));
local-name() .
, encoding XML- .
Edit
, urn:uuid: , XPath 9 ( XPath). urn:uuid , tokenize/split .., .
substring(string(/*[local-name()='Envelope']/*[local-name()='Header']
/*[local-name()='ReplyTo']/*[local-name()='ReferenceParameters']
/*[local-name()='ServiceGroupId']/text()), 10)