Gianugo Rabellino wrote:

On Mon, 26 Jul 2004 16:12:30 +0200, Daniel Fagerstrom
<[EMAIL PROTECTED]> wrote:


Hi Morley,

I answer at Cocoon-dev as others might be interested.



Yup, I am. We're currently facing the need of a tool that does "XML over HTTP" for some webserviceish things that aren't actually SOAP compliant (it's just RPC with XML in/XML out stuff).

Just to add another wheel, we were thinking of a different solution:
we're planning to build a WebServicesProxyTransformer that basically
builds on the ideas of the WSPGenerator (take some XML, send it over
the wire, insert the response) and SQL/DASLTransformer. A custom
element wraps the XML to be sent to the "web service" and the result
is inserted exactly at the same point in the XML stream. Then we
realized that we were duplicating
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24391.



AFAIK there are no "current prefered method" for calling web-services. I
and my colleagues, use the extended SourceWritingTransformer (SWT)



I was thinking about using SWT as well, but then I realized that SWT doesn't offer a way of inserting the resulting XML in the original stream: all it does is delete the XML inside the <source:write/> element, providing some status information (see SWT#reportResult()). Am I missing something?

I have extended SWT so that you can post XML as well: <source:post/>. The code can be found in: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24402. You need the patch http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=8966 which is a tar.gz, (is there any way to explain to Bugzilla that the attachement is a tar.gz?), and the two update patches.


So, is it time to grab this issue once and for all, providing a common solution?



Absolutely, I think it is a good idea to gather the client code in one component (like the o.a.e.source.impl.HTTPClientSource in my code), so that you can use it from web-proxy generators, transformers and flowscripts depending on your needs. I am not sure if it is good enough to call web services from the SWT as in my code or it would be better to have a more specialized webservice and SOAP transformer. A general problem with transformer based solutions is that you don't get that much controll over errror handling for geting that it is better to use flowscripts. I submitted an example of using the HTTPClientSource from flowscript, that one of my colleauges wrote, to the Bugzilla entry.

/Daniel




Reply via email to