This discussion is archived
3 Replies Latest reply: Jan 17, 2013 4:57 AM by Arik RSS

Extract contents of a zip file in BPEL SOA 10g

Santosh M E Explorer
Currently Being Moderated
Hi all,

My use case is, trying to implement a BPEL service which will take the .zip folder location and output folder location as a input and it extract contents of a zip file in ouput folder location.
for this use case i have developed java code to unzip the contents, But how to call this Java class in BPEL process Java Embedding activity in 10g??

if its 11g i would try by keeping .jar in SCA-INF/lib, but how to do it in 10g??

Please any suggestions?

Thanks,
Santosh
  • 1. Re: Extract contents of a zip file in BPEL SOA 10g
    Arik Expert
    Currently Being Moderated
    Hi Santosh,

    You can add a class within your BPEL project: Right click on Application Source folder->Under General choose java class.
    After the class/package was generated, use the below code, AS AN EXAMPLE, within the Java Embedded activity:


    Element fe = (Element)getVariableData("var","/ns1:rec/ns1:fileName");
    Element de = (Element)getVariableData("var","/ns1:rec/ns1:directory");
    String folderName = fe.getTextContent();
    String directoryName = de.getTextContent();

    /*Here you can call you class – in my case it's call Unzip, and it gets 1 parameter*/
    Unzip.unzipFile(directoryName + "//" + folderName);


    Also, import the created package & Element decleration(if you will use it as in the example)
    <bpelx:exec import="org.w3c.dom.Element"/>
    <bpelx:exec import="BusinessProcess.*"/>

    Put it in your bpel source (you can add it prior to the Partner Links declaration)

    Arik
  • 2. Re: Extract contents of a zip file in BPEL SOA 10g
    Santosh M E Explorer
    Currently Being Moderated
    Hi Arik,

    I tried the same, but when i build the project getting below error,

    Error: Java compilation failed.
    Failed to compile file(s) "UnzipTest.bpel".
    Exception reported is: UnzipTest.bpel:81: Class bpel.unziptest.UnzipUtility not found.
    UnzipUtility unz =new UnzipUtility();
    ^
    UnzipTest.bpel:81: Class bpel.unziptest.UnzipUtility not found.
    UnzipUtility unz =new UnzipUtility();
    ^
    2 errors

    Please verify that file UnzipTest.bpel is valid java file or if all required libraries are included in your classpath.
    classpath: ..\..\..\classes;..\..\ide\lib\javax-ide.jar;..\..\ide\lib\javatools.jar;..\..\ide\lib\ide.jar;..\..\jlib\jewt4.jar;..\..\jlib\share.jar;..\..\jlib\help4.jar;..\..\jlib\inspect4.jar;..\..\lib\xmlparserv2.jar;..\..\jdbc\lib\orai18n.jar;..\lib\jdev-ep.jar;..\..\jdk\lib\tools.jar;..\..\jdk\lib\dt.jar;..\lib\ext\jaxen-1.1-beta-4.jar;..\extensions\oracle.ide.10.1.3.jar;..\..\jlib\ojmisc.jar;..\extensions\oracle.jdeveloper.10.1.3.jar;..\lib\jdev.jar;..\lib\ojc.jar;..\..\jlib\regexp.jar;..\..\ant\lib\ant.jar;..\..\ant\lib\ant-nodeps.jar;..\..\jlib\oracle_ice.jar;..\..\jlib\xmlef.jar;..\..\jlib\backport-util-concurrent.jar;..\lib\xmleditor.jar;..\lib\xmladdin.jar;..\..\lib\xml.jar;..\..\lib\xquery.jar;..\extensions\oracle.j2ee.10.1.3.jar;..\..\jdbc\lib\ojdbc14.jar;..\..\jdbc\lib\orai18n.jar;..\..\jlib\jdev-cm.jar;..\..\toplink\jlib\toplink.jar;..\..\toplink\jlib\toplink-oc4j.jar;..\..\toplink\jlib\antlr.jar;..\..\j2ee\home\oc4j.jar;..\..\j2ee\home\oc4jclient.jar;..\..\j2ee\home\admin_client.jar;..\..\j2ee\home\lib\oc4j-unsupported-api.jar;..\..\j2ee\home\lib\servlet.jar;..\lib\tl_mappingeditor.jar;..\..\jlib\commons-el.jar;..\..\jlib\jsp-el-api.jar;..\..\jlib\oracle-el.jar;..\..\webservices\lib\soap.jar;..\..\lib\xmlmesg.jar;..\..\lib\xsu12.jar;..\..\webservices\lib\wsdl.jar;..\..\webservices\lib\orawsdl.jar;..\..\webservices\lib\wsa.jar;..\..\webservices\lib\wsclient.jar;..\..\webservices\lib\jws-api.jar;..\..\webservices\lib\orawsmetadata.jar;..\..\j2ee\home\lib\http_client.jar;..\..\jlib\jssl-1_1.jar;..\..\uddi\lib\uddiclient.jar;..\..\xdoclet-1.2.1\commons-logging.jar;..\..\xdoclet-1.2.1\xdoclet-1.2.1.jar;..\..\xdoclet-1.2.1\xjavadoc-1.0.3.jar;..\lib\batik-ext.jar;..\..\javavm\lib\aurora.zip;..\..\j2ee\home\lib\ojsp.jar;..\..\j2ee\home\jsp\lib\taglib\ojsputil.jar;..\..\diagnostics\lib\ojdl.jar;..\..\lib\dms.jar;..\..\adfrc\lib\jr_dav.jar;..\..\sqlj\lib\translator.jar;..\..\sqlj\lib\runtime12.jar;..\..\rdbms\jlib\ojdi.jar;..\..\rdbms\jlib\xdb.jar;..\..\j2ee\utilities\ant-oracle-classes.jar;..\extensions\oracle.faces.dt.10.1.3.jar;..\extensions\oracle.jdeveloper.jgoodies.1.0.4.jar;..\extensions\oracle.jdeveloper.jgoodies.1.0.4\forms-1.0.4.jar;..\extensions\oracle.bm.10.1.3.jar;..\lib\batik-awt-util.jar;..\lib\batik-dom.jar;..\lib\batik-svggen.jar;..\lib\batik-transcoder.jar;..\lib\batik-util.jar;..\lib\batik-xml.jar;..\lib\batik-bridge.jar;..\lib\batik-css.jar;..\lib\batik-gui-util.jar;..\lib\batik-gvt.jar;..\lib\batik-parser.jar;..\lib\batik-script.jar;..\lib\batik-svg-dom.jar;..\lib\tsgdtj50.jar;..\lib\tsgetj50.jar;..\lib\tsgltjava50.jar;..\lib\tsgmtj50.jar;..\lib\jdukshare.jar;..\lib\mof.jar;..\lib\bm.jar;..\extensions\oracle.BC4J.10.1.3.jar;..\..\BC4J\lib\adfbinding.jar;..\..\BC4J\jlib\adfmant.jar;..\..\BC4J\lib\adfm.jar;..\..\BC4J\jlib\adfui.jar;..\..\BC4J\jlib\adfmtl.jar;..\..\BC4J\lib\bc4jmt.jar;..\..\BC4J\lib\bc4jmtejb.jar;..\..\BC4J\lib\bc4jimdomains.jar;..\..\BC4J\jlib\bc4jtester.jar;..\..\BC4J\lib\bc4jct.jar;..\..\BC4J\lib\bc4jdomorcl.jar;..\..\BC4J\lib\collections.jar;..\..\BC4J\jlib\bc4jui.jar;..\..\BC4J\jlib\adfmmeta.jar;..\..\ord\jlib\ordhttp.jar;..\..\ord\jlib\ordim.jar;..\..\jlib\LW_PfjBean.jar;..\lib\velocity-dep-1.3.jar;..\..\j2ee\home\jazn.jar;..\..\j2ee\home\jazncore.jar;..\..\BC4J\lib\adfshare.jar;..\..\mds\lib\mdsrt.jar;..\extensions\oracle.adf.security.10.1.3.jar;..\extensions\oracle.jdeveloper.vcs.10.1.3.jar;..\extensions\oracle.jviews-registration.10.1.3.jar;..\..\jviews\jviews-framework-lib.jar;..\extensions\oracle.bpm.mapper.10.1.3.jar;..\..\integration\lib\bpm-ide-common.jar;..\..\integration\lib\xsu12.jar;..\..\integration\lib\xerces.jar;..\..\integration\lib\commons-codec-1.3.jar;..\extensions\oracle.jsfmod.10.1.3.jar;..\lib\adfcdt.jar;..\lib\jsfmod_j2ee.jar;..\extensions\oracle.wireless.dt.10.1.3.jar;..\..\wireless\lib\deviceRepository.jar;..\extensions\oracle.adfm.dt.faces.10.1.3.jar;..\..\adfdt\lib\adfdt_common.jar;..\..\adfdt\lib\adfdt_jdev.jar;..\extensions\oracle.vcr.10.1.3.jar;..\..\content\lib\content-jcr.jar;..\..\content\lib\content-ws-client.jar;..\..\content\lib\jcr\ojcr.jar;..\..\content\lib\axis\axis.jar;..\..\content\lib\axis\wsdl4j-1.5.1.jar;..\..\content\lib\axis\commons-discovery-0.2.jar;..\..\content\lib\wss4j\bcprov-jdk13-128.jar;..\..\content\lib\wss4j\opensaml-1.0.1.jar;..\..\content\lib\wss4j\wss4j-patched.jar;..\..\content\lib\wss4j\xalan-2.6.0-patched.jar;..\..\content\lib\wss4j\xmlsec-1.2.1-patched.jar;..\..\j2ee\home\lib\mail.jar;..\..\j2ee\home\lib\activation.jar;..\..\webservices\lib\saaj-api.jar;..\..\webservices\lib\jaxrpc-api.jar;..\..\webservices\lib\commons-logging.jar;..\..\adfp\lib\oracle.vcr.adapter.portal.jar;..\..\adfp\lib\oracle.vcr.adapter.fs.jar;..\..\adfp\lib\vcrdav.jar;..\..\adfp\lib\oracle.vcr.jam.jar;..\..\adfp\lib\vcrshare.jar;..\..\adfp\lib\oracle.vcr.datacontrol.jar;..\..\adfp\lib\cis-client-8.0.0.jar;..\..\adfp\lib\jcr-stellent-adapter.jar;..\..\BC4J\lib\adfcm.jar;..\..\BC4J\lib\adfs.jar;..\..\lib\xmlparserv2.jar;..\..\jdbc\lib\ojdbc14dms.jar;..\..\jdbc\lib\ocrs12.jar;..\..\javacache\lib\cache.jar;..\..\adfp\lib\jcr-1.0.jar;..\extensions\oracle.adf.installer.10.1.3.jar;..\extensions\oracle.java.help.10.1.3.jar;..\extensions\oracle.j2ee.help.10.1.3.jar;..\extensions\oracle.extapp.10.1.3.jar;..\..\adfp\lib\oracle.extapp.runtime.jar;..\..\jlib\jewt4.jar;..\..\ide\lib\ide.jar;..\..\ide\lib\javatools.jar;..\..\adfp\lib\portlet-client-mds.jar;..\..\adfp\lib\adfp-dt-share.jar;..\extensions\oracle.adfp.portlet.10.1.3.jar;..\..\adfp\lib\adfPortletsdt.jar;..\..\adfp\lib\portlet-client-core.jar;..\..\adfp\lib\portlet-client-web.jar;..\..\adfp\lib\portlet-client-wsrp.jar;..\..\adfp\lib\portlet-client-deploy.jar;..\..\adfp\lib\dom4j.jar;..\..\adfp\lib\tidy.jar;..\..\adfp\lib\wsrp-types.jar;..\..\adfp\lib\wsrp-stubs.jar;..\..\adfp\lib\wsrp-jaxb.jar;..\..\adfp\lib\jaxb-api.jar;..\..\adfp\lib\jaxb-impl.jar;..\..\adfp\lib\jaxb-libs.jar;..\..\adfp\lib\namespace.jar;..\..\adfp\lib\wsrp-predeploy.jar;..\..\webservices\lib\wsserver.jar;..\..\webservices\lib\orasaaj.jar;..\..\webservices\lib\mdds.jar;..\..\webservices\lib\wssecurity.jar;..\..\webservices\lib\orawsrm.jar;..\..\webservices\lib\xsdlib.jar;..\..\BC4J\jlib\adf-connections.jar;..\lib\jdev-rt.jar;..\..\jlib\javax-ssl-1_1.jar;..\..\jlib\adf-faces-api.jar;..\..\jlib\adf-faces-impl.jar;..\..\jsf-ri\jsf-api.jar;..\extensions\oracle.bpm.workflow.10.1.3.jar;..\extensions\oracle.bpm.modeler.10.1.3.jar;..\..\integration\lib\bpm-infra.jar;..\..\integration\lib\bpm-services.jar;..\..\integration\lib\bpm-services-dc.jar;..\..\integration\lib\connector15.jar;..\..\integration\lib\DBAdapter.jar;..\..\integration\lib\orabpel.jar;..\..\integration\lib\orabpel-ant.jar;..\..\integration\lib\orabpel-boot.jar;..\..\integration\lib\orabpel-common.jar;..\..\integration\lib\orabpel-thirdparty.jar;..\..\integration\lib\oracle_http_client.jar;..\..\integration\lib\bpm_modeler_images.jar;..\..\integration\bpm\support\files\;..\..\integration\lib\bpa.jar;..\extensions\oracle.jdeveloper.cvs.10.1.3.jar;..\lib\jsch.jar;..\extensions\oracle.adfp.dt.custcomps.10.1.3.jar;..\extensions\oracle.adfm.dc-adapters.10.1.3.jar;..\..\jlib\share.jar;..\..\BC4J\jlib\dc-adapters.jar;..\..\j2ee\home\lib\asm.jar;..\..\j2ee\home\lib\asm-attrs.jar;..\..\integration\lib\esbprotocol.jar;..\..\integration\lib\rl.jar;..\..\integration\lib\webdavrc.jar;..\..\integration\lib\rulesdk.jar;..\..\integration\lib\bpa-util.jar;..\..\integration\lib\bpaserver_jars\cl_scriptrunner.jar;..\..\integration\lib\bpaserver_jars\cscommon.jar;..\..\integration\lib\bpaserver_jars\cltech.jar;..\..\integration\lib\bpaserver_jars\cl_wcp.jar;..\..\integration\lib\bpaserver_jars\common.jar;..\..\integration\lib\bpaserver_jars\common_locale.jar;..\..\integration\lib\bpaserver_jars\common_locale_en.jar;..\..\integration\lib\bpaserver_jars\fr_gui.jar;..\..\integration\lib\bpaserver_jars\kxml2.jar;..\..\integration\lib\bpaserver_jars\orbacus.4.3.1.jar;..\..\integration\lib\bpaserver_jars\utils.jar;..\extensions\oracle.esb.modeler.10.1.3.jar;..\..\integration\lib\esbxbean.jar;..\..\integration\lib\xbean.jar;..\..\integration\lib\jsr173_1.0_api.jar;..\..\jviews\jviews-diagrammer.jar;..\extensions\oracle.portlets.10.1.3.jar;..\..\adfp\lib\pdkjava.jar;..\..\adfp\lib\ptlshare.jar;..\..\adfp\lib\oracle-portlet-tags.jar;..\..\adfp\lib\wsrp-container.jar;..\extensions\oracle.studio.help.10.1.3.jar;..\extensions\oracle.webcache.10.1.3.jar;..\extensions\oracle.struts.10.1.3.jar;..\lib\struts_j2ee.jar;..\extensions\oracle.adfp.seededoc4j.10.1.3.jar;..\extensions\oracle.bibeans.10.1.3.jar;..\..\jlib\bigraphbean.jar;..\..\jlib\bigraphbean-nls.zip;..\extensions\oracle.struts.adf.10.1.3.jar;..\lib\struts_adf.jarC:\Program Files\jdevstudio10134\jdk\jre\lib\rt.jar;C:\Program Files\jdevstudio10134\jdk\jre\lib\i18n.jar;C:\Program Files\jdevstudio10134\jdk\jre\lib\sunrsasign.jar;C:\Program Files\jdevstudio10134\jdk\jre\lib\jsse.jar;C:\Program Files\jdevstudio10134\jdk\jre\lib\jce.jar;C:\Program Files\jdevstudio10134\jdk\jre\lib\charsets.jar;C:\Program Files\jdevstudio10134\jdk\jre\classes;C:\Program Files\jdevstudio10134\jdev\mywork\AIA_Application\UnzipTest\output;C:\Program Files\jdevstudio10134\integration\lib\orabpel-ant.jar;C:\Program Files\jdevstudio10134\integration\lib\orabpel-boot.jar;C:\Program Files\jdevstudio10134\integration\lib\orabpel-common.jar;C:\Program Files\jdevstudio10134\integration\lib\orabpel-thirdparty.jar;C:\Program Files\jdevstudio10134\integration\lib\orabpel.jar;C:\DOCUME~1\SMESHW~1\LOCALS~1\Temp\bpelc4629.tmp\BPEL-INF\lib\bpelclasses.jar



    And below mentioned java code i am using in Java embedding activity,

    UnzipUtility unz =new UnzipUtility();
    String INPUT_ZIP_FILE = (String)getVariableData("ZipFilePath");
    String OUTPUT_FOLDER = (String)getVariableData("OutputFolder");
    unz.unzip(ZipFilePath, OutputFolder);

    can u help me for this error??

    -Santosh
  • 3. Re: Extract contents of a zip file in BPEL SOA 10g
    Arik Expert
    Currently Being Moderated
    Hi Santosh,

    Did you add the import tag into your source code?
    If so maybe try to add . in the end of the package name.
    Something like that:
    <bpelx:exec import="org.w3c.dom.Element"/>
    <bpelx:exec import="BusinessProcess*"/>
    > <!--
    > ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    > PARTNERLINKS
    > List of services participating in this BPEL process
    > ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    >-->

    Arik

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points