Although I have no idea how I would call a web
service from within the InfoPath form.
This could, however, still result in problems if two users were to fill out
forms at the same time. They would both be given the same MAX ID. If I set this
after the form has been saved there is no chance of a duplicate.