I have created apex stub classes from a wsdl and invoked a external SOAP webservice from it. The response is an xml with attribute in elements. I need to extract the value (which is 'PPPPPP' when wd:type="Item_ID" in below xml
<wd:Sales_Item_Reference>
<wd:ID wd:type="WID">9d89472a929901c34895bc41a6259610</wd:ID>
<wd:ID wd:type="Item_ID">PPPPPP</wd:ID>
</wd:Sales_Item_Reference>
These are the corresponding stub class methods generated
//for Sales_Item_Reference
public class Sales_ItemObjectType {
public SOAPStub.Sales_ItemObjectIDType[] ID;
private transient String[] ID_type_info = new String[]{'ID',s_ns0,'Sales_ItemObjectIDType','0','-1','false'};
public String Descriptor;
public String[] Descriptor_att_info = new String[]{'Descriptor'};
private transient String[] apex_schema_type_info = new String[]{s_ns0,'true','false'};
private transient String[] field_order_type_info = new String[]{'ID'};
}
//For ID
public class Sales_ItemObjectIDType {
public String input;
private transient String[] input_type_info = new String[]{'input','http://www.w3.org/2001/XMLSchema','string','1','1','false'};
public String type_x;
public String[] type_x_att_info = new String[]{'type'};
private transient String[] apex_schema_type_info = new String[]{s_ns0,'true','false'};
private transient String[] field_order_type_info = new String[]{};
}
Sales_ItemObjectIDType.type_x gives me the attribute value 'Item_ID' but how do I retrieve the value 'PPPPPP'