You need to sign in to do that
Don't have an account?
Bms270
Error: unexpected token: void
I am trying to generate Apex class from my WSDL file. WSDL gets parsed with no error but I get the following error in the last step of the process:
and the generated class at 240:16 is the start of the following function:
public void update(webservicesCommerce.Customer in0) { //line 240
webservicesCommerce.update_element request_x = new webservicesCommerce.update_element();
webservicesCommerce.updateResponse_element response_x;
request_x.in0 = in0;
Map<String, webservicesCommerce.updateResponse_element> response_map_x = new Map<String, webservicesCommerce.updateResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'',
'http://webservices.commerce.xxx.com',
'update',
'http://webservices.commerce.xxx.com',
'updateResponse',
'webservicesCommerce.updateResponse_element'}
);
response_x = response_map_x.get('response_x');
}
so what could be wrong here? does this mean that we cannot have void functions in Apex? I have more functions that they dont return anything. any Idea?
Message Edited by Bms270 on 09-29-2008 04:06 PM
The following generated class(es) have compilation errors:
Error: webservicesCommerce
Error: unexpected token: void at 240:16
and the generated class at 240:16 is the start of the following function:
public void update(webservicesCommerce.Customer in0) { //line 240
webservicesCommerce.update_element request_x = new webservicesCommerce.update_element();
webservicesCommerce.updateResponse_element response_x;
request_x.in0 = in0;
Map<String, webservicesCommerce.updateResponse_element> response_map_x = new Map<String, webservicesCommerce.updateResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'',
'http://webservices.commerce.xxx.com',
'update',
'http://webservices.commerce.xxx.com',
'updateResponse',
'webservicesCommerce.updateResponse_element'}
);
response_x = response_map_x.get('response_x');
}
so what could be wrong here? does this mean that we cannot have void functions in Apex? I have more functions that they dont return anything. any Idea?
Message Edited by Bms270 on 09-29-2008 04:06 PM
Bms270
I Figured it out myself! the word "update" for function name is a reserved word, and esdl generator does not rename it. so becareful of these reserved words.