Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have two classes, WebServiceRequest and OrderRequest. Each class has properties. OrderRequest inherits from WebServiceRequest - like so:

    public class WebServiceRequest
    {
        private string mAuthenticationToken;

        public string AuthenticationToken
        {
            get { return mAuthenticationToken; }
            set { mAuthenticationToken = value; }
        }
        ...
}

public class OrderRequest : WebServiceRequest
{

    private string mVendorId;
    public string VendorId
    {
        get { return mVendorId; }
        set { mVendorId = value; }
    }
    ...
}

OrderRequest is exposed via a WebMethod. When viewing the WSDL of the ASMX file that exposes OrderRequest (i.e. MyWebService.asmx?WSDL), both properties are visible - as they should be. However, when you view the SOAP Sample for the Web Method that exposes OrderRequest, only the VendorId property is visible, and not the inherited AuthenticationToken property. What's the deal?

Note: I've posted this issue as a bug on MS Connect: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=520200

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
300 views
Welcome To Ask or Share your Answers For Others

1 Answer

I managed to stumble back-asswords into the solution for my problem, even after Microsoft confirmed it as a bug (https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=520200) and I had given up and marked John's answer as accepted. Here's the solution:

http://code.msdn.microsoft.com/WsdlHelpGenerator/Release/ProjectReleases.aspx?ReleaseId=412

Go there, download the file, then add the following line under the system.web section of your Web.config file:

<webServices>
 <wsdlHelpGenerator href="CustomWsdlHelpGenerator.aspx"/>
</webServices>

The href property should point to the relative location of your file within your project. Thanks for your help John.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...