Click here to Skip to main content
15,941,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

This may contain a number of questions.

I have a web service which exposes three methods.

1. Gets a token when you enter your credentials (let us call it GetToken)

2. Gets an Xml when you enter a specific number (GetXML)

3. Validates the specific number(ValidateNum)

I have been asked to design a solution which exposes a WCF Service which works as a wrapper for the above Web Service.

The wrapper should be easy to change with most settings in the web.config.

Can this be done without generating proxy classes?

If so, can I get some sample code?
ZurdoDev 28-Aug-13 13:14pm    
I don't quite follow the requirements. Creating a wrapper is easy, just expose the same methods and then call them in your wrapper. But what settings do you want easy to change? That is the purpose of WCF if you are talking about how to connect to it. You can configure that in XML.
getbacktosrinu 28-Aug-13 14:49pm    
i have already created what you have mentioned. They are not satisfied with that. I will try to make my requirements clearer.

The settings that I want specifically are:
1. the request to the web service should be a standard format with only a few variables that i can change easily in the web.config
2. the response should also be similar.
3. all settings like XPath(used to find specific nodes in the GetXml method), url(of the web service), soapActions(methods in the web service) should be in the web.config

Also can I use a web service without creating proxy classes (without adding a web reference)?
ZurdoDev 28-Aug-13 14:55pm    
1. So what is the problem with that?
2. What's your question? Where are you stuck?
3. So put them in the web.config and read from there. Where are you stuck?
4. Yes, you can use the WebRequest class.
Nissim Salomon 29-Aug-13 9:53am    
Hi What did you mean you want to expose the old W.S WebMethods as WCF OperationalContract ?
2.what is proxy classes is it the current client generated proxy classes ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900