Error when creating a webservice class

[Migrated content. Thread originally posted on 12 March 2012]

We have problems with one of our tasks.
We are in a project to integrate to a webservice. There is written a proxy wrapper for us, to handle the communication with the webservice.
But we get an error when trying to create one of its classes, the runtime crashes. When dissecting the wrapper, it seems that this class is the client class for the webservice. This means that we are trying to create a object – a class – that really is a webservice class.
We are not very familiar with consuming webservice etc. and we are on a thin ice here...

When I write a small C# code to do the same, it is necessary to add a config file to the C# project. This config file (app.config) holds the information about the webservice adress, binding etc. We have the config file, but is it possible to refer to it when creating the class?

The short question is; is it possible to create a class in a dll component, that refers to a webservice class?
Is the problem the config file, and if so, how can we refer to it?
Or must we write a wrapper that completely is isolating us from the webservice?

Our code is like the one below. I have ripped out importent parts of our code.
When we execute the “create” verb described below, the runtime crashes.
The xml-file "tst.xml" of course referst to a xml-file describing the path to the actual dll-file.

Regards Dagl

copy "eDok.Def".
copy "eDokObject.Def".
77 hClient usage is handle.
NAMESPACE is "eDokWebserviceWrapper.eDokService"
CLASS-NAME is "EdokWebServiceClient"
file-path "C:\AcuGT910\AcuGT\bin\tst.xml"
(hHttp hEndp)
handle is hClient