CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    VS2010 & native C++ Web service

    In VS2008 there was support for calling/consuming native C++ web services via atlsoap. In VS2010 this feature has been removed.
    atlsoap is pretty much dead, the project on codeplex isn't really being updated, it's missing a lot of features.

    With VS2011 having no built in support at all for C++ webs services... What's the current recommended way to go for this ?
    * The project(s) are Native C++ MFC, consisting of several extention DLL's and exe's using those.
    * WSDL based remote webservices (we don't own the webservices, we can't change them).
    * Some of our clients need to be able to connect through authenticating network proxy servers (which atlsoap didn't do, so it's an extra good excuse to not continue that road).
    * It needs to work on Windows XP, Vista, 7, 2008

    In short. How does one use/call/consume internet web services from C++ in VS2011 ?
    Last edited by OReubens; August 9th, 2011 at 10:14 AM.

  2. #2
    Join Date
    May 2000
    Location
    Armenia
    Posts
    201

    Re: VS2010 & native C++ Web service

    Let me share 3 ways to use web services from C++ known to me:

    1. Windows Web Services API. Also there is an article available. The problem is that WWSAPI is available only starting from Windows 7.

    2. Using third party open source libraries, such as gSOAP.

    3. Implement SOAP request/response processing manually, i.e. generate SOAP request XML based on specific service your application supports (it depends on WSDL) and send it over HTTP or HTTPS protocols. Also the handling of response is needed. An XML parser can be used for that (MSXML can be considered for Windows platforms).
    We use this approach in one of our projects for simple Web Service support (the Web service itself WSDL doesn't change frequently). This 3-rd way is rather a workaround, than a solution, but sometimes it can be used.

    Regards,
    Armen.

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: VS2010 & native C++ Web service

    The fourth approach could be implementing managed C++ Web Client. Wsdl tool is able to generate a client class for C++, see help for /language.


    /language:<language>
    The language to use for the generated proxy class. Choose from 'CS',
    'VB', 'JS', 'VJS', 'CPP' or provide a fully-qualified name for a class
    implementing System.CodeDom.Compiler.CodeDomProvider. The default
    language is 'CS' (CSharp). Short form is '/l:'.
    Or make it C# module.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured