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 105997 - Unable to use type from referenced project.
Summary: Unable to use type from referenced project.
Status: RESOLVED WORKSFORME
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Nikita Krjukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-07 11:28 UTC by Michael Nazarov
Modified: 2007-09-24 14:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (21.01 KB, image/png)
2007-06-07 11:29 UTC, Michael Nazarov
Details
bpel-process (160.76 KB, application/octet-stream)
2007-06-16 08:18 UTC, Samaresh Panda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nazarov 2007-06-07 11:28:38 UTC
Build 200706060000.

Steps to reproduce:

1. Create SynchronousSample sample project in IDE.
2. Create a new BPEL Module BpelModule under SynchronousSample directory.
3. Create a new XML Schema file newXmlSchema.xsd under BpelModule.
4. Add a new complex type "newComplexType", just like the "simpleProcess"
defined in SynchronousSample.xsd
5. Set SynchronousSample BPEL Process reference to BpelModule.
6. Open SynchronousSample.xsd in Schema Editor. Import "newXmlSchema.xsd" as its
Referenced Schema.
7. Customize the existing element "typeA". Change its type from "simpleProcess"
to "newComplexType", which is defined at the Referenced Schema newXmlSchema.xsd.
8. Open SynchronousSample.bpel in BPEL Editor. Double-click Assign1 to open the
bpel mapper.

Assign1 reports two warnings (screenshot). Project build failed.
Looks like regression - Build from May 21 passed test case successfully.

Code:

        <assign name="Assign1">
            <copy>
               
<from>$inputVar.inputType/paramA</from><to>$outputVar.resultType/paramA</to>
            </copy>
            <bpws:copy>
                <bpws:from variable="inputVar" part="inputType"/>
                <bpws:to variable="outputVar" part="resultType"/>
            </bpws:copy>
        </assign>
Comment 1 Michael Nazarov 2007-06-07 11:29:09 UTC
Created attachment 43368 [details]
screenshot
Comment 2 _ hong_lin 2007-06-07 21:44:01 UTC
This is an enterprise validation issue. Please see issue 105794 and issue 105643.

Issue 105794 was fixed on June 7. Please double check to see if it is still
reproducible with a later build.
Comment 3 Michael Nazarov 2007-06-08 10:31:39 UTC
Reproduced in 200706070000. Will check using later build.
Comment 4 Michael Nazarov 2007-06-08 11:23:22 UTC
Build 200706070000 also.
Comment 5 Michael Nazarov 2007-06-08 11:26:11 UTC
200706080000 I meant.
Comment 6 Samaresh Panda 2007-06-16 08:18:53 UTC
Created attachment 43836 [details]
bpel-process
Comment 7 Samaresh Panda 2007-06-16 08:20:34 UTC
Works for me, see attachment bpel-process. Please verify with a newer build.
Comment 8 Michael Nazarov 2007-09-07 18:00:45 UTC
As I can see issue still exists with one change: now not warnings but errors appear.
Comment 9 Samaresh Panda 2007-09-10 19:44:17 UTC
Assigning to the right people.
Comment 10 Sergey Lunegov 2007-09-19 15:26:36 UTC
Vladimir, Nikita, please look at this.
Looks like validation problem.
Don't break existing validation functionality :)
Comment 11 Vladimir Yaroslavskiy 2007-09-20 07:22:06 UTC
Nikita, it is regression from your development of XPath.
Please take a look.
Comment 12 Nikita Krjukov 2007-09-21 11:34:52 UTC
I have tried to reproduce the defect.
Now the validation machanism produces the following errors:

W:/Projects/SynchronousSample2/SynchronousSample2/src/SynchronousSample.bpel:69,16
Error: To: Can not find the element "paramA" at the namespace "http://xml.netbeans.org/schema/SynchronousSample". 
Expression: "$outputVar.resultType/ns2:paramA"

W:/Projects/SynchronousSample2/SynchronousSample2/src/SynchronousSample.bpel:68,16
Error: From: Can not find the element "paramA" at the namespace "http://xml.netbeans.org/schema/SynchronousSample". 
Expression: "$inputVar.inputType/ns2:paramA"

But it is absolutely correct errors. The matter is that the changes the structure of the 
element typeA (see step #7) comes to corruption of the BPEL, which uses it. So the assign 
element becomes wrong. The error can be easily corrected. It is necessary to import the 
newXmlSchema.xsd to the SynchronousSample.bpel and use corresponding prefix in copy from and to
before the paramA element.

More complicated refactoring is required to avoid such problems automatically.
But I don't believe that we are going to it soon. 
Now the rafactoring supports only the renaiming. 
Comment 13 Michael Nazarov 2007-09-24 14:43:32 UTC
> It is necessary to import the newXmlSchema.xsd to the SynchronousSample.bpel
> and use corresponding prefix in copy from and to before the paramA element.

Okey, I imported xmd into bpel. How should I "use corresponding prefix"? Sorry
this step bit unclear for me...