Hi I have a WCF web serive which has an opeartion i need to call from a native C++ apllication. I have a bridge managed DLL which works, but I am having truoble with calling a WCF operation which has an OUT object.
The C# opearation:
void DoWork(string indxNum, out ErrorWarningsData objerrc)
Here ErrorWarningsData is a class in the C# Web Service.
This is how my Managed C++ code looks like :
gcroot<Binding^> binding1 = gcnew WSHttpBinding();
gcroot<EndpointAddress^> address1 = gcnew EndpointAddress(gcnew String("http://usatondevlas1.na.praxair.com/Build15/ResourceCenterSVC/ResourceCenter.svc"));
gcroot<HelloServiceClient::ServiceReference2::ResourceCenterServiceContractClient^> client = gcnew HelloServiceClient::ServiceReference2::ResourceCenterServiceContractClient(binding1,address1);
gcroot<HelloServiceClient::ServiceReference2::ErrorWarningsData^> objEWData = gcnew HelloServiceClient::ServiceReference2::ErrorWarningsData;
But when I try to call the DoWork Method from the WCF Service I get an error .
This is what I tried :
client->DoWork("4278779",[Out] objEWData );
Also tried,
client->DoWork("4278779",[Out] ^% objEWData );
And,
client->DoWork("4278779",[Out] % objEWData );
Could some one please tell me how to access the oject with 'OUT'. I could find some examples to access [Out] for int and string but none for objects
PS: I followed the following to link to connect the WCF service to the native appliaction [link]http://stackoverflow.com/questions/686452/create-wcf-service-for-unmanaged-c-clients