ComposantsComponents › InternetInternet
Lit un flux RSS ou Atom, à une adresse web ou dans un fichier, et en fait un flux de lignes : une par article, avec son titre, sa description en texte simple, sa date et son lien. Il peut ne garder que les articles récents ou les premiers du flux. La lecture passe par la bibliothèque feed4j ; pour écrire un flux, prenez un tRSSOutput, et pour lire d'autres éléments du document (catégories, auteur…), un tFileInputXML sur le fichier téléchargé par un tFileFetch. Reads an RSS or Atom feed, at a web address or in a file, and turns it into a flow of rows: one per item, with its title, its description as plain text, its date and its link. It can keep only the recent items or the first ones of the feed. Reading goes through the feed4j library; to write a feed, take a tRSSOutput, and to read other elements of the document (categories, author…), a tFileInputXML on the file downloaded by a tFileFetch.
EntréeInput
Aucune : il commence un sous-job. Sinon un lien Iterate (une lecture par itération, par exemple une adresse par ligne d'une liste). None: it starts a subjob. Otherwise one Iterate link (one read per iteration, for example one address per row of a list).
SortieOutput
Un lien Main : une ligne par article gardé, colonnes TITLE, DESCRIPTION, PUBDATE, LINK. Ou un lien Iterate.
One Main link: one row per kept item, columns TITLE, DESCRIPTION, PUBDATE, LINK. Or one Iterate link.
Déclencheurs en sortieOutput triggers
On Subjob Ok On Subjob Error On Component Ok On Component Error Run if
Le job de tous les exemples de cette page : le flux lu, un tLogRow qui affiche les lignes, un tJava qui affiche ensuite NB_LINE et un autre qui affiche le message d'erreur. Remplacez le tLogRow par ce qui doit recevoir les articles : un fichier, une table, un tMap.
The job of all the examples of this page: the feed read, a tLogRow that prints the rows, a tJava that then prints NB_LINE and another that prints the error message. Replace the tLogRow with what must receive the items: a file, a table, a tMap.
"https://news.example.com/feed.xml", ou "file:///C:/data/feed.xml" pour un fichier (un chemin seul est refusé).
Write the address of the feed in RSS URL, in quotes: "https://news.example.com/feed.xml", or "file:///C:/data/feed.xml" for a file (a bare path is rejected).
Les libellés sont ceux de l'onglet Composant, dans son ordre ; le nom technique, en gris, est celui du paramètre dans le fichier du job. Labels are those of the Component tab, in its order; the technical name, in grey, is the parameter name in the job file.
| ParamètreSetting | DéfautDefault | VisibleShown | Description |
|---|---|---|---|
| SchémaSchemaSCHEMA | TITLE, DESCRIPTION, PUBDATE, LINK |
ToujoursAlways | Quatre colonnes String (longueur 255), en lecture seule, remplies dans cet ordre : titre, description, date, lien. Voir Ce qui est lu. Four String columns (length 255), read-only, filled in this order: title, description, date, link. See What is read. |
| URL du RSSRSS URLRSS | "http://feeds.feedburner.com/Talend" |
ToujoursAlways |
Expression Java de type texte : une adresse avec son protocole, http://, https:// ou file:///. Le document est lu par Java lui-même : pas d'authentification, pas de délai d'attente (voir Pièges), en-tête User-Agent: Java/21…. Un chemin sans file:/// échoue (unknown protocol: c). La valeur par défaut est une adresse de Talend qui ne sert plus d'exemple : remplacez-la.
Java expression of type text: an address with its protocol, http://, https:// or file:///. The document is read by Java itself: no authentication, no timeout (see Pitfalls), User-Agent: Java/21… header. A path without file:/// fails (unknown protocol: c). The default value is a Talend address that no longer serves as an example: replace it.
|
| lire les articles deread articles fromARTICLE_DATE | NonNo | ToujoursAlways | Cochée : les articles datés d'avant date et heure sont écartés. Les articles sans date (ou dont la date n'a pas pu être lue) sont gardés. Checked: the items dated before date time are left out. The items without a date (or whose date could not be read) are kept. |
| date et heuredate timeDATE | "2007-05-30 08:12:12" |
lire les articles de cochéeread articles from checked |
Texte au format yyyy-MM-dd HH:mm:ss, compris dans le fuseau horaire de la machine du job. Un article de cette date exacte est gardé.
Text in the yyyy-MM-dd HH:mm:ss format, understood in the time zone of the machine of the job. An item of this exact date is kept.
|
| = nombre max d'articles=max number of articlesARTICLE_AMOUNT | NonNo | ToujoursAlways | Cochée : seuls les premiers articles du flux, dans l'ordre du document, sont pris. Avec un filtre de date, celui-ci s'applique ensuite à ces seuls articles : on peut obtenir moins de lignes que le maximum même si le flux a d'autres articles récents. Checked: only the first items of the feed, in document order, are taken. With a date filter, the filter then applies to these items only: you can get fewer rows than the maximum even when the feed has other recent items. |
| Somme maxmax amountAMOUNT | 10 |
= nombre max d'articles cochée=max number of articles checked |
Nombre maximal d'articles, expression Java entière : 2, context.maxItems.
Maximum number of items, integer Java expression: 2, context.maxItems.
|
| Arrêter en cas d'erreurDie on errorDIE_ON_ERROR | NonNo | ToujoursAlways |
Décochée, un document illisible n'est pas ignoré : son message est écrit sur la sortie d'erreur, puis le composant échoue sur une NullPointerException. Cochée, il échoue sur l'erreur elle-même, plus parlante. Voir Les erreurs.
Unchecked, an unreadable document is not skipped: its message is written to the error output, then the component fails on a NullPointerException. Checked, it fails on the error itself, which says more. See Errors.
|
| ParamètreSetting | DéfautDefault | VisibleShown | Description |
|---|---|---|---|
| Utiliser un proxy SocksUse Socks ProxyUSE_PROXY | NonNo | ToujoursAlways |
Cochée : le composant écrit les propriétés système socksProxyHost et socksProxyPort de Java, qui valent ensuite pour toute la suite du job. Voir Le proxy SOCKS.
Checked: the component writes the Java system properties socksProxyHost and socksProxyPort, which then apply to the whole rest of the job. See The SOCKS proxy.
|
| Hôte du proxyProxy hostPROXY_HOST | "127.0.0.1" |
Utiliser un proxy Socks cochéeUse Socks Proxy checked | Nom ou adresse du proxy SOCKS, entre guillemets. Name or address of the SOCKS proxy, in quotes. |
| Port du proxyProxy portPROXY_PORT | "1080" |
Utiliser un proxy Socks cochéeUse Socks Proxy checked |
À écrire entre guillemets, comme un texte : "1081". Écrit comme un nombre (1081), il est ignoré sans message et Java prend le port 1080 (mesuré : Connection refused, proxy d'essai jamais contacté).
To be written in quotes, as a text: "1081". Written as a number (1081), it is ignored without a message and Java takes port 1080 (measured: Connection refused, test proxy never contacted).
|
| Utilisateur du proxyProxy usernamePROXY_USERNAME | "" |
Utiliser un proxy Socks cochéeUse Socks Proxy checked |
Rangés dans les propriétés java.net.socks.username et java.net.socks.password, que Java 21 ne lit pas : un proxy qui demande un mot de passe refuse la connexion (voir Le proxy SOCKS).
Stored in the java.net.socks.username and java.net.socks.password properties, which Java 21 does not read: a proxy that asks for a password rejects the connection (see The SOCKS proxy).
|
| Mot de passe du proxyProxy passwordPROXY_PASSWORD | "" |
Utiliser un proxy Socks cochéeUse Socks Proxy checked |
((Integer) globalMap.get("tRSSInput_1_NB_LINE"))
((String) globalMap.get("tRSSInput_1_ERROR_MESSAGE"))
Le document est reconnu à sa racine : <rss> de version 0.91, 0.92 ou 2.0, <rdf:RDF> (RSS 1.0), <feed> Atom 0.3 ou 1.0. Un autre document XML fait échouer le composant (UnsupportedFeedException). Les autres éléments du flux (catégories, auteur, pièces jointes, titre du canal) ne sont pas transmis.
The document is recognized by its root: <rss> of version 0.91, 0.92 or 2.0, <rdf:RDF> (RSS 1.0), Atom 0.3 or 1.0 <feed>. Another XML document makes the component fail (UnsupportedFeedException). The other elements of the feed (categories, author, enclosures, channel title) are not passed on.
| ColonneColumn | RSS 2.0RSS 2.0 | Atom 1.0 | Ce qu'elle reçoitWhat it receives |
|---|---|---|---|
| TITLE | title |
title |
Le texte du titre.The text of the title. |
| DESCRIPTION | description |
summary, content |
Le HTML de la description réduit à son texte : balises retirées, entités décodées, liens perdus. <p>Version <b>2.4</b> brings <a href="…">faster loading</a> & a new export.</p> donne Version 2.4 brings faster loading & a new export.The HTML of the description reduced to its text: tags removed, entities decoded, links lost. <p>Version <b>2.4</b> brings <a href="…">faster loading</a> & a new export.</p> gives Version 2.4 brings faster loading & a new export. |
| PUBDATE | pubDate |
published |
La date, en texte, toujours en heure GMT et en anglais : 20 Nov 2026 17:30:00 GMT. Thu, 19 Nov 2026 09:15:00 +0100 devient 19 Nov 2026 08:15:00 GMT. Vide si l'article n'a pas de date ou si elle n'a pas pu être lue. En Atom, updated n'est pas lu, et le fuseau de published est ignoré (voir Pièges).The date, as text, always in GMT time and in English: 20 Nov 2026 17:30:00 GMT. Thu, 19 Nov 2026 09:15:00 +0100 becomes 19 Nov 2026 08:15:00 GMT. Empty when the item has no date or when it could not be read. In Atom, updated is not read, and the time zone of published is ignored (see Pitfalls). |
| LINK | link (ou guid marqué isPermaLink="true")(or guid marked isPermaLink="true") |
link href |
L'adresse de l'article.The address of the item. |
La bibliothèque ne garde un article que s'il a un titre et un lien qui est une adresse valable. Les autres disparaissent sans message et ne comptent pas dans NB_LINE : lors de nos essais, un article écrit par un tRSSOutput avec un lien vide n'a pas été relu (2 lignes sur 3).
The library only keeps an item when it has a title and a link that is a valid address. The others disappear without a message and do not count in NB_LINE: in our runs, an item written by a tRSSOutput with an empty link was not read back (2 rows out of 3).
Les sorties sont copiées depuis des exécutions du job de Utilisation (lancé depuis Talaxie, Java 21, sur un poste à l'heure de Paris) contre un serveur HTTP d'essai installé sur le poste, à l'adresse http://127.0.0.1:59471/. Le tJava relié par On Subjob Ok affiche "NB_LINE = " + globalMap.get("tRSSInput_1_NB_LINE"). Le flux servi, news.xml, a quatre articles ; les deux premiers :
The outputs are copied from runs of the job of Usage (started from Talaxie, Java 21, on a machine on Paris time) against a test HTTP server installed on the machine, at the address http://127.0.0.1:59471/. The tJava connected with On Subjob Ok prints "NB_LINE = " + globalMap.get("tRSSInput_1_NB_LINE"). The feed served, news.xml, has four items; the first two:
<rss version="2.0">
<channel>
<title>Example News</title>
…
<item>
<title>Release 2.4 is out</title>
<link>https://news.example.com/2026/11/release-2-4</link>
<description><p>Version <b>2.4</b> brings <a href="https://news.example.com/notes">faster loading</a> &amp; a new export.</p></description>
<pubDate>Fri, 20 Nov 2026 17:30:00 GMT</pubDate>
</item>
<item>
<title>Maintenance on Saturday</title>
<link>https://news.example.com/2026/11/maintenance</link>
<description><![CDATA[Servers will be <i>offline</i> from 22:00 to 23:00 (Paris time).]]></description>
<pubDate>Thu, 19 Nov 2026 09:15:00 +0100</pubDate>
</item>
…
URL du RSS : "http://127.0.0.1:59471/news.xml", tLogRow en mode Table.
RSS URL: "http://127.0.0.1:59471/news.xml", tLogRow in Table mode.
.--------------------------------+---------------------------------------------------------+------------------------+--------------------------------------------. | tLogRow_1 | |=-------------------------------+---------------------------------------------------------+------------------------+-------------------------------------------=| |TITLE |DESCRIPTION |PUBDATE |LINK | |=-------------------------------+---------------------------------------------------------+------------------------+-------------------------------------------=| |Release 2.4 is out |Version 2.4 brings faster loading & a new export. |20 Nov 2026 17:30:00 GMT|https://news.example.com/2026/11/release-2-4| |Maintenance on Saturday |Servers will be offline from 22:00 to 23:00 (Paris time).|19 Nov 2026 08:15:00 GMT|https://news.example.com/2026/11/maintenance| |Café and crème: accents in feeds|Plain text, no HTML. |16 Nov 2026 12:00:00 GMT|https://news.example.com/2026/11/accents | |Item without date |This item has no pubDate. | |https://news.example.com/2026/11/no-date | '--------------------------------+---------------------------------------------------------+------------------------+--------------------------------------------' NB_LINE = 4
Journal du serveur d'essai : une seule requête, sans en-tête propre au composant. Log of the test server: a single request, with no header of the component's own.
[http] GET /news.xml HTTP/1.1 [http] User-Agent: Java/21.0.12.1 [http] Host: 127.0.0.1:59471 [http] Accept: */* [http] Connection: keep-alive [http] "GET /news.xml HTTP/1.1" 200 -
= nombre max d'articles cochée, Somme max : 2.
=max number of articles checked, max amount: 2.
.-----------------------+---------------------------------------------------------+------------------------+--------------------------------------------. | tLogRow_1 | |=----------------------+---------------------------------------------------------+------------------------+-------------------------------------------=| |TITLE |DESCRIPTION |PUBDATE |LINK | |=----------------------+---------------------------------------------------------+------------------------+-------------------------------------------=| |Release 2.4 is out |Version 2.4 brings faster loading & a new export. |20 Nov 2026 17:30:00 GMT|https://news.example.com/2026/11/release-2-4| |Maintenance on Saturday|Servers will be offline from 22:00 to 23:00 (Paris time).|19 Nov 2026 08:15:00 GMT|https://news.example.com/2026/11/maintenance| '-----------------------+---------------------------------------------------------+------------------------+--------------------------------------------' NB_LINE = 2
lire les articles de cochée, date et heure : "2026-11-19 10:00:00", soit 09:00 GMT à Paris.
read articles from checked, date time: "2026-11-19 10:00:00", that is 09:00 GMT in Paris.
.------------------+-------------------------------------------------+------------------------+--------------------------------------------. | tLogRow_1 | |=-----------------+-------------------------------------------------+------------------------+-------------------------------------------=| |TITLE |DESCRIPTION |PUBDATE |LINK | |=-----------------+-------------------------------------------------+------------------------+-------------------------------------------=| |Release 2.4 is out|Version 2.4 brings faster loading & a new export.|20 Nov 2026 17:30:00 GMT|https://news.example.com/2026/11/release-2-4| |Item without date |This item has no pubDate. | |https://news.example.com/2026/11/no-date | '------------------+-------------------------------------------------+------------------------+--------------------------------------------' NB_LINE = 2
L'article de 08:15 GMT (09:15 à Paris) est écarté ; l'article sans date est gardé. The 08:15 GMT item (09:15 in Paris) is left out; the item without a date is kept.
Trois entrées : la première a <published>2026-11-18T10:00:00Z</published> et un summary ; la deuxième seulement <updated> et un content HTML ; la troisième <published>2026-11-17T10:00:00+05:00</published>.
Three entries: the first one has <published>2026-11-18T10:00:00Z</published> and a summary; the second one only <updated> and an HTML content; the third one <published>2026-11-17T10:00:00+05:00</published>.
.-----------+-------------------------+------------------------+-------------------------------. | tLogRow_1 | |=----------+-------------------------+------------------------+------------------------------=| |TITLE |DESCRIPTION |PUBDATE |LINK | |=----------+-------------------------+------------------------+------------------------------=| |First post |A short summary. |18 Nov 2026 09:00:00 GMT|https://blog.example.com/first | |Second post|HTML content | |https://blog.example.com/second| |Third post |Published with an offset.|17 Nov 2026 09:00:00 GMT|https://blog.example.com/third | '-----------+-------------------------+------------------------+-------------------------------' NB_LINE = 3
Les dates sont fausses : 10:00 UTC est devenu 09:00 GMT, et 10:00 à +05:00 (05:00 GMT) aussi 09:00 GMT. La bibliothèque lit l'heure d'une date Atom comme une heure locale de la machine du job, sans tenir compte du Z ni du décalage. La deuxième entrée, sans published, n'a pas de date.
The dates are wrong: 10:00 UTC became 09:00 GMT, and 10:00 at +05:00 (05:00 GMT) also 09:00 GMT. The library reads the time of an Atom date as a local time of the machine of the job, ignoring the Z and the offset. The second entry, without published, has no date.
Avec Arrêter en cas d'erreur décochée, une erreur de lecture est d'abord écrite sur la sortie d'erreur, sans retour à la ligne, puis le composant continue avec un flux absent et échoue. Arrêter en cas d'erreur ne fait donc que changer le message. Dans les deux cas le sous-job s'arrête et les liens On Component Error et On Subjob Error sont suivis. Nom du job remplacé par MyJob, piles abrégées.
With Die on error unchecked, a read error is first written to the error output, without a line break, then the component goes on with a missing feed and fails. Die on error thus only changes the message. In both cases the subjob stops and the On Component Error and On Subjob Error links are followed. Job name replaced with MyJob, shortened stacks.
URL du RSS : "http://127.0.0.1:59471/missing.xml". La console affiche d'abord org.dom4j.DocumentException: http://127.0.0.1:59471/missing.xml, collé à la ligne Exception in component tRSSInput_1 (MyJob), puis :
RSS URL: "http://127.0.0.1:59471/missing.xml". The console first prints org.dom4j.DocumentException: http://127.0.0.1:59471/missing.xml, glued to the Exception in component tRSSInput_1 (MyJob) line, then:
java.lang.NullPointerException: Cannot invoke "it.sauronsoftware.feed4j.bean.Feed.getItemCount()" because "<local17>" is null at demo.myjob_0_1.MyJob.tRSSInput_1Process(MyJob.java:1007) … On Component Error: ERROR_MESSAGE = Cannot invoke "it.sauronsoftware.feed4j.bean.Feed.getItemCount()" because "<local17>" is null
ERROR_MESSAGE ne contient que la NullPointerException : la vraie cause n'est que dans la console.
ERROR_MESSAGE only holds the NullPointerException: the real cause is only in the console.
Exception in component tRSSInput_1 (MyJob) it.sauronsoftware.feed4j.FeedXMLParseException: org.dom4j.DocumentException: http://127.0.0.1:59471/missing.xml at it.sauronsoftware.feed4j.FeedParser.parse(FeedParser.java:53) … Caused by: org.dom4j.DocumentException: http://127.0.0.1:59471/missing.xml … Caused by: java.io.FileNotFoundException: http://127.0.0.1:59471/missing.xml at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2030) … On Component Error: ERROR_MESSAGE = org.dom4j.DocumentException: http://127.0.0.1:59471/missing.xml
Cochez-la : le message rangé dans ERROR_MESSAGE désigne alors le document en cause.
Check it: the message stored in ERROR_MESSAGE then names the document at fault.
| Cas essayéCase tried | Message de l'erreur de lectureMessage of the read error |
|---|---|
| Personne n'écoute sur le portNobody listening on the port | org.dom4j.DocumentException: Connection refused: connect |
Fichier absent (file:///…)Missing file (file:///…) |
org.dom4j.DocumentException: C:\data\rss\news.xml (Le fichier spécifié est introuvable) (chemin raccourci ; la fin vient de Windows, dans sa langue)(shortened path; the end comes from Windows, in its language) |
| Une page HTMLAn HTML page | org.dom4j.DocumentException: Error on line 4 of document http://127.0.0.1:59471/page.html : The element type "br" must be terminated by the matching end-tag "</br>". |
| Un XML qui n'est pas un fluxAn XML document that is not a feed | Pas de message préalable : échec immédiat, même décochée, sur it.sauronsoftware.feed4j.UnsupportedFeedException, qui est aussi le texte de ERROR_MESSAGE.No prior message: immediate failure, even unchecked, on it.sauronsoftware.feed4j.UnsupportedFeedException, which is also the text of ERROR_MESSAGE. |
Un chemin sans file:///A path without file:/// |
Échec immédiat, même décochée : java.net.MalformedURLException: unknown protocol: c.Immediate failure, even unchecked: java.net.MalformedURLException: unknown protocol: c. |
| Proxy SOCKS qui demande un mot de passeSOCKS proxy that asks for a password | org.dom4j.DocumentException: SOCKS : authentication failed |
| Serveur qui accepte la connexion et ne répond pasServer that accepts the connection and does not answer | Aucun : le job attend sans fin (arrêté au bout de 25 s). Avec les options de la JVM du job -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=5000, au bout de 5 s : org.dom4j.DocumentException: Read timed out.None: the job waits forever (stopped after 25 s). With the options of the JVM of the job -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=5000, after 5 s: org.dom4j.DocumentException: Read timed out. |
Essais avec un proxy SOCKS5 d'essai sur le poste (port 59472). Java ne fait pas passer par un proxy les adresses localhost, 127.* et [::1] (valeur par défaut de la propriété http.nonProxyHosts) : sans réglage, le proxy d'essai n'a reçu aucune connexion. Pour ces essais seulement, le job a été lancé avec -Dhttp.nonProxyHosts= (liste vide).
Runs with a test SOCKS5 proxy on the machine (port 59472). Java does not route the localhost, 127.* and [::1] addresses through a proxy (default value of the http.nonProxyHosts property): without a setting, the test proxy received no connection. For these runs only, the job was started with -Dhttp.nonProxyHosts= (empty list).
Hôte du proxy "127.0.0.1", Port du proxy "59472", un article. Le tJava relié par On Subjob Ok lit les propriétés de Java après le composant :
Proxy host "127.0.0.1", Proxy port "59472", one item. The tJava connected with On Subjob Ok reads the Java properties after the component:
System.out.println("socksProxyHost = " + System.getProperty("socksProxyHost")
+ ", socksProxyPort set: " + (System.getProperty("socksProxyPort") != null));
.------------------+-------------------------------------------------+------------------------+--------------------------------------------. | tLogRow_1 | |=-----------------+-------------------------------------------------+------------------------+-------------------------------------------=| |TITLE |DESCRIPTION |PUBDATE |LINK | |=-----------------+-------------------------------------------------+------------------------+-------------------------------------------=| |Release 2.4 is out|Version 2.4 brings faster loading & a new export.|20 Nov 2026 17:30:00 GMT|https://news.example.com/2026/11/release-2-4| '------------------+-------------------------------------------------+------------------------+--------------------------------------------' socksProxyHost = 127.0.0.1, socksProxyPort set: true
Journal du proxy : Log of the proxy:
[socks] 52788 client methods=[0, 2] [socks] 52788 CONNECT 127.0.0.1:59471
Les propriétés restent après le composant : les connexions suivantes du job (autres composants web, bases de données) peuvent passer elles aussi par ce proxy. The properties remain after the component: the next connections of the job (other web components, databases) can also go through this proxy.
Proxy d'essai qui n'accepte que l'utilisateur proxyuser et son mot de passe ; ces deux valeurs sont dans Utilisateur du proxy et Mot de passe du proxy. Pour l'essai, le compte du job (user.name) a été remplacé par demo. Journal du proxy :
Test proxy that only accepts the proxyuser user and its password; these two values are in Proxy username and Proxy password. For the run, the account of the job (user.name) was replaced with demo. Log of the proxy:
[socksauth] 60690 client methods=[0, 2] [socksauth] 60690 auth user=demo password=(empty) ok=False [socksauth] 60691 client methods=[0, 2] [socksauth] 60691 auth user=demo password=(empty) ok=False
Java envoie le nom du compte qui lance le job, sans mot de passe, et non les valeurs du composant : Java 21 ne lit pas les propriétés java.net.socks.username et java.net.socks.password qu'il écrit. Le composant échoue sur SOCKS : authentication failed. Un proxy SOCKS avec mot de passe n'est pas utilisable avec ce composant.
Java sends the name of the account that runs the job, without a password, and not the values of the component: Java 21 does not read the java.net.socks.username and java.net.socks.password properties that it writes. The component fails on SOCKS : authentication failed. A SOCKS proxy with a password cannot be used with this component.
Pour un proxy HTTP (non essayé avec ce composant), laissez la case décochée et donnez les options de la JVM du job -Dhttp.proxyHost=… et -Dhttp.proxyPort=… (ou https.), ou placez un tSetProxy avant le composant.
For an HTTP proxy (not tried with this component), leave the box unchecked and give the options of the JVM of the job -Dhttp.proxyHost=… and -Dhttp.proxyPort=… (or https.), or put a tSetProxy before the component.
L'analyseur XML résout les entités externes déclarées dans le document. Essai avec un flux servi par le serveur d'essai, qui déclare une entité vers un fichier de la machine du job et une autre vers une adresse HTTP, utilisées dans la description d'un article : The XML parser resolves the external entities declared in the document. Run with a feed served by the test server, which declares an entity to a file of the machine of the job and another one to an HTTP address, used in the description of an item:
<!DOCTYPE rss [
<!ENTITY local SYSTEM "file:///C:/data/local/secret.txt">
<!ENTITY remote SYSTEM "http://127.0.0.1:59471/remote.txt">
]>
…<description>[&local;] [&remote;]</description>…
(Chemins raccourcis, ici et dans le message plus bas.) Le journal du serveur montre que le job a téléchargé /remote.txt juste après le flux :
(Shortened paths, here and in the message below.) The log of the server shows that the job downloaded /remote.txt right after the feed:
[http] "GET /entity.xml HTTP/1.1" 200 - [http] GET /remote.txt HTTP/1.1 [http] User-Agent: Java/21.0.12.1 [http] Host: 127.0.0.1:59471 [http] Accept: */* [http] Connection: keep-alive [http] "GET /remote.txt HTTP/1.1" 200 -
Avec une entité vers un fichier absent, le composant a échoué sur org.dom4j.DocumentException: C:\data\local\no-such-file.txt (Le fichier spécifié est introuvable) : il a bien cherché à l'ouvrir. Le texte des entités n'est pas arrivé dans les colonnes (la description valait null), mais un flux hostile peut faire contacter au job des adresses de son réseau. Ne lisez que des flux de sources de confiance, ou téléchargez-les d'abord (tFileFetch) pour les contrôler.
With an entity to a missing file, the component failed on org.dom4j.DocumentException: C:\data\local\no-such-file.txt (Le fichier spécifié est introuvable): it did try to open it. The text of the entities did not reach the columns (the description was null), but a hostile feed can make the job contact addresses of its network. Only read feeds from trusted sources, or download them first (tFileFetch) to check them.
Une adresse https:// est vérifiée par Java avec les certificats de confiance de la JVM du job. Pour un serveur à certificat interne, placez avant le composant un tSetKeystore qui désigne le magasin de confiance. Nos essais n'ont utilisé que HTTP.
An https:// address is checked by Java with the trusted certificates of the JVM of the job. For a server with an internal certificate, put before the component a tSetKeystore that names the trust store. Our runs only used HTTP.
Écrit entre guillemets, il est chiffré dans le code généré, mais la clé est livrée avec le job, et il est rangé en clair dans les propriétés système de Java, lisibles par tout composant du job. Comme Java 21 ne l'envoie pas (voir Le proxy SOCKS), laissez-le vide. Written in quotes, it is encrypted in the generated code, but the key ships with the job, and it is stored in clear in the Java system properties, readable by any component of the job. As Java 21 does not send it (see The SOCKS proxy), leave it empty.
Le composant ne règle aucun délai : un serveur qui accepte la connexion sans répondre bloque le job sans fin. Donnez à la JVM du job (arguments de l'exécution) -Dsun.net.client.defaultConnectTimeout=5000 et -Dsun.net.client.defaultReadTimeout=5000 (millisecondes) : lors de nos essais, le composant a alors échoué au bout de 5 s sur Read timed out. Ces propriétés valent pour toutes les connexions web du job.
The component sets no timeout: a server that accepts the connection without answering blocks the job forever. Give the JVM of the job (run arguments) -Dsun.net.client.defaultConnectTimeout=5000 and -Dsun.net.client.defaultReadTimeout=5000 (milliseconds): in our runs, the component then failed after 5 s on Read timed out. These properties apply to all the web connections of the job.
Pour un flux Atom, seule la date published est lue (pas updated, souvent la seule présente), et son fuseau est ignoré : l'heure est prise comme heure locale de la machine du job. À Paris en hiver, toutes les dates Atom de nos essais sont sorties une heure plus tôt qu'écrit, quel que soit leur décalage (voir l'exemple Atom). Le filtre lire les articles de travaille sur ces dates. Les dates RSS (pubDate) ont été lues correctement, avec leur fuseau.
For an Atom feed, only the published date is read (not updated, often the only one present), and its time zone is ignored: the time is taken as a local time of the machine of the job. In Paris in winter, all the Atom dates of our runs came out one hour earlier than written, whatever their offset (see the Atom example). The read articles from filter works on these dates. RSS dates (pubDate) were read correctly, with their time zone.
PUBDATE est un textePUBDATE is a text
La colonne est de type String, au format d MMM yyyy HH:mm:ss GMT en anglais, toujours en GMT. Pour trier ou comparer, convertissez-la en date avec ce motif, la langue anglaise et le fuseau GMT (par exemple dans un tMap ou un tJavaRow) ; une colonne vide reste à part.
The column is of type String, in the d MMM yyyy HH:mm:ss GMT format in English, always in GMT. To sort or compare, convert it to a date with this pattern, the English language and the GMT time zone (for example in a tMap or a tJavaRow); an empty column stays apart.
Un fichier écrit par un tRSSOutput se relit, mais sans date : il écrit <pubdate> en minuscules en RSS et <updated> en Atom, que ce composant ne lit pas. Ses articles sans lien sont écartés (voir Ce qui est lu).
A file written by a tRSSOutput can be read back, but without dates: it writes <pubdate> in lower case in RSS and <updated> in Atom, which this component does not read. Its items without a link are left out (see What is read).
Les autres composants de la famille Internet, et ceux qui servent avec le tRSSInput : The other components of the Internet family, and those used with the tRSSInput:
tRSSOutput · écrit un flux RSS ou Atom dans un fichierwrites an RSS or Atom feed to a filetFileFetch · télécharge un document web dans un fichierdownloads a web document to a filetHttpRequest · envoie une requête HTTP et reçoit sa réponsesends an HTTP request and receives its answertFileInputXML · lit d'autres éléments d'un flux téléchargéreads other elements of a downloaded feedtSetProxy · règle un proxy pour la suite du jobsets a proxy for the rest of the jobtLogRow · affiche les articles lusprints the items read