Hiding Abstrected Class Structure in WSDL

A

Ashishthaps

I’m building a simple web service that has a few functions, each returning
simple data classes, structured similar to this:


public class ResultBase

{

public int StatusCode;

}



public class StatusResult :ResultBase

{

public string MyResult;

}



public class StatusReporter : System.Web.Services.WebService

{

public StatusResult CheckStatus(int machineID)

{

//do the status check

}

}



Now, I’m not using datasets or other MS specific things as the wsdl that
gets generated causes a lot of problems with non MS clients. We have people
using axis or curl or some other damn unix client with http posts. So,
we found that writing our own classes for that generates very clean and easy
to parse output xml.

The problem with the above code is that it generates the inherited
structures with it. So, it will generate ResultBase and the StatusResult with
a <base extend> tag around it. All I want generated is the StatusResult class
with StatusCode and MyResult as elements in it. I don’t want the end user to
have to deal with our class structures (even the proxy class that VS2003
generates from the wsdl is quite cumbersome for .net clients as it doesn’t
regenerate the original structures).

Is it possible to do this without rewriting DefaultWsdlHelpGenerator.aspx or
building another custom wsdl generator ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top