Find your content:

Search form

You are here

How are wsdl2apex generated private member variables referenced?


When generating apex code through a WSDL, several classes and member variables are generated. Each data type has its own class and the class has at least two private member variables associated with it. An example of a data type is below:

public class GaId {
    public String id;
    public String instance;
    private String[] id_att_info = new String[]{'id'};
    private String[] instance_att_info = new String[]{'instance'};
    private String[] apex_schema_type_info = new String[]{'','false','false'};
    private String[] field_order_type_info = new String[]{};

Note the private String [] member variables. Now, intuitively I look at this code and think the String arrays are useless, since they are private and have no methods in the class accessing them. However, if you change one or more of them, then the callouts are impacted or downright don't work.

So the question is, how are these private String [] variables called or referenced by the WebService callout?

Attribution to: James Loghry

Possible Suggestion/Solution #1

They aren't. They're for generating the SOAP messages associated with the calls. You don't need to worry about them, as the APEX runtime simply uses them to create the SOAP envelope and add the proper schema to the XML in the SOAP message in each call.

Attribution to: jordan.baucke
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content