none
Include WebService xml documentation to other project. RRS feed

Answers

  • Hi Robert,

    I am not sure what you mean "include the webservice xml document into that project where I'm using the webservice" here. If you want to read an external XML file from WCF service, you can try the solution in this post, using XmlDocument class.

    var appPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
          XmlDocument xmlDoc = new XmlDocument();    
          string bodyFile = Path.Combine(appPath, @"StartInfo.xml");
          xmlDoc.Load(bodyFile);
          return xmlDoc.InnerXml;

    If you want something like creating a WCF service based on WSDL file, you can utilize svcutil.exe tool, find an example in this post.

    Best Regards.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, October 3, 2013 6:11 AM
    Moderator

All replies

  • Hi Robert,

    I involved WCF expert to further look at this issue. I am moving your thread into the Windows Communication Foundation, Serialization, and Networking Forum for dedicated support. Thanks for your understanding.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, October 3, 2013 5:39 AM
  • Hi Robert,

    I am not sure what you mean "include the webservice xml document into that project where I'm using the webservice" here. If you want to read an external XML file from WCF service, you can try the solution in this post, using XmlDocument class.

    var appPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
          XmlDocument xmlDoc = new XmlDocument();    
          string bodyFile = Path.Combine(appPath, @"StartInfo.xml");
          xmlDoc.Load(bodyFile);
          return xmlDoc.InnerXml;

    If you want something like creating a WCF service based on WSDL file, you can utilize svcutil.exe tool, find an example in this post.

    Best Regards.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, October 3, 2013 6:11 AM
    Moderator
  • Hello,

    Tank you for your answer.

    This is a function:

    /// <summary>
    ///  Get some string from webservice
    /// </summary>
    public string GetSomeString()
    {

          return "hi pal";

    }

    If I would like to use this function is C# VS2012,but I can't see the function's documentation...

    Thank you.

    Thursday, October 10, 2013 2:04 PM