How can I know where an xml flow definition file has a mistake?
Hi all,
after all my previous questions I have moved to the last stable webflow release. So I have had to change the xml beans configuration file, the xml flow configuration file, and the versions of the libraries.
When I try to run my example, I have the following error:
GRAVE: Servlet.service() para servlet order lanzó excepción
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{quot;schema/webflowquot;:attribute}' is expected.
This is my flow configuraton file:
Code:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt; lt;flow xmlns=quot;schema/webflowquot; xmlns:xsi=quot;2001/XMLSchema-instancequot; xsi:schemaLocation=quot; schema/webflow schema/webflow/spring-webflow-1.0.xsdquot;gt;
lt;start-state idref=quot;setupFormquot;/gt;
lt;action-state id=quot;setupFormquot;gt;
lt;action bean=quot;formActionquot;/gt;
lt;transition on=quot;successquot; to=quot;personalDetailsViewquot;/gt;
lt;/action-stategt;
lt;view-state id=quot;personalDetailsViewquot; view=quot;enterPersonalDetailsquot;gt;
lt;transition on=quot;submitquot; to=quot;bindAndValidatePersonalDetailsquot;/gt;
lt;/view-stategt;
lt;action-state id=quot;bindAndValidatePersonalDetailsquot;gt;
lt;action bean=quot;formActionquot; method=quot;bindAndValidatequot;gt;
lt;property name=quot;validatorMethodquot; value=quot;validatePersonalDetailsquot;/gt;
lt;/actiongt;
lt;transition on=quot;successquot; to=quot;testQuantityquot;/gt;
lt;transition on=quot;errorquot; to=quot;personalDetailsViewquot;/gt;
lt;/action-stategt;
lt;!-- Estado de decisión, bifurca el flujo de navegación dependiendo del valor del atributo quot;cancelledquot; --gt;
lt;decision-state id=quot;testQuantityquot;gt;
lt;if test=quot;${flowScope.order.cancelled}quot;
then=quot;orderDetailsViewquot;
else=quot;submissionSuccessquot;/gt;
lt;/decision-stategt;
lt;!-- Estado de vista de detalles de pedido o error en los detalles del pedido, dependiendo de dónde se venga --gt;
lt;view-state id=quot;orderDetailsViewquot; view=quot;enterOrderDetailsquot;gt;
lt;transition on=quot;buyquot; to=quot;bindAndValidateOrderDetailsquot;/gt;
lt;transition on=quot;toPersonalDetailsquot; to=quot;personalDetailsViewquot;/gt;
lt;/view-stategt;
lt;action-state id=quot;bindAndValidateOrderDetailsquot;gt;
lt;action bean=quot;formActionquot; method=quot;bindAndValidatequot;gt;
lt;property name=quot;validatorMethodquot; value=quot;validateOrderDetailsquot;/gt;
lt;/actiongt;
lt;transition on=quot;successquot; to=quot;submissionSuccessquot;/gt;
lt;transition on=quot;errorquot; to=quot;orderDetailsViewquot;/gt;
lt;/action-stategt;
lt;end-state id=quot;submissionSuccessquot; view=quot;orderCompletequot;/gt;
lt;/flowgt;
How can I know exactly where the problem is ?
The error message does not tell many things about it,
Thanks in advance,
Toñi
Normally your XML editor should help you spot errors like this in your flow definition. In your case the problem is the lt;propertygt; elements that you have. SWF 1.0 final uses lt;attributegt; instead. So change
lt;property name=quot;validatorMethodquot; value=quot;validatePersonalDetailsquot;/gt;
to
lt;attribute name=quot;validatorMethodquot; value=quot;validatePersonalDetailsquot;/gt;
Erwin |