Just few notes. I feel the solution of this problem is possible, but it's very hard or maybe not possible to do it in a portable way. If you use inline Assembly, it will be quite complex Assembly code, even in the case of inline Assembly where you can call any helper functions written in C++ from within Assembly code.
At this moment, I cannot imagine how it can be possible to do without Assembly, but using Assembly language will make a solution non-portable.
It hardly can be solved in few minutes or hours; in my estimate, it could take days.
This is what in terms if .NET is called
First of all, you need to know XML schema in full, and the interpretation of all of the keywords: all allowed types and parameter passing methods. You also need to know calling model (C, stdcall, etc.).
You will need some internal hash table which identify each type keyword and find the reference to some class/stucture which hold the description of each type: it's size and the method of the creation of the instance of this type by its value found in XML.
The code should get all parameters one by one, find the type property, create and initialize the instance (creating references/pointers as required by the parameter passing type) and put them on stack. Where you emit a call depends on calling model. Most likely, you will need separate implementations, at list the implementation for C calling model should be separate from others.
(For a record: I really doubt this architecture of RPC (in a way, what you describe can be considered as a kind of Remote Procedure Call) is good. It's hard to implements and can incur heavy reliability and portability problems. I think even the bloated and limited SOAP-based model is better. (I would say the good one is WCF.)
However, I can imagine this is something like a stroke of a genius which I simply did not understand.