我在报表中有一个XML数据源,指向我的C#web服务。我不知道如何正确地将一个字符串数组作为查询中的参数值传递给该数据源。带有字符串数组参数的XMLDP查询 - 报表生成器
<Query>
<Method Name="MyAwesomeMethod" Namespace="http://myawesomenamespace">
<Parameters>
<Parameter Name="regularParameter" Type="String">
<DefaultValue>a normal string value</DefaultValue>
</Parameter>
<Parameter Name="fields">
<DefaultValue><!-- what to put here? --></DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">*</ElementPath>
</Query>
在常规的SOAP请求,我想有以下几点:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mynamespace="http://myawesomenamespace">
<soapenv:Header/>
<soapenv:Body>
<mynamespace:MyAwesomeMethod>
<mynamespace:regularParameter>a normal string value</mynamespace:regularParameter>
<mynamespace:fields>
<mynamespace:string>value the first</mynamespace:string>
<mynamespace:string>value the second</mynamespace:string>
</mynamespace:fields>
</mynamespace:MyAwesomeMethod>
</soapenv:Body>
</soapenv:Envelope>
我的Web服务提供了一个样本SOAP 1.1请求:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<MyAwesomeMethod xmlns="http://myawesomenamespace">
<regularParameter>string</regularParameter>
<fields>
<string>string</string>
<string>string</string>
</fields>
</MyAwesomeMethod>
</soap:Body>
</soap:Envelope>
那么我将如何传递数组字符串作为XMLDP查询参数中的默认值?这与my other question有关,但不相同。