none
How to add web reference in c++ vs 2010 RRS feed

  • Question

  • We are going to used WSDL web services. But vs 2010 not any option to add web reference or add web service reference. Could you tell me that how to add each WSDL web service.
    Wednesday, April 11, 2012 2:49 AM

Answers

  • That's because it is not supported in the same way as in C#.

    If you want to connect a native C++ app to web services (that is, WPF) then you need to use WWSAPI.

    You can find a nice intro to some reading here.

    Frankly, I think if your application needs to use web services, you should seriously consider sticking with C# as your platform, and confine the code that is best suited to C++ in a separate DLL. Any reason why this design won't work for you?
    • Edited by Brian Muth Wednesday, April 11, 2012 3:31 AM
    • Proposed as answer by Helen Zhao Friday, April 13, 2012 8:46 AM
    • Marked as answer by Helen Zhao Wednesday, April 18, 2012 2:02 AM
    Wednesday, April 11, 2012 3:30 AM
  • The add reference wizard calls sproxy.exe on the WSDL I think. You can download sproxy.exe from atlserver.codeplex.com and call it in a pre-build step.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    • Marked as answer by Helen Zhao Wednesday, April 18, 2012 2:02 AM
    Wednesday, April 11, 2012 4:55 PM

All replies

  • That's because it is not supported in the same way as in C#.

    If you want to connect a native C++ app to web services (that is, WPF) then you need to use WWSAPI.

    You can find a nice intro to some reading here.

    Frankly, I think if your application needs to use web services, you should seriously consider sticking with C# as your platform, and confine the code that is best suited to C++ in a separate DLL. Any reason why this design won't work for you?
    • Edited by Brian Muth Wednesday, April 11, 2012 3:31 AM
    • Proposed as answer by Helen Zhao Friday, April 13, 2012 8:46 AM
    • Marked as answer by Helen Zhao Wednesday, April 18, 2012 2:02 AM
    Wednesday, April 11, 2012 3:30 AM
  • The add reference wizard calls sproxy.exe on the WSDL I think. You can download sproxy.exe from atlserver.codeplex.com and call it in a pre-build step.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    • Marked as answer by Helen Zhao Wednesday, April 18, 2012 2:02 AM
    Wednesday, April 11, 2012 4:55 PM