code: public static String getRewrittenPublishedEndpointUrl(String wsdlAddress, String epAddress, SOAPAddressRewriteMetadata sarm) {
        if (wsdlAddress == null) {
           return null;
        }
        if (isRewriteRequired(sarm, wsdlAddress))
        {
           final String origUriScheme = getUriScheme(wsdlAddress); //will be https if the user wants a https address in the wsdl
           final String newUriScheme = getUriScheme(epAddress); //will be https if the user set confidential transport for the endpoint
           return rewriteSoapAddress(sarm, wsdlAddress, epAddress, rewriteUriScheme(sarm, origUriScheme, newUriScheme));
        }
        else
        {
           return wsdlAddress;
        }
     }
docs: Rewrite and get address to be used for CXF published endpoint url prop (rewritten wsdl address)
  
  @param wsdlAddress    The soap:address in the wsdl
  @param epAddress      The address that has been computed for the endpoint
  @param sarm           The deployment SOAPAddressRewriteMetadata
  @return               The rewritten soap:address to be used in the wsdl