You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Paul Lindner <li...@inuus.com> on 2010/03/20 11:39:03 UTC
Re: What format of XML to use when doing a HTTP POST to send a
message in Shindig?
The example in the spec is incorrect. The specification calls for a plural
field -- recipients. The json example is correct.
I believe the XML you would use in this case would be:
<receipients>
<value>xxxxx</value>
</recipients>
However looking
at java/social-api/src/main/java/org/apache/shindig/social/core/util/xstream/XStream081Configuration.java
it appears that we may need to add something like this:
new ImplicitCollectionFieldMapping(Message.class, "recipients",
String.class, "recipients"),
On Tue, Feb 16, 2010 at 6:10 AM, Pranav Modi <pr...@gmail.com> wrote:
> I have installed a shindig version shindig-1.1-BETA5. I have been trying to
> configure the messaging part by adding persistence with a database. The get
> messages request is working fine, however when i try to do a HTTP POST with
> the following data - it throws an exception -'Property 'recipient' not
> defined in class org.apache.shindig.social.core.model.MessageImpl'
>
> Does anyone know what might be causing this?
>
> <message xmlns="http://ns.opensocial.org/2008/opensocial">
> <id>http://example.org/inbox/message/{msgid}</id>
> <recipient>john.doe</recipient>
> <title>You have a new messge from Joe</title>
> <titleId>541141091700</titleId>
> <updated>2008-09-29T23:35:37.266Z</updated>
> <body>Short message from Joe to some friend\/s</body>
> <bodyId>5491155811231</bodyId>
> <type>privateMessage</type>
> <status>unread</status>
>
> </message>
>
> P.S - I am using this format of xml as it is the one provided in the rest
> specification of opensocial.
>