我的 .NET Web 服务中有一个 Web 方法的复杂参数,我想使用Report Builder 2.0 使用 SOAP查询该 Web 方法。使用soapUI,我得到了该 Web 方法的以下 SOAP 请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:qcr="MyNamespace">
<soapenv:Header/>
<soapenv:Body>
<qcr:MyWebMethod>
<qcr:MyComplexParameter><!--Represents a serializable class-->
<qcr:Action>?</qcr:Action><!--string-->
<qcr:ActionSortAscending>?</qcr:ActionSortAscending><!--Boolean-->
<qcr:ActionSortOrder>?</qcr:ActionSortOrder><!--int-->
</qcr:MyComplexParameter>
</qcr:MyWebMethod>
</soapenv:Body>
</soapenv:Envelope>
我之前使用过的唯一一种 Report Builder 2 查询是用于将字符串、整数或其他简单类型作为参数的 Web 方法。我将如何为此 SOAP 请求编写Report Builder 2 查询?
使用简单参数的 Web 方法的示例 Report Builder 2 查询:
<Query>
<Method Name="MyWebMethod" Namespace="MyNamespace">
<Parameters>
<Parameter Name="MyStringParameter"><DefaultValue>foo</DefaultValue></Parameter>
<Parameter Name="MyNumericParameter"><DefaultValue>3</DefaultValue></Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">MyWebMethodResponse {}/MyWebMethodResult {}/Result</ElementPath>
</Query>