Could you please clarify: is x a vector as well? Is the sum of data vector w in some way naturally constrained (eg to 1 because they are normalised weights)?
Most likely you will have to work with a simplex vector and use that as a power to a function of w and some auxiliary variable x_aux. Happy to help and think more about this, but please clarify first.
See also (remotely related): Soft constraining a product of parameters (pushforward distribution) with a prior when there are also priors for individual parameters - #5 by LucC
Edit corrected hyperlink