Generating WCF Proxy Class with Proper Namespace

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:

No comments posted yet.

Your comment:






 
 
 
Please add 3 and 7 and type the answer here:
 

Live Comment Preview:

 
«August»
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456