If I create a web service and the web service uses a desktop program that I bought to generate the output, will I violate the license of that program? the web service will be used by the clients. However using the web server will not expose all functions of the software I bought and which does the work in the background.
You're asking for a legal opinion on something that depends very much on the terms of the license agreement for the desktop software that you have bought. You need to read those terms (and maybe get legal advice ) to be sure.
That said, if you are not selling the software, it may be possible to do depending on whether or not the license agreement refers to any automation, and on whether or not your service effectively provides the full service of that software to the end user. It's not a cut and dry situation, so you aren't going to get a yes or no answer with any authority.