Hi all,

I'm sure this has been discussed before, but since I didn't find a solution, I've built my own. My problem is, that I need to POST XML-documents somewhere out of Cocoon and receive the resulting document (e.g. for takling to an eXist database because there are currently known bugs with their Cocoon integration and for integrating an XML-RPC based ERP system on the other hand).

None of the Cocoon generators/transformers seemed to do the job (even CInclude has known bugs concerning POST), so I took the WebServiceProxyGenerator (which sounds like a good starting point :) and added the following parameters:

- postbody - any valid Cocoon source URI. The resulting document is sent as the body of the POST request. - postbodyenc - the encoding used to serialize the postbody. UTF-8 by default.
- username and password - used for basic authentication.
- dropparams - if set to "true" the params from the present request are not passed to the target system (my ERP system was confused by params it didn't expect).

I attached a diff against the 2.1.7 version of WebServiceProxyGenerator. I tested a couple of cases and it seems to solve at least my problems (for now).

Any opinions on integrating this into the source tree?

Best regards,
Daniel

Attachment: WebServiceProxyGenerator_postxml.diff.gz
Description: application/gzip

Reply via email to