Sending a GUID via Nusoap to WCF
I am using Nusoap to call a WCF service. Prev开发者_运维知识库iously all the functions had "string" or "int", but this time we have Guid. Will it work? Do I need to do something special on either side? Certainly it is possible to have the call remapped so that it takes a string instead of a Guid, but what if I cannot do that?
On the NuSoap side it shouldn't matter if you use a string as long as the format of the string is a legal Guid format (e.g. 12345678-1234-1234-1234-1234567890AB
, 123456781234123412341234567890AB
, etc). On the WCF side it will be parsed into a strongly typed Guid, otherwise the message will be rejected.
Think about it this way, as the WCF service you don't care who's calling you as long as they are passing valid XML documents per your description. They could build the entire thing up using string concatenation or by loading files and replacing values in them, you don't know and shouldn't care. As long as the XML and values they pass you match the schema you've agreed on everything will "just work".
精彩评论