Here is a paraphrased version of an issue I posted in the Netsuite support forum (note that I had moved to writing the code directly in Java since most of the sample code in the documentation is in Java, and I wanted to ensure my problems were not ColdFusion-specific). If you have any ideas, I'm all ears, but if I find or am given a solution, I will be certain to post it here.
I'm trying to write what I thought would be a simple search that will return all of the subcustomers of a given customer. I'm trying to get my feet wet with the following Java sample code from page 91 of the Platform Guide. I'm using the 2.0 wsdl, and the Platform Guide document I'm reading also says it's for 2.0.
RecordRef[] rr = new RecordRef[] {new RecordRef("1", Recordtype.customer), new RecordRef("2", RecordType.customer), new RecordRef("3", RecordType.customer)};
CustomerSearchBasic customerSearchBasic = new CustomerSearchBasic();
customerSearchBasic.setInternalId(new SearchMultiSelectField(rr, SearchMultiSelectFieldOperator.anyOf));When I try to run this code, it complains about my trying to pass a SearchMultiSelectField object to the setInternalId method. Looking at the java source generated by Axis 1.2 wsdl2java, it does look like the setInternalId method for CustomerSearchBasic is supposed to accept a SearchMultiSelectField object as a parameter. Here is the code snippet from the generated CustomerSearchBasic.java file:
public void setInternalId(com.netsuite.webservices.platform.core_2_0.SearchMultiSelectField internalId) {
this.internalId = internalId;
}
However, I became suspicious and found some code to retrieve the list of available methods and parameter types from the CustomerSearchBasic object. It appeared that the setInternalId parameter actually is expecting an array of RecordRef objects.
So I compiled and ran the following. No errors!
RecordRef[] rr = new RecordRef[] {new RecordRef("1", Recordtype.customer), new RecordRef("2", RecordType.customer), new RecordRef("3", RecordType.customer)};
CustomerSearchBasic customerSearchBasic = new CustomerSearchBasic();
customerSearchBasic.setInternalId(rr);Am I missing something? Is it possible I'm somehow referencing an old java class from the 1.3.2 wsdl?
