You need to sign in to do that
Don't have an account?
java.io.IOException: No serializer found
In my servlet, login is working, but when I run a query I get the following:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: No serializer found for class com.sforce.soap.enterprise._SessionHeader in registry org.apache.axis.encoding.TypeMappingImpl@13c550f
Here is the query code:
QueryResult qr = null;
//call the query saving the results in qr
try {
qr = binding.query("select Name, numberOfEmployees, Id, Industry from Account");
} catch (Exception e) {
e.printStackTrace();
return;
}
//always a good idea
if (qr != null) {
records = qr.getRecords();
//we can loop through the returned records
for (int i=0;i<records.length;i++) {
//Because we asked for accounts we will convert
//the SObject for each record into an Account object
Account account = (Account)records[i];
//Now we can access any of the fields we had in the query
//select clause directly from the account variable
System.out.print(new Integer(i+1).toString() + ". ");
System.out.print(account.getName() + " - ");
System.out.println(account.getId().getValue());
}
System.out.println("");
}
Nevermind. This was a problem with the way JbuilderX was running Axis. Problem went away when I ran wsdl2java from the command line to generate my classes.