c# - Create controls based on properties of wcf service -


I need to start the project based on C #, web or windows so that I can test our WCF services. As we have a lot of WCF projects, I tried to normalize this idea because otherwise I might have to write a few hundred small tools. For my personal experience, generic is important in my opinion, to make the control on the basis of parameters.

Let's get a form localhost / client / getclientdetail.svc I can put in .

GetClientDetail method is needed for the following parameters:

  string clientname of gender gender iactive   

me It looks like if the control on my form / ASPX page can be dynamically generated:

  string = textbox enum = dropdown bool = checkbox   

Can you tell me in the right direction or about an online example? I know the Windows device that can do this, but I want to do something like this, but on my own. The reason for this is that if I have a file, I have to upload it to the service, then I would know that the parameter is byte and I have my own user control. I have my own form, browse the button to select the file. Any help would be appreciated.

Have you official WCF test client ? If I miss the right, it also automatically shows when you run the WCF service project in debug, and it does exactly what you need.

View this MSDN page:


Edit because WcfTestClient is insufficient

You can test Microsoft To see how the tool works, a reflection tool (eg I started looking around and found Microsoft.Tools.TestClient.Workspace.AddServiceProject (...) Is:

  var serviceAnalyzer = new ServiceAnalyzer (); var serviceProject = serviceAnalyzer.AnalyzeService (endpoint, addServiceWorker, start progress, progress range, outside error);   

Where endpoint is a string that includes the service endpoint URI once inside service analyzer make things interesting and the scope for a simple SO answer . This will be a good place to start looking for ways to make your test equipment.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -