Hi folks,

sorry for my re-posting, but my problem still exists and makes me headache.

i want to transform dynamic xml, which i generate with url requests like 
http://cart.my.server/perl/GetMyCart?sessionID=lala, so my current sitemap:

<map:match pattern="getmycart.html">
  <map:act type="request">
    <map:parameter name="parameters" value="true"/>
    <map:generate src="http://cart.my.server/perl/GetMyCart{requestQuery}"/>
    <map:transform type="xslt" src="stylesheets/getmycart.xsl">
        <map:parameter name="use-request-parameters" value="true"/>
    </map:transform>
  </map:act>
  <map:serialize/>
</map:match>

works fine, but i need to post data and than this solution does not work. so i have 
learned this weekend the xsp pages, and thought this would work in a xsp page:

<snip language="Java"> :-)
  URL u = new URL("http://cart.my.server/perl/GetMyCart?sessionID=lala";);
  HttpURLConnection huc = (HttpURLConnection) u.openConnection();
  huc.setRequestMethod("POST
  huc.connect();
        
  InputStream in = huc.getInputStream();
          
  int c;
  while ((c = in.read()) != -1) {
    text.append((char)c);
  }               

  ..

  return text.toString();
</snip>

but this is not interpreted as xml, it is already well-formed and all chars are 
escaped (i. e. &lt;) so my xslt transformer nothing matches, btw i am not a java 
programmer so don't laugh about my code. what is the trick here? can i use jsp-pages 
(which currently do not run on my tomcat3/cocoon2 server) to print out the clear xml, 
must i use the Stream Generator (which i absolutly don't understand how this work), or 
is this not possible with core cocoon?

please point me to the right direction, i thank you in advance.

happy coding, bart

p.s. here is an example of an request to 
http://cart.my.server/perl/GetMyCart?sessionID=lala copied out of internet explorer.

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<response>
 <service request-status="complete">
  <messageID>1024848144s27995</messageID> 
  <sessionID>lala</sessionID> 
  <request-param count="3">
  <param name="mediumID">1</param> 
  <param name="languagecode">ger</param> 
  <param name="sessionID">lala</param> 
  </request-param>
 </service>
 <message>
  <cart-list count="0" />
 </message>
</response>


-- 
BARTLOMIEJ M. FRACKIEWICZ
systementwickler
inity - agentur fuer neue medien gmbh 
birkenstrasse 71                              
40233 duesseldorf

telefon: 0211-99199-0
fax: 0211-99199-10
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]>

Reply via email to