This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 133755 - BPEL project doesn't handle correctly referenced project with more than one nesting level
Summary: BPEL project doesn't handle correctly referenced project with more than one n...
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Project (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Kirill Sorokin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-23 11:26 UTC by Sergey Lunegov
Modified: 2008-10-15 23:20 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Testcase 01 (6.44 KB, application/x-compressed)
2008-08-07 12:30 UTC, Kirill Sorokin
Details
Testcase 02 (11.29 KB, application/x-compressed)
2008-08-07 12:30 UTC, Kirill Sorokin
Details
Testcase 03 (10.47 KB, application/x-compressed)
2008-08-07 12:31 UTC, Kirill Sorokin
Details
Testcase 04 (10.25 KB, application/x-compressed)
2008-08-07 12:31 UTC, Kirill Sorokin
Details
Testcase 05 (30.16 KB, application/x-compressed)
2008-08-07 12:32 UTC, Kirill Sorokin
Details
Testcase 06 (50.63 KB, application/x-compressed)
2008-08-07 12:32 UTC, Kirill Sorokin
Details
Testcase 07 (79.68 KB, application/x-compressed)
2008-08-07 12:32 UTC, Kirill Sorokin
Details
Testcase 08 (29.88 KB, application/x-compressed)
2008-08-07 12:33 UTC, Kirill Sorokin
Details
Testcase 09 (85.10 KB, application/x-compressed)
2008-08-07 12:33 UTC, Kirill Sorokin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Lunegov 2008-04-23 11:26:14 UTC
It is synchronous sample project. SynchronousSample.wsdl imports wsdl and xsd from BpelModule1. BpelModule1's w1.wsdl
imports wsdl and xsd from BpelModule2.

In this scenario catalog packaged with the SA is not complete.
Please refer to attached project.
Comment 1 Sergey Lunegov 2008-05-08 14:11:56 UTC
It means that artifacts will be gathered from all projects and copied to service unit.
Comment 2 Kirill Sorokin 2008-08-07 12:30:13 UTC
Created attachment 66790 [details]
Testcase 01
Comment 3 Kirill Sorokin 2008-08-07 12:30:41 UTC
Created attachment 66791 [details]
Testcase 02
Comment 4 Kirill Sorokin 2008-08-07 12:31:10 UTC
Created attachment 66792 [details]
Testcase 03
Comment 5 Kirill Sorokin 2008-08-07 12:31:38 UTC
Created attachment 66793 [details]
Testcase 04
Comment 6 Kirill Sorokin 2008-08-07 12:32:04 UTC
Created attachment 66794 [details]
Testcase 05
Comment 7 Kirill Sorokin 2008-08-07 12:32:36 UTC
Created attachment 66795 [details]
Testcase 06
Comment 8 Kirill Sorokin 2008-08-07 12:32:55 UTC
Created attachment 66796 [details]
Testcase 07
Comment 9 Kirill Sorokin 2008-08-07 12:33:16 UTC
Created attachment 66797 [details]
Testcase 08
Comment 10 Kirill Sorokin 2008-08-07 12:33:51 UTC
Created attachment 66798 [details]
Testcase 09
Comment 11 Kirill Sorokin 2008-08-07 12:45:46 UTC
The new algorithm is as follows:

1) Find out the project directory of the project being built and it correponding 'src' and 'build' directories
2) Parse the project catalog, find all the required namespaces and the corresponding locations
3) For each of the locations:
   3.1) If the location is a relative path (no scheme in the uri):
      3.1.1) If it's within the sources directory, leave the file as is, correct the URI and add it to the built catalog
      3.1.2) If it's within 'nbproject/private/cache/retriever', copy the file to '<build>/_references/_cache', correct
the URI  and add it to the built catalog
      3.1.3) If it's within 'retrieved', copy the file to '<build>/_references/_retrieved', correct the URI and add it
to the built catalog
      3.1.4) If it's simply a relative path, copy the file to '<build>/_references/_relative', correct the URI and add
it to the built catalog
   3.2) If the location is a 'nb-uri' URI (scheme is 'nb-uri'):
      3.2.1) Find out the project the referenced file belongs to
      3.2.2) Copy the file to '<build>/_references/_projects/<referenced-project-dirname>/<path-within-project>',
correct the URI and add it to the built catalog
      3.2.3) Parse the project catalog of the referenced project
      3.2.4) Parse the import statements of the file
      3.2.5) For each of the imports:
         3.2.5.1) If the import location is present in the referenced project's catalog, parse the correct location
            3.2.5.1.1) If the correct location is a relative path
               3.2.5.1.1.1) If the correct location is within '<referenced-project>/src', copy the file to
'<build>/_references/_projects/<referenced-project-dirname>/src', correct the URI and add it to the built catalog
                  3.2.5.1.1.1.1) Do the same as in 3.2.4
               3.2.5.1.1.2) If the correct location is within '<referenced-project>/nbproject/private/cache/retriever',
copy the file to '<build>/_references/_projects/<referenced-project-dirname>/_references/_cache', correct the URI and
add it to the built catalog
                  3.2.5.1.1.2.1) Do the same as in 3.2.4
               3.2.5.1.1.3) If the correct location is within '<referenced-project>/retrieved', copy the file to
'<build>/_references/_projects/<referenced-project-dirname>/_references/_retrieved', correct the URI and add it to the
built catalog
                  3.2.5.1.1.3.1) Do the same as in 3.2.4
               3.2.5.1.1.4) If the correct location is a relative path, copy the file to
'<build>/_references/_projects/<referenced-project-dirname>/_references/_relative'
                  3.2.5.1.1.4.1) Do the same as in 3.2.4
            3.2.5.1.2) If the correct location is a 'nb-uri' URI, do the same as in 3.2.1
            3.2.5.1.3) Else display an error and fail the build
         3.2.5.2) Else if the location is a relative path
            3.2.5.2.1) If the location is within '<referenced-project>/', copy the file to
'<build>/_references/_projects/<referenced-project-dirname>/<path-within-project>'
               3.2.5.2.1.1) Do the same as in 3.2.4
            3.2.5.2.2) Else copy the file to
'<build>/_references/_projects/<referenced-project-dirname>/_references/_relative', correct 
                  the URI and add it to the built catalog
               3.2.5.2.2.1) Do the same as in 3.2.4
         3.2.5.2) Else display an error and fail the build
   3.4) Else display an error and fail the build
   
Comment 12 Kirill Sorokin 2008-08-07 13:11:13 UTC
Changeset in {main}: http://hg.netbeans.org/main/rev/7dd82f7aee7b
Comment 13 Kirill Sorokin 2008-08-07 13:39:16 UTC
Changeset in {soa-dev}: http://hg.netbeans.org/soa-dev/rev/c59d6cc8bed1

Fixed.
Comment 14 Quality Engineering 2008-08-08 04:33:14 UTC
Integrated into 'main-golden', available in build *200808080201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/7dd82f7aee7b
User: Kirill Sorokin <ksorokin@netbeans.org>
Log: Fix for #133755. Serously reworked the algorithm for generating the xml catalog and packaging the referenced xml artifacts in BPEL project.
Comment 15 ggenipudi 2008-10-13 18:29:12 UTC
please provide the steps to verify the fix.
Comment 16 Kirill Sorokin 2008-10-15 11:14:02 UTC
The verification is quite tricky here. You might want to use the attached 9 test cases, build the BPEL processes in them
and then examine the contents of the <project>/build directories. They should contain META-INF/catalog.xml which should
point to correct locations.

In other words the attached projects use referenced resources (their BPEL/WSDL/XSDs use resources which are resolved via
<project>/catalog.xml). These references should still be correct upon building.
Comment 17 ggenipudi 2008-10-15 23:20:01 UTC
Tested and verified using NetBeans IDE 6.5 RC1 (Build 200810151402) and build all the attached projects and verified the
catalog.xml that was generated and it was all correct.

contents of catalog.xml

test1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
</catalog>

test 2 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd" uri="src/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd" uri="src/www.w3.org/2001/xml.xsd"/>
</catalog>

test3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="http://www.webservicex.com/CurrencyConvertor.asmx?wsdl"
uri="src/_references/_cache/www.webservicex.com/CurrencyConvertor.asmx.wsdl"/>
</catalog>

test4
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="http://www.webservicex.com/CurrencyConvertor.asmx?wsdl"
uri="src/_references/_retrieved/src/www.webservicex.com/CurrencyConvertor.asmx.wsdl"/>
</catalog>


test5
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="BpelModule1/www.uddi.org/schema/uddi_v2.xsd"
uri="src/_references/_projects/BpelModule1/src/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd"
uri="src/_references/_projects/BpelModule1/src/www.w3.org/2001/xml.xsd"/>
</catalog>

bpelmodule1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd" uri="src/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd" uri="src/www.w3.org/2001/xml.xsd"/>
</catalog>

test6
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule1/newWSDL.wsdl" uri="src/_references/_projects/BpelModule1/src/newWSDL.wsdl"/>
    <system systemId="testcase-06-BpelModule2/newXmlSchema.xsd"
uri="src/_references/_projects/BpelModule2/src/newXmlSchema.xsd"/>
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
</catalog>

bpelmodule1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule2/newXmlSchema.xsd"
uri="src/_references/_projects/BpelModule2/src/newXmlSchema.xsd"/>
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
</catalog>

bpelmodule2
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
</catalog>

bpelmodule3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="http://maven.apache.org/maven-v4_0_0.xsd" uri="src/maven.apache.org/maven-v4_0_0.xsd"/>
</catalog>

test7
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule1/newWSDL.wsdl" uri="src/_references/_projects/BpelModule1/src/newWSDL.wsdl"/>
    <system systemId="http://www.webservicex.com/CurrencyConvertor.asmx?wsdl"
uri="src/_references/_projects/BpelModule1/_references/_cache/www.webservicex.com/CurrencyConvertor.asmx.wsdl"/>
    <system systemId="testcase-06-BpelModule2/newXmlSchema.xsd"
uri="src/_references/_projects/BpelModule2/src/newXmlSchema.xsd"/>
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.w3.org/2001/xml.xsd"/>
</catalog>

bpelmodule1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule2/newXmlSchema.xsd"
uri="src/_references/_projects/BpelModule2/src/newXmlSchema.xsd"/>
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.w3.org/2001/xml.xsd"/>
    <system systemId="http://www.webservicex.com/CurrencyConvertor.asmx?wsdl"
uri="src/_references/_cache/www.webservicex.com/CurrencyConvertor.asmx.wsdl"/>
</catalog>

bpelmodule2
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd" uri="src/_references/_cache/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd" uri="src/_references/_cache/www.w3.org/2001/xml.xsd"/>
</catalog>

bpelmodule3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="http://maven.apache.org/maven-v4_0_0.xsd" uri="src/maven.apache.org/maven-v4_0_0.xsd"/>
</catalog>


test8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-08-BpelModule1/newWSDL.wsdl" uri="src/_references/_projects/BpelModule1/src/newWSDL.wsdl"/>
    <system systemId="testcase-08-BpelModule1/newXmlSchema.xsd"
uri="src/_references/_projects/BpelModule1/src/newXmlSchema.xsd"/>
</catalog>


module1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
</catalog>


test 9
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule1/newWSDL.wsdl" uri="src/_references/_projects/BpelModule1/src/newWSDL.wsdl"/>
    <system systemId="http://www.webservicex.com/CurrencyConvertor.asmx?wsdl"
uri="src/_references/_projects/BpelModule1/_references/_cache/www.webservicex.com/CurrencyConvertor.asmx.wsdl"/>
    <system systemId="testcase-06-BpelModule2/newXmlSchema.xsd"
uri="src/_references/_projects/BpelModule2/src/newXmlSchema.xsd"/>
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
    <system systemId="../../../newXmlSchema1.xsd"
uri="src/_references/_projects/BpelModule3/_references/_relative/__/__/__/newXmlSchema1.xsd"/>
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.w3.org/2001/xml.xsd"/>
</catalog>

module1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule2/newXmlSchema.xsd"
uri="src/_references/_projects/BpelModule2/src/newXmlSchema.xsd"/>
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
    <system systemId="../../../newXmlSchema1.xsd"
uri="src/_references/_projects/BpelModule3/_references/_relative/__/__/__/newXmlSchema1.xsd"/>
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd"
uri="src/_references/_projects/BpelModule2/_references/_cache/www.w3.org/2001/xml.xsd"/>
    <system systemId="http://www.webservicex.com/CurrencyConvertor.asmx?wsdl"
uri="src/_references/_cache/www.webservicex.com/CurrencyConvertor.asmx.wsdl"/>
</catalog>


module2
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="testcase-06-BpelModule3/maven.apache.org/maven-v4_0_0.xsd"
uri="src/_references/_projects/BpelModule3/src/maven.apache.org/maven-v4_0_0.xsd"/>
    <system systemId="../../../newXmlSchema1.xsd"
uri="src/_references/_projects/BpelModule3/_references/_relative/__/__/__/newXmlSchema1.xsd"/>
    <system systemId="http://www.uddi.org/schema/uddi_v2.xsd" uri="src/_references/_cache/www.uddi.org/schema/uddi_v2.xsd"/>
    <system systemId="http://www.w3.org/2001/xml.xsd" uri="src/_references/_cache/www.w3.org/2001/xml.xsd"/>
</catalog>

module3

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="http://maven.apache.org/maven-v4_0_0.xsd" uri="src/maven.apache.org/maven-v4_0_0.xsd"/>
</catalog>