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 175754 - Inconsistence in using schemas from BPEL Global Catalog
Summary: Inconsistence in using schemas from BPEL Global Catalog
Status: RESOLVED WORKSFORME
Alias: None
Product: xml
Classification: Unclassified
Component: Retriever (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Nikita Krjukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-30 11:35 UTC by Vitaly Bychkov
Modified: 2010-04-12 11:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample projects (66.86 KB, application/zip)
2009-12-03 14:28 UTC, Vitaly Bychkov
Details
Test project (39.45 KB, application/x-compressed)
2009-12-10 04:03 UTC, Vladimir Yaroslavskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Bychkov 2009-10-30 11:35:03 UTC
Inconsistence in using schemas from BPEL Global Catalog.
Steps to reproduce:
1. Create Synchronous sample
2. open Synchronous.bpel
3. Add new "service-ref" element Variable (Add Varable - choose Bpel Global
Catalog/"http://docs.oasis-open.org/wsbpel/2.0/serviceref"/Global Elements/service-ref - press OK)
(Correct nbproject/private/cache/retriever/catalog.xml if required - see
http://www.netbeans.org/issues/show_bug.cgi?id=175650)

As a result the schema service-ref have been added to the catalog.xml and import uses external schema location but
resolves it using catalog.xml

4. Add new "EndpointRefernce" element Variable (Add Varable - choose Bpel Global
Catalog/"http://schemas.xmlsoap.org/ws/2004/08/addressing"/Global Elements/EndpointReference - press OK)

See the addressing.xsd file is appeared in project source and import uses local schema location to resolve it.
Comment 1 Vladimir Yaroslavskiy 2009-11-10 03:16:51 UTC
fixed in gfesbv22: 2d3291a99658
Comment 2 Vitaly Bychkov 2009-12-03 14:27:38 UTC
Currently schema resolver doesn't retrives ws-addressing schema at all.
It doesn't even register them in catalog.xml.

See attached project.

Steps to reproduce:
1. create Synchronous Sample
2. open Synchronous.bpel
3. add variable(Variable1) of ws-addressing/EndpointReference element
Check that the import had been added
(    <import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" location="http://schemas.xmlsoap.org/ws/2004/08/addressing" importType="http://www.w3.org/2001/XMLSchema"/>
)
4. add variable(Sref) of service-ref element
Check that the import had been added
(    <import namespace="http://docs.oasis-open.org/wsbpel/2.0/serviceref" location="http://docs.oasis-open.org/wsbpel/2.0/OS/serviceref/ws-bpel_serviceref.xsd" importType="http://www.w3.org/2001/XMLSchema"/>
)
5. add Assign2 where assign Left Tree/Partner Links/Synchronous/myRole to RightTree/Variables/Sref
6. add Assign2 where:
- cast Left Tree/Sref/Any Element to ws-addressing/EndpointReferenceType
- assign Left Tree/Sref/(EndpointReferenceType)Any Element to RightTree/Variables/Variable1

Clean and build works ok, but project catalog.xml doesn't have ws-addresing just service-ref.

As a result deployment is failed because there is no ws-addressing schema in resulted jar.
Comment 3 Vitaly Bychkov 2009-12-03 14:28:39 UTC
Created attachment 92072 [details]
Sample projects
Comment 4 Vladimir Yaroslavskiy 2009-12-10 04:02:16 UTC
1. NetBeans (xml.retriever) doesn't retrieve documents if it finds
   it in [BPEL] Global catalog, exception only for documents which
   have different id and location. In BPEL Global catalog there is
   one such schema ServiceRef, see:

 id: http://docs.oasis-open.org/wsbpel/2.0/serviceref
loc: http://docs.oasis-open.org/wsbpel/2.0/OS/serviceref/ws-bpel_serviceref.xsd

Therefore the ServiceRef schema will be retrieved and saved in project
catalog.xml, all other documents from BPEL Global catalog will not be
retrieved. It is behaviour of XML retriever in core of NetBeans.

2. Deployment fails even WS-addressing schema is added as remote
   resource and retrieved successfully, steps to reproduce
   (you can use attached sample project):

- Create Synchronous sample
- Add remote resource "http://schemas.xmlsoap.org/ws/2004/08/addressing"
- Add variable of element from the schema: select in opened dialog
  Referenced Resources | http://schemas.xmlsoap.org/ws/2004/08/addressing |
  Global Elements | EndpointReference
- Clean and Build the BPEL project: BUILD SUCCESSFUL (no problem with
  the schema on design time side)
- [Clean and Build, Undeploy,] Deploy the comapp project SynchronousApplication

see error message:

ERROR: Successful execution of Start: SynchronousApplication
WARNING: (JBIMA0405) Start of service assembly SynchronousApplication succeeded partially; some service units failed to start.
    * Component: sun-bpel-engine
      ERROR: (BPJBI-4001: BPELSE) BPJBI-7004: Service unit SynchronousApplication-Synchronous failed to load deployment D:\Work\soft\app\domains\domain1\jbi\service-assemblies\SynchronousApplication\SynchronousApplication-Synchronous\sun-bpel-engine : BPJBI-6024: Error while loading BPEL file D:\Work\soft\app\domains\domain1\jbi\service-assemblies\SynchronousApplication\SynchronousApplication-Synchronous\sun-bpel-engine\Synchronous.bpel, Exception details are Cannot parse BPEL (see below):
==> Cannot load imported document  (see below):
==> Unable to import xsd document for import  (see below):
==> Failed to parser xsd document publicId = http://schemas.xmlsoap.org/ws/2004/08/addressing systemId = http://schemas.xmlsoap.org/ws/2004/08/addressing resolved URL null (see below):
==> Failed to parser xsd document file:/D:/Work/soft/app/domains/domain1/jbi/service-assemblies/SynchronousApplication/SynchronousApplication-Synchronous/sun-bpel-engine/META-INF/src/_references/_cache/schemas.xmlsoap.org/ws/2004/08/addressing.xsd (see below):
==> D:\Work\soft\app\domains\domain1\jbi\service-assemblies\SynchronousApplication\SynchronousApplication-Synchronous\sun-bpel-engine\META-INF\src\_references\_cache\schemas.xmlsoap.org\ws\2004\08\addressing.xsd:1:1: error: Unexpected element: CDATA
    * Component: sun-http-binding
      INFO: (JBIMA0409) Lifecycle operation start succeeded for Service Unit SynchronousApplication-sun-http-binding.

Reassigning to Comp App category.
Comment 5 Vladimir Yaroslavskiy 2009-12-10 04:03:17 UTC
Created attachment 92380 [details]
Test project
Comment 6 Vitaly Bychkov 2009-12-10 05:03:34 UTC
The problem in case using remote ws-addresing schema is another issue - https://open-esb.dev.java.net/issues/show_bug.cgi?id=1128.

At a glance the ws-addresing schema placed on the remote resource contains special symbols at the begining of the file - Byte Order Mask. These symbols is the case of problem at runtime side. But ws-addressing schema stored in Bpel Global Catalog doesn't have BOM. More over schema retriever have to use system catalog at first and just after this it can look for the resource outside netbeans.
Comment 7 Vladimir Yaroslavskiy 2009-12-10 05:11:42 UTC
Request to retriever:

NetBeans retriever has to use system catalog at first and just after this it can look for the resource outside NetBeans.
Comment 8 Nikita Krjukov 2010-04-12 11:15:06 UTC
I investigated the problem and found that XML retriever takes the mentioned "serviceref" and "addressing" from global catalog only. It doesn't try to load them from Internet at all. 

Also they aren't added to project's catalog.xml file. So each time they are requested, they are retrieved from global catalog. 

I suppose, that some specific conditions or steps are required to reproduce the bug. So I'm going to close it now as WORKSFORME.