You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Ewing, Bryce" <Br...@HalifaxCetelem.COM> on 2002/05/02 11:27:29 UTC

Request to external XML server in pipeline

Hi,

Just started working with Cocoon and I have a question in regards to reading
XML content from a XML server probably within a pipeline.  What I have at
present is a backend XML server that given a XML formatted packet does some
processing, including database access, legacy etc. then replies with an
answer XML packet.  This is totally outside of Cocoon.

What I have inside Cocoon at present is an html form that has the request
parameters that would make up the inwards XML packet.  I have a pipeline
that has a request generator, then a xslt transformation to get the XML into
the required format.  What I would like to do is post this packet to the XML
server, with the reply packet being available to the pipeline, maybe a
transformer that changes the input XML to the output via the post.  Then
process this reply XML packet to create the next HTML page.

If anyone has any help on this, or can think of a better way this could be
performed your help would be greatly appreciated.

Cheers
Bryce

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


cann't run sql examples

Posted by Olivier GUCKERT <Ol...@inria.fr>.
Hello all,

I have a problem to run example cocoon with SQL database.
In the : http://localhost:8080/cocoon/welcome page, if i try the "simple
SQL" example, i become a white page. If i uncomment the execute-query in
the sql-page-xml, i botain a html page (without the data).

When i click on the "ESQL" example, it works fine : so i think my
database connexion is well.

What's wrong ?

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: Request to external XML server in pipeline

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
In the case of a POST, you can use the session transformer (only available
in the latest CVS) instead of the cinclude transformer:

 <pipeline>
 	<reguest generator>
       <stylesheet - builds cinclude statements with the params>
       <cinclude transformer>
       <stylesheet for output>
 </pipeline>

The session transformer is able to use post for HTTP requests. The following
XML should get something from http://itsunshine/test by using POST:

<data xmlns:session="http://ocoon.apache.org/session/1.0">
  <session:include>
      <session:connection type="uri">
          <!-- THE URI -->
          <session:target>http://itsunshine/test</session:target>

          <!-- Setting POST -->
          <session:config>
	        <session:param>
                  <session:name>method</session:name>
                  <session:value>POST</session:value>
        	  </session:param>
           </session:config>

           <!-- Setting parameters -->
           <session:params>
                 <session:param>
               	  <session:name>message</session:name>
            	  <session:value>Hi there</session:value>
            	</session:param>
          </session:params>
      </session:connection>
   </session:include>
</data>

But I must confess that I'm not sure if this works with the lastest CVS,
as we changed the source resolving - I will have a look at it asap.

HTH
Carsten

> -----Original Message-----
> From: Matthew Langham [mailto:mlangham@s-und-n.de]
> Sent: Thursday, May 02, 2002 11:47 AM
> To: cocoon-users@xml.apache.org
> Subject: RE: Request to external XML server in pipeline
>
>
> Hi Bryce,
>
> here's one way of doing this:
>
> <pipeline>
> 	<reguest generator>
>       <stylesheet - builds cinclude statements with the params>
>       <cinclude transformer>
>       <stylesheet for output>
> </pipeline>
> So you use the cinclude transformer to fetch the external data. Check out
> the cinclude documentation for more details.
>
> Matthew
>
> --
> Open Source Group               sunShine - Lighting up e:Business
> =================================================================
> Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
>            Weblogging at: http://www.need-a-cake.com
>  Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352
> =================================================================
>
>
>
> -----Original Message-----
> From: Ewing, Bryce [mailto:Bryce.Ewing@HalifaxCetelem.COM]
> Sent: Thursday, May 02, 2002 11:27 AM
> To: 'cocoon-users@xml.apache.org'
> Subject: Request to external XML server in pipeline
>
>
> Hi,
>
> Just started working with Cocoon and I have a question in regards
> to reading
> XML content from a XML server probably within a pipeline.  What I have at
> present is a backend XML server that given a XML formatted packet
> does some
> processing, including database access, legacy etc. then replies with an
> answer XML packet.  This is totally outside of Cocoon.
>
> What I have inside Cocoon at present is an html form that has the request
> parameters that would make up the inwards XML packet.  I have a pipeline
> that has a request generator, then a xslt transformation to get
> the XML into
> the required format.  What I would like to do is post this packet
> to the XML
> server, with the reply packet being available to the pipeline, maybe a
> transformer that changes the input XML to the output via the post.  Then
> process this reply XML packet to create the next HTML page.
>
> If anyone has any help on this, or can think of a better way this could be
> performed your help would be greatly appreciated.
>
> Cheers
> Bryce
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: Request to external XML server in pipeline

Posted by Matthew Langham <ml...@s-und-n.de>.
Hi Bryce,

here's one way of doing this:

<pipeline>
	<reguest generator>
      <stylesheet - builds cinclude statements with the params>
      <cinclude transformer>
      <stylesheet for output>
</pipeline>
So you use the cinclude transformer to fetch the external data. Check out
the cinclude documentation for more details.

Matthew

--
Open Source Group               sunShine - Lighting up e:Business
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
           Weblogging at: http://www.need-a-cake.com
 Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352
=================================================================



-----Original Message-----
From: Ewing, Bryce [mailto:Bryce.Ewing@HalifaxCetelem.COM]
Sent: Thursday, May 02, 2002 11:27 AM
To: 'cocoon-users@xml.apache.org'
Subject: Request to external XML server in pipeline


Hi,

Just started working with Cocoon and I have a question in regards to reading
XML content from a XML server probably within a pipeline.  What I have at
present is a backend XML server that given a XML formatted packet does some
processing, including database access, legacy etc. then replies with an
answer XML packet.  This is totally outside of Cocoon.

What I have inside Cocoon at present is an html form that has the request
parameters that would make up the inwards XML packet.  I have a pipeline
that has a request generator, then a xslt transformation to get the XML into
the required format.  What I would like to do is post this packet to the XML
server, with the reply packet being available to the pipeline, maybe a
transformer that changes the input XML to the output via the post.  Then
process this reply XML packet to create the next HTML page.

If anyone has any help on this, or can think of a better way this could be
performed your help would be greatly appreciated.

Cheers
Bryce

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Request to external XML server in pipeline

Posted by Zack Angelo <za...@nostromocorp.com>.
Bryce,

On a side note, it sounds like you may also benefit from the use of SOAP,
have you checked it out yet?

-Zack

On 5/2/02 4:27 AM, "Ewing, Bryce" <Br...@HalifaxCetelem.COM> wrote:

> Hi,
> 
> Just started working with Cocoon and I have a question in regards to reading
> XML content from a XML server probably within a pipeline.  What I have at
> present is a backend XML server that given a XML formatted packet does some
> processing, including database access, legacy etc. then replies with an
> answer XML packet.  This is totally outside of Cocoon.
> 
> What I have inside Cocoon at present is an html form that has the request
> parameters that would make up the inwards XML packet.  I have a pipeline
> that has a request generator, then a xslt transformation to get the XML into
> the required format.  What I would like to do is post this packet to the XML
> server, with the reply packet being available to the pipeline, maybe a
> transformer that changes the input XML to the output via the post.  Then
> process this reply XML packet to create the next HTML page.
> 
> If anyone has any help on this, or can think of a better way this could be
> performed your help would be greatly appreciated.
> 
> Cheers
> Bryce
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
> 
> 



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>