Link to home
Start Free TrialLog in
Avatar of Compmind
Compmind

asked on

How to assign a value of a custom ArrayOfString?

I am using NetBeans IDE 6.1 and I am creating a Web Service Client using the code autogeneration capabilities of NetBeans I am having a problem assigning a value to an ArrayOfString object. This is the code.

com.ca.unicenterserviceplus.servicedesk.ArrayOfString attributes = null;

How would I assign a value to this object?

Thanks in advance
public static String getUserID(String miRefNum)
  {        try {
             java.lang.Integer sid = 0;
             java.lang.String objectType = "cr";
             java.lang.String whereClause = "";
             java.lang.Integer maxRows = 1;
             com.ca.unicenterserviceplus.servicedesk.ArrayOfString attributes = null;
                com.ca.unicenterserviceplus.servicedesk.USDWebService service = new com.ca.unicenterserviceplus.servicedesk.USDWebService();
   com.ca.unicenterserviceplus.servicedesk.USDWebServiceSoap port = service.getUSDWebServiceSoap();
      // TODO process result here
   java.lang.String result = port.doSelect(sid, objectType, whereClause, maxRows, attributes);
   System.out.println("Result = "+result);
        } catch (Exception ex) {
             ex.printStackTrace();
        }
 
      return "";
  }

Open in new window

Avatar of wwnosal
wwnosal

I don't know what it is but I would try calling constructor i.e:
 com.ca.unicenterserviceplus.servicedesk.ArrayOfString attributes = new com.ca.unicenterserviceplus.servicedesk.ArrayOfString (?????);


in place of ??? there might be some parameter.. You would need to look it up in documentation for this class..

Avatar of Compmind

ASKER

I don't know in which documentation to look since this code was generated by NetBeans
Ok I'll have look in the evening at home since I don't have Netbeans here..
ASKER CERTIFIED SOLUTION
Avatar of wwnosal
wwnosal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks! I never would have figured to use getString for assigning values.