Forum Discussion

Mark_Canup_6238's avatar
Mark_Canup_6238
Icon for Nimbostratus rankNimbostratus
Mar 14, 2005

WSDL - Common conflicts

I've got a ASP.NET application in C that is using WSDL files for 9.x and 4.x interfaces.

 

 

I'm using several different WSDL files in this application, but many of them has their own definition of things like CommonIPPortDefinition and LocalLBObjectStatus with the same name. This results in naming conflicts so that I get errors like CS1595: 'LocalLBObjectStatus' is defined in multiple places; using definition from 'c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\256c5bba\6e9575ca\assembly\dl2\46847877\4ba039a3_7827c501\LocalLBPool.dll'

 

 

I tried renaming some of the definitions with name conflicts to something else in the .cs file produced by wsdl.exe before compiling it (e.g., LocalLBObjectStatus in the pool class became LocalLBPoolObjectStatus), and then referencing the new name as appropriate in my code. This works, but I figure there's got to be a better way to do this.

 

 

Any ideas?

1 Reply

  • The reason we did this was so that a user could use any wsdl file without dealing with wsdl includes (which at the time of our initial design were not standard yet).

     

     

    The best way to work around this is to specify a namespace with the wsdl.exe command. Accessing by web reference automatically does this but the command line doesn't. So for LocalLB.VirtualServer.wsdl do something like the following

     

     

    wsdl.exe /namespace:LocalLBVirtualServer LocalLB.VirtualServer.wsdl

     

     

    Do the same for the rest of the WSDL files you are working with and then each of the interfaces will be uniquely defined.

     

     

    -Joe