Microsoft Developer Network > Forums Home > Windows Networking Development Forums > Windows Web Services API > Using Web Services API for restful web service client code
Ask a questionAsk a question
 

AnswerUsing Web Services API for restful web service client code

  • Thursday, October 15, 2009 4:37 PMjeffr2600 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I need to create a client for a RESTful web service using C++. Is the Web Services API a reasonable choice to implement such a client or is it designed more for building services on the server? Are there better alternatives?

    Thanks,
    Jeff

Answers

  • Thursday, October 15, 2009 11:48 PMNikola Dudar [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Jeff,

    The Windows Web Services were not built to support creation of clients for RESTful web services. With the WWS API you can create both clients and services that use SOAP for message format. What you can do is to use WinHTTP to send and receive HTTP messages to RESTful service and then either use an XML parser such as XMLlite or MSXML to parse the message or create your own parser if it is JSON or other non-XML based encodings of the message. Hope this helps.

    Thanks,
    Nikola
    Nikola Dudar is the Program Manager for Windows Web Services API team. This post is provided "AS IS" with no warranties, and confer no rights. Use of any samples is subject to the terms specified at http://www.microsoft.com/ info/cpyright.htm

All Replies

  • Thursday, October 15, 2009 11:48 PMNikola Dudar [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Jeff,

    The Windows Web Services were not built to support creation of clients for RESTful web services. With the WWS API you can create both clients and services that use SOAP for message format. What you can do is to use WinHTTP to send and receive HTTP messages to RESTful service and then either use an XML parser such as XMLlite or MSXML to parse the message or create your own parser if it is JSON or other non-XML based encodings of the message. Hope this helps.

    Thanks,
    Nikola
    Nikola Dudar is the Program Manager for Windows Web Services API team. This post is provided "AS IS" with no warranties, and confer no rights. Use of any samples is subject to the terms specified at http://www.microsoft.com/ info/cpyright.htm
  • Friday, October 16, 2009 12:14 AMjeffr2600 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Nikola,

    Thanks for pointing me back to WinHTTP. In my haste I thought I read that it was no longer available, but a more careful reading revealed that the statement only applied to version 5.0.

    Jeff