Generating WCF Proxy Class with Proper Namespace


kick it on DotNetKicks.com

Since I wanted to move my generated proxy class generated by svcUtil to a separate C# Class Library project I ran into another problem after I figured out how to generate the collection type I wanted.  The problem I ran into was the namespace wasn't correct.  At first there wasn't a namespace.  I knew there was a namespace switch in the svcUtil.exe but the lack of documentation on it and examples left me scratching my head a few times.  Why people don't include examples of every single switch is beyond me.  I guess I am too much of an educator to understand why simple things like that go undocumented. 

The namespace declared for the data contract in the WSDL was something like http://My.Namespace/ and  I wanted it to map to My.Proxy.  Here is the switch for svcUtil that gave me what I wanted.

svcUtil /n:http://My.Namespace/,My.Proxy

Of course combine this with the post from yesterday where I mapped the collection type of List<> and we are on our way to creating a pretty good proxy for the service. 

posted @ Thursday, August 16, 2007 10:45 AM

Print

Comments on this entry:

# re: Generating WCF Proxy Class with Proper Namespace

Left by Sabry at 4/14/2009 8:06 AM
Gravatar

Thanks for the info that you posted here. I found it useful and it saved me tearing my hari out trying to get the namespace into the proxy.

thanks again

Sabry

Comments have been closed on this topic.
«September»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789