Hi,
I'm currently working on developing support for the External
Communications module of the SCXML specification for scxml-js, and I'm a
bit confused about Appendix H Basic HTTP Event I/O Processor
<http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor>. It seems like
there may be a contradiction between H.2 Receiving Events, and H.3
Sending Events.
My interpretation of H.2 is as follows:
1. The entire SCXML message would go in _content parameter of the
HTTP POST data.
2. Other parameters in the HTTP POST are platform specific.
Whereas H.3 seems to say that:
1. Each individual variable name in the namelist attribute on the
send element, or each individual param child, would be assigned
its own HTTP POST parameter.
2. The HTTP POST parameter "_content" would only be used if the
<content> element is present in the send.
So, to use G.1, Example 1 as an example, my understanding of H.2 would
seem to imply that the following would be body of the POST from the
sender (although it would need to be url-encoded):
_content=<scxml:message xmlns:scxml="http://www.w3.org/2005/07/scxml"
version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2005/07/scxml
scxml-message.xsd"
source="http://scxml-processors.example.com/session1"
sourcetype="scxml"
target="http://scxml-processors.example.com/session2" type="scxml"
sendid="send-123" name="email.send">
<scxml:payload>
<scxml:property name="email">mailto:recipi...@example.com</scxml:property>
<scxml:property
name="content">http://www.example.com/mycontent.txt</scxml:property>
<scxml:property name="xmlcontent">
<scxml:hint>Email headers</scxml:hint>
<headers xmlns="http://www.example.com/headers">
<cc>arch...@example.com</cc>
<subject>Example email</subject>
</headers>
</scxml:property>
</scxml:payload>
</scxml:message>
Whereas H.3 would seem to imply that the following would be in the body
of the POST:
email=mailto:recipi...@example.com&
content=http://www.example.com/mycontent.txt&
xmlcontent=<headers xmlns="http://www.example.com/headers">
<cc>arch...@example.com</cc>
<subject>Example email</subject>
</headers>
It's not clear to me where the rest of the SCXML message would go in H.3
I'd appreciate it if you could please let me know which of these is the
correct interpretation. Thanks,
Jake