This blog is about developing Windows applications using Visual Studio. All postings on this weblog are provided "AS IS" with no warranties, and confer no rights. Use of any samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
Your host Nikola Dudar is a Program Manager in Windows division of Microsoft Corporation. He has been working on Windows Web Services API during Windows 7 and various additions to Visual C++ during VS2005 and VS2008. More details are in LinkedIn profile under Nikola's formal name Mykola Dudar.
If you are interested in program management and project management, check out my other blog at http://www.pmsnack.com/ where I collect best practices and other topics interesting to program and project managers.
To send feedback, comments or requests for new posts, please use the contact form.
I have uploaded the solution I have been using during MVP summit to demonstrate Windows Web Services API. This solution demonstrates three things:
You may download the solution from MSDN Code Gallery page located here. This sample has one solution with five projects.
WS_STRING url = WS_STRING_VALUE(L"http://localhost:8080/FastSortService");
WS_STRING url = WS_STRING_VALUE(L"http://localhost:8080/SortService");
To build this demo, you need to have Visual Studio 2008 SP1 with Windows SDK for Windows 7 installed on your computer. You can build it from Visual Studio or using command line script in the root folder of the demo. To build 32 bit version, run build_demo_x86.cmd. To build 64-bit version, run build_demo_x64.cmd.
To run this demo, you need to prepare your machine to run WCF samples using One-Time Set Up Procedure for WCF Samples. After you are done with this, you may start the demo using either launch_demo_x86.cmd or launch_demo_x64. Here what you should expect after you launch the demo:
Sort Client built using WCF is up and running Please enter the path to the file: small.txt
Sort Client built using WCF is up and running
Please enter the path to the file: small.txt
>launch_demo_x86.cmd Sort Client built using WCF is up and running Please enter the path to the file: small.txt Type the number of the sort algorithm to use: 0- Insertion Sort 1- Quick Sort 2- Both Your Choice >> 2 Insertion Sort Total Time: 00:00:00.2808018 Quick Sort Total Time: 00:00:01.2480080
>launch_demo_x86.cmd
Type the number of the sort algorithm to use:
0- Insertion Sort
1- Quick Sort
2- Both
Your Choice >> 2
Insertion Sort Total Time: 00:00:00.2808018
Quick Sort Total Time: 00:00:01.2480080
Sort Service Client built using WWSAPI is running... Please enter the path to the file: small.txt
Sort Service Client built using WWSAPI is running...
Sort Service Client built using WWSAPI is running... Please enter the path to the file: small.txt Type the number of the sort algorithm to use: 0- Insertion Sort 1- Quick Sort 2- Both Your Choice >> 2 Insertion Sort Total Time: 0.437 seconds Quick Sort Total Time: 0.312 seconds
Insertion Sort Total Time: 0.437 seconds
Quick Sort Total Time: 0.312 seconds
Please note that this sample is provided solely to demonstrate a possible use of the API. It is not meant to be a production quality code. It is provided are provided "AS IS" with no warranties, and confer no rights. Use of this sample is a subject to the terms specified at http://www.microsoft.com/ info/cpyright.htm. If you have any questions or comments on the demo, please send me your feedback.
The Windows Web Services API (WWSAPI) is a new "minimalist" web services endpoint library available on
Could you provide a quick example of how to read generic SOAP fault?
How can I set tracing level? There is WS_TRACE_API enum, but how it's used?
Hi Chabster,
I will put together a quick sample of reading SOAP fault and brief explanation on enabling tracing.
Thanks,
Nikola
With all the talk about Windows 7 on the client, we haven’t talked much about the server platform that
Thanks everyone for attending the session on building web services in C++ code during TechEd 2009! I
On this page, you can find links to all resources available for connecting C and C++ code and web services.
Hi,
I have a WCF service which has exposed events.
public interface IMyEvents
{
[OperationContract(IsOneWay = true)]
void ClientDisconnect(User user);
}
I am tring to create a C++ proxy for this WCF service using WsUtil.exe. While doing so I am getting an error message as
"There is no input binding information for operation 'ClientDisconnect'.
As a result no files are generated"
Please let me know if we can generate proxy for WCF services with events exposed, if so some sample code shold be of great help. Please provide me the information as soon as possible.
When attempting to build on VS2008 Express edition, i get an error WS_NON_RPC_LITERNAL_OPERATION : undeclared identifier.
I am unable to find this identifier anywhere on the net.
To Nithy:
In Win7 version of the WWS, the dual sessions are not supported using the Service Model level of APIs. We have built a sample for this scenario using the channel layer of the APIs. And I about to finish it up and publish it.
To Si1ver1ock,
This error is most likely caused by wrong version of Windows 7 SDK integrated with the VC++ Express. Make sure you have the final RTM version of Windows SDK.
I'm having the same problem of Si1ver1ock, but I'm testing under Win7 + VS2010beta2. I'll try install the final RTM version of WinSDK over the one come with VS10b2.
WS_NON_RPC_LITERNAL_OPERATION is misspelled!! Replace it with:
WS_NON_RPC_LITERAL_OPERATION
To NikolaD,
After replacing misspelled WS_NON_RPC_LITERNAL_OPERATION to WS_NON_RPC_LITERAL_OPERATION, VC was able to compile past the 'undeclared identifier". Now I am getting the following error:
fatal error C1311: COFF format cannot statically initialize '_sortservice_wsdlLocalDefinitions' with 2 byte(s) of an address
Can you help me on this issue?
Thank.
Bizhan
Downloading the Release Candidate (RC) version solved the compile issue (COFF format...) as posted previously. When I run the demo using launch_demo_x86.cmd, I get the following error:
"This application has failed to start because webservice.dll was not found."
Can anyone help?
-Bizhan