I have Visual C++ application that needs to communicate with a ASP.NET web service. Specifically, the app needs to pass structured data (e.g. objects that contain lists of structures, etc) as a parameter to one of the service methods.
The C++ application is already generating an xml document that contains this data. The document is generating using an xml library, so it should always well-formed.
What is a good method for passing this data to the web service? I'm thinking about passing the document to the web service as a string parameter, then deserializing to a .NET object based on an xsd. But, I hear that passing an xml doc as a string parameter is not recommended.
So, my questions:
What are the pitfalls associated with sending the document as a string parameter, assuming that the document itself is always well-formed?
Assuming the above is a bad idea, what are some good alternate approaches?