Re: pipeline result through SOAP?
Hi Josema, On Tue, Nov 19, 2002 at 11:59:00AM +0100, Josema Alonso wrote: I've just took a look. It is using the AxisRPCReader. I thought a reader was something like a complete pipeline. I mean, it gets the request, and makes the needed steps to generate, transform and serialze. Yes, a Reader is a sitemap component that performs generation and serialization in one stage. There were discussions on the list as to why a Reader was chosen, essentially, ease of use and to take more advantage of the Axis server component. I'm using a transformer that already generates the wanted XML response. How could I embed the result in that reader? Ok, the AxisRPCReader essentially wraps an Axis SOAP server, and makes it available in the sitemap to handle incoming requests. This means that webservices are typically written Axis-style, with a deployment descriptor (have a look in src/scratchpad/src/org/apache/cocoon/webservices/*). In fact, you should be able to deploy any Axis webservice inside the reader, as its basically the same code. You should also be able to access pipelines from within an Axis webservice by making an internal request via the cocoon:/ protocol. Note, I haven't yet done this, but all that should be required is to write a component that implements Composable, lookup the source resolver, and resolve a uri containing the pipeline you want to resolve. This should let you use pipelines to write SOAP services. The method of having to lookup the source resolver, and resolve the uri manually could probably be better streamlined somehow, perhaps similar to how the AvalonProvider is written. I'm more than open to any suggestions. Btw, any step by step example on how to use that reader? I can see the XSL and XSP but can't figure out how to feed it with a SOAP request and get a SOAP response from it. You can send a SOAP request by using the XSP SOAP tag library in Cocoon, the Axis SOAP client library, or any other SOAP client. The input and output XML fragments are IIRC logged to the sitemap.log, so you should be able to see everything that is going on. The XSP page that shows the server status (in scratchpad/webapp/samples/soap-server) uses the XSP SOAP tag library to make a request to the local Cocoon instance to get the server configuration. Hope that helps mate! :) Cheers, Marcus -- . ,,$, Marcus Crafter ;$' ':Computer Systems Engineer $: : ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$,_/\ :' 60327 Frankfurt Germany ' /( \_' . : - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pipeline result through SOAP?
Hello. Ok, the AxisRPCReader essentially wraps an Axis SOAP server, and makes it available in the sitemap to handle incoming requests. ... Ok, I understand this. You should also be able to access pipelines from within an Axis webservice by making an internal request via the cocoon:/ protocol. This sounds very good. Note, I haven't yet done this, but all that should be required is to write a component that implements Composable, lookup the source resolver, and resolve a uri containing the pipeline you want to resolve. ... Ouch...Avalon again. When I try to do this kind of 'advanced' things with Cocoon I always find the Avalon wall. I think I should get into it the sooner the better if I want to develop powerful things. You can send a SOAP request by using the XSP SOAP tag library in Cocoon,the Axis SOAP client library, or any other SOAP client. The input and output XML fragments are IIRC logged to the sitemap.log, so you should be able to see everything that is going on. Great, but couldn't make the reader work. All I get are SOAP errors from it when making any call. What I've doe is to develop a Axis service. This one is served directly from Axis. It makes a request to the Cocoon URL and gets the XML document, then returns this document after serializing it in a DOM Element. I have it working though I know this is just a quick workaround and not the best approach. Hope I could amke the reader work soon. I'd like experimenting with it. Hope that helps mate! :) It does. Thank you very much. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pipeline result through SOAP?
Hi Josema, On Thu, Nov 21, 2002 at 03:00:44PM +0100, Josema Alonso wrote: Ouch...Avalon again. When I try to do this kind of 'advanced' things with Cocoon I always find the Avalon wall. I think I should get into it the sooner the better if I want to develop powerful things. Yes, understanding Avalon is an important part of understanding Cocoon as it's the framework Cocoon is built upon. You'll need an Avalon component to access the sourceresolver. (alternatively you could extend the AbstractComposableService class which is in o.a.c.webservices under scratchpad, but if the class gets complex and you need access to other Avalon components, writing a true Avalon component is probably best). Great, but couldn't make the reader work. All I get are SOAP errors from it when making any call. What I've doe is to develop a Axis service. This one is served directly from Axis. It makes a request to the Cocoon URL and gets the XML document, then returns this document after serializing it in a DOM Element. I have it working though I know this is just a quick workaround and not the best approach. Hope I could amke the reader work soon. I'd like experimenting with it. Ok, what you've done above should be possible within Cocoon using the Reader, as it's essentially the same operation, just on the one system. I'd recommend getting the soap-server sample working in the Cocoon webapp (remember to use the -Dinclude.scratchpad.libs=yes directive) and then start modifying it to do what you need. I need to think about writing a CocoonProvider or similar for the AxisRPCReader to allow one to specify a pipeline in the deployment descriptor for creating the SOAP service content hmmm... You can always send in the error messages you're getting and we can look at them, Cheers, Marcus -- . ,,$, Marcus Crafter ;$' ':Computer Systems Engineer $: : ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$,_/\ :' 60327 Frankfurt Germany ' /( \_' . : - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pipeline result through SOAP?
I'd recommend getting the soap-server sample working in the Cocoon webapp (remember to use the -Dinclude.scratchpad.libs=yes directive) and then start modifying it to do what you need. Ok, I'll try it. I need to think about writing a CocoonProvider or similar for the AxisRPCReader to allow one to specify a pipeline in the deployment descriptor for creating the SOAP service content hmmm... Yummm...this sounds really interesting :-) You can always send in the error messages you're getting and we can look at them, Don't mind about them. I'm having a hard time at work currently and unfortunately don't have the time to test this properly... Anyway, once I get a little time, I'll try to build the scratchpad samples and see what happens. I'll post my comments then. Thank you very much. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pipeline result through SOAP?
In the scratchpad there are some examples with Axis. I have never looked into them but maybe the can help you. Regards, Reinhard -Original Message- From: Josema Alonso [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 2:06 AM To: Cocoon-Users Subject: pipeline result through SOAP? Hi, all. I have a pippeline which produces XML. This is the result of a query. I would like to offer this result as a SOAP Service taking a parameter. Are there any how-tos or something I could read before starting? Maybe someone implemented something similar already... Thanks. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pipeline result through SOAP?
I've just took a look. It is using the AxisRPCReader. I thought a reader was something like a complete pipeline. I mean, it gets the request, and makes the needed steps to generate, transform and serialze. I'm using a transformer that already generates the wanted XML response. How could I embed the result in that reader? Btw, any step by step example on how to use that reader? I can see the XSL and XSP but can't figure out how to feed it with a SOAP request and get a SOAP response from it. -Mensaje original- De: Reinhard Poetz [mailto:[EMAIL PROTECTED]] Enviado el: martes, 19 de noviembre de 2002 11:17 Para: [EMAIL PROTECTED] Asunto: RE: pipeline result through SOAP? In the scratchpad there are some examples with Axis. I have never looked into them but maybe the can help you. Regards, Reinhard - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]