开发者

How I return multiple parameters using XML-RPC.NET?

开发者 https://www.devze.com 2023-03-26 18:10 出处:网络
I am implementing in ASP.NET custom server protocol in XML RPC due to specification. I use libraryXML-RPC.NET.

I am implementing in ASP.NET custom server protocol in XML RPC due to specification. I use library XML-RPC.NET.

I got stuck on one method, because the specification of the custom protocol says t开发者_StackOverflowhat the method X has two output parameters (integer and boolen). How can I do that using C# and XML-RPC.NET?


I answer my own question after long time. There are two possibilities.

  1. return special type XmlRpcStruct (http://xmlrpc.sourceforge.net/javadoc/redstone/xmlrpc/XmlRpcStruct.html)

  2. return Struct which have properties names like param names.


An XML-RPC response only has a single <param> return value. To return two values, as in your case, the return value would have to be a struct or array value.

0

精彩评论

暂无评论...
验证码 换一张
取 消