Hi all,
Just wanted to report that using a custom action <something:send> for an
XML namespace different than SCXML's default causes trouble. Specifically,
having the backing Action class implement ExternalContent causes problems.
The <something:send> element matches just like it is a normal
<scxml:send> element and the Digester rules barf--
java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl
incompatible with org.apache.commons.scxml.model.ExternalContent^M
at
org.apache.commons.scxml.io.SCXMLDigester$ParseExternalContentRule.end(SCXMLDigester.java:1234)^M
at
org.apache.commons.digester.Digester.endElement(Digester.java:1130)^M
at
org.apache.commons.digester.NodeCreateRule$NodeBuilder.endElement(NodeCreateRule.java:195)^M
at
org.apache.commons.digester.Digester.endElement(Digester.java:1064)^M
at
org.apache.commons.digester.NodeCreateRule$NodeBuilder.endElement(NodeCreateRule.java:195)^M
at
org.apache.commons.digester.Digester.endElement(Digester.java:1064)^M
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)^M
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)^M
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)^M
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)^M
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)^M
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)^M
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)^M
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)^M
at org.apache.commons.digester.Digester.parse(Digester.java:1704)^M
at
org.apache.commons.scxml.io.SCXMLDigester.digest(SCXMLDigester.java:229)^M
...
The offending Digester trace looks like
Fire begin() for SetPropertiesRule[]^M
[SetPropertiesRule]{scxml/state/onentry/send} Set
com.ibm.SCRUBBED.SendAction properties^M
BeanUtils.populate([EMAIL PROTECTED];hasInitialized=false;externalNodes=[]],
{})^M
Fire begin() for SetNextRule[methodName=addAction, paramType=null]^M
Fire begin() for
[EMAIL PROTECTED]
Fire begin() for
[EMAIL PROTECTED]
endElement(http://www.ibm.com/schema/SCRUBBED/actions/v0_1,send,SCRUBBED:send)^M
match='scxml/state/onentry/send'^M
bodyText=''^M
Fire body() for
ObjectCreateRule[className=org.apache.commons.scxml.model.Send,
attributeName=null]^M
Fire body() for SetPropertiesRule[]^M
Fire body() for SetNextRule[methodName=addAction, paramType=null]^M
Fire body() for
[EMAIL PROTECTED]
Fire body() for
[EMAIL PROTECTED]
Fire body() for ObjectCreateRule[className=com.ibm.SCRUBBED.SendAction,
attributeName=null]^M
Fire body() for SetPropertiesRule[]^M
Fire body() for SetNextRule[methodName=addAction, paramType=null]^M
Fire body() for
[EMAIL PROTECTED]
Fire body() for
[EMAIL PROTECTED]
Popping body text '
'^M
Fire end() for
[EMAIL PROTECTED]
You can see where the org.apache.commons.scxml.model.Send class gets into
the mix. Not using 'send' as the localName of my custom action solved the
problem.
- Rhys
_______________________________________
Rhys Ulerich
WebSphere IMS/SIP SOA Enablement Developer
Email: [EMAIL PROTECTED] Office: 512-838-1428
IBM Software Group - Austin, TX