[Seaside] WAResponse and XML
Jay Hardesty
jayh at panix.com
Wed Aug 3 23:09:32 UTC 2011
Hi - I'm having a problem returning XML as a response from within a Seaside app, after moving to 3.0.
I used to return XML by:
self session returnResponse:
(WAResponse new
contentType: 'text/xml';
nextPutAll: xmlString;
yourself)
but t in Seaside 3.0 I get:
'You can no longer return a new WAResponse instance. You must instead modify the Response contained in the active RequestContext. Look for senders of #respond: and #response for examples.'
Following the nearest examples I can find I tried:
self requestContext respond: [:response |
| document |
document := MIMEDocument
contentType: 'text/xml';
content: xmlString.
response document: document]
and:
self requestContext respond: [:response |
response
contentType: 'text/xml';
nextPutAll: xmlString]
but in both cases an html document arrives downstream (with XML in the body) rather than the XML itself as previously
Think I'm missing something basic here... Thanks very much for any pointers,
Jay
More information about the seaside
mailing list