iTunes will backup everything on the iPhone, including SMS messages and contacts.
In iTunes, with the iPhone selected on the left, click the Info tab and make sure Contact syncing is enabled.
Besides,there is a article about
How to transfer SMS from iPhone to computer, which can help you transfer SMS from iPhone.