help convert this SOAP request to Report Builder 2.0 query for XML data source

假装没事ソ 提交于 2019-12-07 03:07:38

The best I came up with was to change the web service's web method so it only takes simple parameters, then find some way of representing the complex object in a string and parsing that in the web method. Key-value pairs and regex, JSON strings, etc. This wouldn't work if I didn't have control over the web service's code, and it really seems like there ought to be a way of passing any kind of serializable parameter from Report Builder to an XML web service. If I can pass a parameter in a normal SOAP request, I should be able to pass the parameter via Report Builder's stupid Query syntax.

If it helps anyone else, for parsing comma-separated key-value pairs of the format key1=value1,key2=value2, I used new Regex(@"([^=,]*)=(""[^""]*""|[^,""]*)") and paramStr.Split(',').Select(pair => pair.Split('=')).ToDictionary(pair => pair[0], pair => pair[1]) to get an IDictionary<string, string> of parameters in my C# web service.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!