Re: Sony Soundbar and Receiver???
It may depend on information you didn't tell us. For example, if you are using a satellite or cable receiver then you should be able to run the HDMI cable from the satellite or cable receiver to the sound bar and another HDMI cable from the sound bar to the TV. Then assuming you have the audio return channel capabilities in the HDTV, the audio for the sound bar could be controlled by the TV remote. Then the optical audio could connect the surround receiver.
But since you didn't specify the particular model of the HDTV and the particular sound bar and how your TV service is received, there could be many other possibilities. The short answer is yes you can run them both, the how is going to be dependent on additional details.