Hi JC,

The problem is that you do not have a valid connection to the repository. You 
are not authenticated, that is what is causing the 401 (Unauthorized).

Try to create an http connection first with the correct credentials. That 
should solve your problem.

Have a look at the nl.hippo.tree.generation.TreeGenerator which is in the CMS. 
I gets the valid connection from the session, but in your case you can create 
your own if you want.

Kind regards,

Jeroen Reijn

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, November 16, 2007 10:57 AM
To: Hippo CMS development public mailinglist
Cc: [EMAIL PROTECTED]
Subject: [HippoCMS-dev] Error 401 and dynamic parameter value

Hello all !

I m working on a generator that's need url to retrieve xml content, to 
parse it, etc...

My problem is, when I try to get content from repository I get an "error 
401" at this line : InputStream oldStream = xml1.getInputStream();

(that's works fine with files from my local filesystem).

Then I decide to give content directly to the generator but how to make 
the value of a paramater to be the result of a cocoon call ? The generator 
needs parameters, its the only way.


Is there a solution to avoid error 401 in java code ?

or

How to make parameters dynamics ?

Thank you for your help !


_______________
  JC Duchaussee 
      WCMTech
          PI 716
--------------------------
______________________________________________________________________________________________
Smals sluit elke aansprakelijkheid uit in verband met de juistheid, de 
volledigheid of het tijdig toekomen van de informatie in deze e-mail. Aan 
deze e-mail kunnen geen rechten worden ontleend en deze e-mail houdt in 
geen geval een erkenning van welkdanige aansprakelijkheid in.
Dit bericht is alleen bestemd voor de geadresseerde. Indien dit bericht 
niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden 
en het bericht te vernietigen.

Smals décline toute responsabilité quant à l'exactitude, à l'exhaustivité 
et au délai de transmission des informations contenues dans cet e-mail. 
Aucun droit ne peut être revendiqué sur cet e-mail et cet e-mail 
n'implique en aucun cas une reconnaissance de responsabilité, quelle 
qu'elle soit.
Ce message s'adresse uniquement au destinataire. Si ce message ne vous est 
pas destiné, nous vous prions de nous le signaler immédiatement et de 
détruire le message. 
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to