我試圖將WSDL導入Salesforce,其中一個XML元素同時包含元素和字符串值,例如Salesforce WSDL import with simpleContent w/extension
<foo bar="bob">baz</foo>
當我導入此使用WSDL到頂點工具,該字符串值不是在生成的類可用 - 只是屬性。
這裏是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[]{};
}
有一種方法我可以手動修改這個類,以提供一個值,而無需內部元件?