summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Message.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-11-07 22:20:09 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-11-07 22:20:09 (GMT)
commitda08a1d3c3bca8070c9b029cfc1f8faf9e34dd25 (patch)
treeb285148ab6ca415814d9370148f91736f83c852c /src/uscxml/Message.cpp
parent0ae6c27d9322208053033d9b19c0ffffed3d99eb (diff)
downloaduscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.zip
uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.gz
uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.bz2
Committing local version again
Diffstat (limited to 'src/uscxml/Message.cpp')
-rw-r--r--src/uscxml/Message.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/uscxml/Message.cpp b/src/uscxml/Message.cpp
index 9b713ca..1b2c9e8 100644
--- a/src/uscxml/Message.cpp
+++ b/src/uscxml/Message.cpp
@@ -1,3 +1,4 @@
+#include "uscxml/Common.h"
#include "uscxml/Message.h"
//#include "uscxml/Interpreter.h"
#include <DOM/SAX2DOM/SAX2DOM.hpp>
@@ -123,14 +124,18 @@ Arabica::DOM::Document<std::string> SendRequest::toDocument() {
Arabica::DOM::Node<std::string> payloadElem = scxmlMsg.getElementsByTagName("scxml:payload").item(0);
// add parameters
- std::map<std::string, std::string>::iterator paramIter = params.begin();
- while(paramIter != params.end()) {
- Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "scxml:property");
- propertyElem.setAttribute("name", paramIter->first);
- Arabica::DOM::Text<std::string> textElem = document.createTextNode(paramIter->second);
- propertyElem.appendChild(textElem);
- payloadElem.appendChild(propertyElem);
- paramIter++;
+ std::map<std::string, std::list<std::string> >::iterator paramsIter = params.begin();
+ while(paramsIter != params.end()) {
+ std::list<std::string>::iterator paramIter = paramsIter->second.begin();
+ while(paramIter != paramsIter->second.end()) {
+ Arabica::DOM::Element<std::string> propertyElem = document.createElementNS("http://www.w3.org/2005/07/scxml", "scxml:property");
+ propertyElem.setAttribute("name", paramsIter->first);
+ Arabica::DOM::Text<std::string> textElem = document.createTextNode(*paramIter);
+ propertyElem.appendChild(textElem);
+ payloadElem.appendChild(propertyElem);
+ paramIter++;
+ }
+ paramsIter++;
}
// add namelist elements
@@ -163,6 +168,7 @@ Arabica::DOM::Document<std::string> InvokeRequest::toDocument() {
}
Data Data::fromXML(const std::string& xmlString) {
+ return Data();
}
Event Event::fromXML(const std::string& xmlString) {
@@ -212,10 +218,12 @@ Event Event::fromXML(const std::string& xmlString) {
SendRequest SendRequest::fromXML(const std::string& xmlString) {
Event::fromXML(xmlString);
+ return SendRequest();
}
InvokeRequest InvokeRequest::fromXML(const std::string& xmlString) {
Event::fromXML(xmlString);
+ return InvokeRequest();
}
#ifndef SWIGJAVA