It's on the trunk now. Have a look please at the updated documentation too....
Cheers, Sergey
----- Original Message -----
From: "Anthony Schexnaildre" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 03, 2008 2:01 AM
Subject: Re: @Context in message body provider? - was CXF REST - Constrain the
xml elements in output
Please let us know when you have had a chance to commit these changes.
I would love to get rid of some ugly hacks i have in place.
-Anthony
On Jun 30, 2008, at 8:12 AM, Sergey Beryozkin wrote:
Hi
I'm jumping a bit ahead here. On the trunk it's not supported. I'm
hoping to do a merge sometimes this week and the injection for all
types of providers will also be supported.
Cheers, Sergey
I see the use of @Context in this example but the docs state:
"Injection of contexts into message body providers is not supported
yet."
Which is correct?
-Anthony
@Context
public void setUriInfo(UriInfo ui) {
currentQuery = ui.getQueryparameters();
}
void writeTo(Contacts cs, Class<Contacts> clazz, ...,
OutputStream os) {
// write start tag
for (Contact c : cs) {
if
(c.getName().equals(currentQuery.getFirst("firstName"))) {
// write
}
}
// write end tag
}
}
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland