Software factory automatic proxy generator gives unexpected result

Jan 23, 2009 at 7:44 PM
When generating a proxy for my test client project it adds another method for the operational service interface, so instead of calling my service like this:

ServiceClient client = new ServiceClient();
ServiceRequest req = new ServiceRequest();
ServiceResponse res = new ServiceResponse();
res = client.QueryService(req);

.. the proxy gives typically this:

res = client.QueryService(Response object as input, out ServiceRequest) : ServiceResponse

This is completely unuseful and total crap. I found a workaround to this by running the Host, adding the services as Service References to my Client project. This gives me valid proxies, but I would appreciate if someone knew why the proxygeneration does a lot of weird things.
Developer
Jan 24, 2009 at 5:11 PM
Did you look into the generated proxy and checked if you have the method definition that you pointed out "res = client.QueryService(req);"?
The proxy generator built in in VS that WSSF uses may generate both type of methods so you can use any of them.
Jan 26, 2009 at 6:25 AM
Looks like 2 methods are generated. There shouldn't be a problem deleting the one i don't want. The first method in the proxy is like expected, but the second one is requiring an out as a parameter (as in code-def. example above). Still confused why this should happen. Appreciate your quick response!
Developer
Jan 26, 2009 at 7:12 PM
These are two approaches that the code gen API gives you so you may use whichever you prefer. On the other hand, I will recommend not to remove any generated code since that may be overwritten after a new generation. Just use the method you wich and leave the rest as is.