我正在尝试将 WSDL 导入 Salesforce,其中 XML 元素之一包含元素和字符串值,例如
<foo bar="bob">baz</foo>
当我使用 WSDL 到 Apex 工具将其导入时,字符串值在生成的类中不可用——只有属性。
这是 WSDL 片段:
<xs:complexType name="password">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="Type" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
生成的类是:
public class password {
public String Type_x;
private String[] Type_x_att_info = new String[]{'Type'};
private String[] apex_schema_type_info = new String[]{'http://schema.test.org/1_0','false','false'};
private String[] field_order_type_info = new String[]{};
}
有没有办法可以手动修改此类以提供没有内部元素的值?