I am consuming a web service where I consult an id parameter, and it returns a vehicle object that contains several attributes of type int
and string
, but the field date I returned it as date.
"this is in the database", what I need is to convert that attribute to string
to be able to print it by a form.
I followed what you told me and I get an error.
The method is this:
public static void main(String[] args) {
ServiciosVehiculosService AAA = new ServiciosVehiculosService();
ServiciosVehiculos BBB = AAA.getServiciosVehiculosPort();
ViewVEHICULOWEB XVARIABLEX = new ViewVEHICULOWEB();
XVARIABLEX.setPLACA("QYA456");
ViewVEHICULOWEB XXX = BBB.consultarViewVehiculoWeb(XVARIABLEX);
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
System.out.println(sdf.format(XXX.getFECHAREG()));
}
And the error this:
Failed to execute goal org.codehaus.mojo: exec-maven-plugin: 1.2.1: exec (default-cli) on project WebProject: Command execution failed. Process exited with an error: 1 (Exit value: 1) - > [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch Re-run Maven using the -X switch to enable full debug logging.