Bonjour,
je me suis écris un RESTPostGenerator qui reçoit des POST xml de clients
riches, les traite et retourne un flux XML aux client via le Serializer
standard...
Ma sitemap ressemble à ça :
<map:match pattern="post/*/*.*/*">
<map:generate type="RestPost">
<map:parameter name="defaultContentType" value="text/xml"/>
<map:parameter name="source" value="{1}"/>
<map:parameter name="package" value="{2}"/>
<map:parameter name="service" value="{3}"/>
<map:parameter name="action" value="{4}"/>
</map:generate>
<map:serialize type="xml">
<encoding>UTF-8</encoding>
</map:serialize>
Mon problème est qu'à la fin de la méthode generate() du RESTPostGenerator on
appelle :
InputSource is = new InputSource(new
ByteArrayInputStream(retour.getBytes("UTF-8")));
logger.debug("RESTGenerator returning XML Stream : "+retour);
parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
parser.parse(is, super.xmlConsumer);
Hors mon flux XML (ma String retour) est conséquente et je perds du temps à
parser ce flux XML alors qu'il me suffirait juste de retourner ce stream XML à
mon client...
Comment éviter cela?
Merci pour vos conseils!
Amicalement,
Guillaume
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is intended only for the person to whom
it is addressed. If you are not the intended recipient, you are not authorized
to read, print, retain, copy, disseminate, distribute, or use this message or
any part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
---------------------------------------------------------------------
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]