Hi Rolf,
Is your Web service running on your local machine? If so, localhost is correct. However, that won't work when you have to roll it out to a server that you want other people to access.
Why do you need to write code? Just use the Data Connection wizard to add the parameter based on the field in your form.
Patrick Halstead
Project Manager at Qdabra