Delphi WSDL标记属性作为属性

时间:2018-10-24 18:49:59

标签: xml delphi wsdl

这是SOAP响应的示例:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <MethodResponse>
            <return>
                <tag1>1</tag1>
                <tag2>2</tag2>
            </return>
            <return>
                <tag1>3</tag1>
                <tag2>4</tag2>
            </return>
        </MethodResponse>
    </S:Body>
</S:Envelope>

导入WSDL后,Delphi会生成一个类来表示每个标记返回,如下所示:

class returnObj = (TRemotable)
    tag1: integer;
    tag2: integer;
property
    // etc
end;

现在添加了一个tag3,而不是将其添加到tag2和tag1旁边,作为return的属性,如下所示:

<return tag3="description">

Delphi是否可以映射此tag3?

如果在tag2中添加了另一个,该怎么办?像这样:

<tag2 tag4="another description">

0 个答案:

没有答案
相关问题