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 114803 - XPath validation: bpel editor validation should mark/report as error a qualified element in an expression if the schema has the elemetFormDefault attribute as unqualified
Summary: XPath validation: bpel editor validation should mark/report as error a qualif...
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-05 18:13 UTC by pvarghese
Modified: 2008-04-16 15:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
the bpel project zip file (12.59 KB, application/octet-stream)
2007-09-05 18:16 UTC, pvarghese
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pvarghese 2007-09-05 18:13:31 UTC
Netbeans build: netbeans-hudson-trunk-2908.zip

Issue:
BPEL editor validation should mark/report as error a qualified element in an expression if the schema has the 
elemetFormDefault attribute as unqualified. Today it marks such cases as warnings and the subsequent deployment of the
project results in runtime failure.

consider the following schema definition 
    <types>
        <xsd:schema targetNamespace="http://xml.netbeans.org/schema/newXMLSchema"
xmlns:tns1="http://xml.netbeans.org/schema/newXMLSchema">
            <xsd:element name="corrElement">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Id1" type="xsd:int"></xsd:element>
                        <xsd:element name="Id2" type="xsd:int"></xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </types>
Notice that the elementFormDefault attribute is not defined and hence is the default 'Unqualified'.

In the bpel if the mappings involving these nodes are however qualified(either import of legacy projects or user
manually provides the qualification), as the example shows below.

        <assign name="Assign1">
            <copy>
                <from>$NewWSDLOperationIn.part1/ns2:Id1</from>
                <to>$NewWSDLOperationOut.part1/ns2:Id1</to>
            </copy>
            <copy>
                <from>$NewWSDLOperationIn.part1/ns2:Id2</from>
                <to>$NewWSDLOperationOut.part1/ns2:Id2</to>
            </copy>
        </assign>

the nodes 'Id1' and Id2' are qualified. The editor currently shows the following warnings, that should be converted to
errors and the user should be made to correct the errors before he can deploy this project.

From: The element "Id2" is unqualified and has to be without a namespace prefix. Expression:
"$NewWSDLOperationIn.part1/ns2:Id2"
 
From: The element "Id1" is unqualified and has to be without a namespace prefix. Expression:
"$NewWSDLOperationIn.part1/ns2:Id1"
 
To: The element "Id2" is unqualified and has to be without a namespace prefix. Expression:
"$NewWSDLOperationOut.part1/ns2:Id2"
 
To: The element "Id1" is unqualified and has to be without a namespace prefix. Expression:
"$NewWSDLOperationOut.part1/ns2:Id1"

The current runtime does validation against the schema and hence this project if allowed to deploy will throw runtime
exception and hence the bpel has to be statically validated at design time.

Attached in the project that will demo the set of warnings

steps to reproduce
1. unzip the project to local drive
2. import the project into netbeans
3. open the bpel file newProcess.bpel and observer the warning on the assignment node 'Assign1'.
Comment 1 pvarghese 2007-09-05 18:16:19 UTC
Created attachment 48187 [details]
the bpel project zip file
Comment 2 Sergey Lunegov 2007-10-26 11:41:38 UTC
Task for Sierra
Comment 3 Vladimir Yaroslavskiy 2008-01-14 09:00:33 UTC
xpath validation
Comment 4 Andrei Chistiakov 2008-01-17 11:10:22 UTC
Changed target milestone from Sierra to 6.1 in order to display correct info on
NB 6.1 dashboard
Comment 5 Vladimir Yaroslavskiy 2008-03-05 11:08:25 UTC
fixed.
Comment 6 Andrei Chistiakov 2008-04-16 15:41:04 UTC
Verified with NetBeans IDE 6.1 RC2 (Build 200804160006)