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.
Summary: | Better support of XSD types extension/restriction | ||
---|---|---|---|
Product: | soa | Reporter: | Sergey Lunegov <slunegov> |
Component: | BPEL Validation | Assignee: | Vladimir Yaroslavskiy <yaroslavskiy> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | hong_lin, ksorokin, supernikita, sustaining |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Test project
Test project with only one copy Test project, version 3 |
Description
Sergey Lunegov
2008-03-17 14:01:18 UTC
Nikita, what else should we do to implement the issue. Mapper, validation, correlation wizard use one utility method getBuiltInSimpleType in class ValidationUtil to check if two types are based on the same type. This method has been written by Alex Petrov, reassign for furter investigation... It would be nice to have a project... please provide a sample project, so it would be easier for us to reproduce and understand this problem. Nikita, looks like yours. Vladimir, I'll provide you the project Created attachment 61767 [details]
Test project
Created attachment 61768 [details]
Test project with only one copy
My investigation: 1. Unzip and open test project UDToHL7 with only one copy (last attachment) 2. Open bpelUDToHL7.bpel file in source editor 3. Press "Validate XML" button (alt+Shift+F9) 4. See only one Warning (not Error !!!) <NetBeansProjects>/UDToHL7/src/BPEL/bpelUDToHL7.bpel:21,12 WARNING: The types of "From" and "To" activities are different: "string" and "EVN.2.CONTENT". for the copy <from>'20060717142105+1000'</from> <to>$xmlHL7Out.xmsHL7Out/ns0:EVN/ns0:EVN.2</to> If you look at the chain: part xmsHL7Out -> element ADT_A04 -> complex type ADT_A04.CONTENT -> - > element EVN.2 -> type EVN.2.CONTENT, you see that the type EVN.2.CONTENT has complex extension - attribute group - EVN.2.ATTRIBUTES which has several restricted attributes "Item", "Types", "LongName" So, xpath model identifies the input and output types correctly, therefore the string literal '20060717142105+1000' can not be assigned to the complex type. If specify the output type more precisely, for example add attribute "Item": <from>'20060717142105+1000'</from> <to>$xmlHL7Out.xmsHL7Out/ns0:EVN/ns0:EVN.2/@Item</to> the validation passes without any warnings/errors. Conclusion: from validation point of view, the output warnings are correct and it works right. Changes should be done in the bpel mapper to work with extensions and restrictions correctly. Reassign to the owner of BPEL mapper... After discussion with Kirill, we found that the problem is in finding of based simple built-in type. Validation uses this utility method of finding of based simple built-in type (written by Alex Petrov) and compares the types of "from" and "to" in copy. For special cases, it works incorrectly: doesn't support of extension/restriction. Reassign to validation, I'll fix the utility method (xml.wsdl.extensions/../ValidationUtil class). Please see attached updated project UDToHL7.v3: There is a copy: <copy> <from>'3.1415926'</from> <to>$xmlHL7Out.xmsHL7Out/ns0:PID/ns0:PID.3/ns0:CM_PAT_ID.1</to> </copy> The step CM_PAT_ID.1 has type CM_PAT_ID.1.CONTENT which simple context is extension of type "ST". The type "ST" is restriction of built-in type "xsd:string". Therefore string literal "3.1415926" can be assigned to the CM_PAT_ID.1 Created attachment 61821 [details]
Test project, version 3
Note that mapper shows schema structure correctly: xmlHL7Out PID PID.3 CM_PAT_ID.1 so there is no modification in mapper. fixed: 8a0ca83aa8cf QA, please verify this fix till 09-Jun-2008, so it can be part of NB 6.1 patch 2. Verified with NetBeans IDE Dev (Build 200805280004). The fix has been ported into the release61_fixes repository. http://hg.netbeans.org/release61_fixes/rev/c0b32621fb2e |