Hi,

this is .NET specific, but perhaps anybody can help.

I'm developping multiple Web Services with Axis. The methods return my
own type "CustomType" which is mapped to a WSDL complexType sequence,
and serialized by BeanSerializer.

When generating a proxy with .NET's wsdl.exe tool for *one* Web Service
everything works fine. .NET generates the CustomType class, in the same
.cs file as the web service proxy.

If I create proxies for *multiple* web services, the CustomType class
will be generated in *every* web service proxy .cs file. When compiling
with csc I get the following error: "error CS0101: The namespace ''
already contains a definition for 'CustomType'".

I see the following solutions:

a) Use the wsdl.exe /namespace argument to give every .cs file its own
namespace. Not very nice as the CustomType class is defined in multiple
namespaces...

b) Delete the CustomType definition from one of the .cs files.

The second option works fine, but ain't there a way to achieve this
without manual code change?

Can anybody help?

Arne

Reply via email to