I'm trying to achieve the following. Receive messages from queue. Construct an XML Doc and invoke a webservice with the xml as parameter. When there some kind of exception during invoking the webservice, the messages should stay on the queue. In the situation the messages should be acknoledged.
It does not appear, at least from your description, that you are attempting to enlist any transactional resources from the webservice.
If this is the case then you can catch the exception raised by the call to the webservice and process it as you see fit. You can choose to rollback the transaction, in which case the message will be redelivered to your listener, or commit the transaction having explicitly redelivered it.
The incoming message will only be acknowledged if you commit the transaction. If you want the incoming message to be acknowledged, even when the webservice fails, then you should be resending the message and calling commit on the transaction.