I'm been working on the use of metadata in api2 and have got it
working but the problem is that 1) all "s are removed when using JSON
(see below) or 2) all XML tags are removed when posting with XML.

I assume that this problem is linked to the following code in Message.scala

  lazy val metadata: String = originalXml \ "metadata" text

  lazy val metaData: String = {
    val org = originalXml

    (org \ "metadata").map(_.text).first
  }

Anyone have any idea what the problem is?

There is also a JIRA item for thsi:
https://issues.apache.org/jira/browse/ESME-242

D.


------------------------

curl -b headers -d "message=test70&metadata=<metadata>"
meta":[{"place":{"place_type":"city","region":"CA+"}},{"song":{"artist":"Prince"
,"songtitle":"Never+Let+Me+Down"}}]</metadata>" http://localhost:8080/api2/user/
messages

<?xml version="1.0" encoding="UTF-8"?>
<api><message>
  <id>47</id>
  <date>Wed, 7 Jul 2010 07:57:03 UTC</date>
  <source>api2</source>
  <body>test70</body>
  <metadata>meta:[{place:{place_type:city,region:CA }},{song:{artist:Prince,song
title:Never Let Me Down}}]</metadata>
  <author><nickname>bob1</nickname><id>1</id></author>
  <tags></tags><replyto></replyto><conversation></conversation>
</message></api>

Reply via email to