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 93704 - The bpel mapper does not generate Qualified name for local elements that have a element reference to global elements
Summary: The bpel mapper does not generate Qualified name for local elements that have...
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Mapper (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks: 93892
  Show dependency tree
 
Reported: 2007-01-31 20:19 UTC by pvarghese
Modified: 2007-03-19 11:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
the WSDL file containing the inline schema (4.41 KB, text/xml)
2007-01-31 20:32 UTC, pvarghese
Details
the zip file of the composite App projec that was used to test this scenario, has bpel, java ee webservice and comp app project (121.33 KB, application/octet-stream)
2007-01-31 20:34 UTC, pvarghese
Details
The bpel file that has the errorneous assignment statements (2.50 KB, text/xml)
2007-01-31 20:35 UTC, pvarghese
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pvarghese 2007-01-31 20:19:04 UTC
Consider the schema 
<xsd:schema targetNamespace="http://xml.netbeans.org/schema/RefElemSchema"
xmlns:tns1="http://xml.netbeans.org/schema/RefElemSchema">
            <xsd:element name="intElem" type="xsd:int"></xsd:element>
            <xsd:element name="strElem" type="xsd:string"></xsd:element>
            <xsd:complexType name="MsgType">
                <xsd:sequence>
                    <xsd:element ref="tns1:intElem"/>
                    <xsd:element ref="tns1:strElem"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="MsgElem" type="tns1:MsgType"></xsd:element>
</xsd:schema>
Here the complextype 'MsgType' has Element Reference to the global elements
'intElem' and 'strElem'. Even though the <schema> tag does not define the
attribute 'elementformdefault=qualified', the element references to the global
elements have to be qualified when being used in the bpel assignments.

The assignments that are generated for assign between variables defined on
messages based on the schema above are shown below

        <bpws:assign name="Assign2">
            <bpws:copy>
                <bpws:from>$IntPTOperOut.part1/intElem</bpws:from>
                <bpws:to>$ExtPTOperOut.part1/intElem</bpws:to>
            </bpws:copy>
            <bpws:copy>
                <bpws:from>$IntPTOperOut.part1/strElem</bpws:from>
                <bpws:to>$ExtPTOperOut.part1/strElem</bpws:to>
            </bpws:copy>
        </bpws:assign>

intElem and strElem are not qualified and have to be qualified. 

The bpel project containing this bpel and wsdl are attached.

This is a high priority bug as the invocation from BPEL to JavaEE SE fails when
the messages interchanged are defined on such a schema.
Comment 1 pvarghese 2007-01-31 20:32:13 UTC
Created attachment 37894 [details]
the WSDL file containing the inline schema
Comment 2 pvarghese 2007-01-31 20:34:05 UTC
Created attachment 37895 [details]
the zip file of the composite App projec that was used to test this scenario, has bpel, java ee webservice and comp app project
Comment 3 pvarghese 2007-01-31 20:35:04 UTC
Created attachment 37896 [details]
The bpel file that has the errorneous assignment statements
Comment 4 Sergey Lunegov 2007-01-31 21:28:54 UTC
Hi, I don't understand how bpel mapper is involved.
Please describe how to reproduce thebug by steps:

1) create new bpel project
2) open bpel file from attachment
3) bla-bla-bla

Comment 5 pvarghese 2007-01-31 22:20:30 UTC
Adding steps to reproduce:
1. Create a BPEL project using entrprise tools.
2. Use the attached wsdl to create a wsdl document in the project
3. Create a BPEL document(file).
4. Create partnerlink by importing the wsdl into the BPEL.
5. create two variables associated wiht the Message defined in the WSDL.
6. Add an assignment between the two variables and map at the leaf node level.
the assignment generated would be as mentioned in the Description.
Example:
        <bpws:assign name="Assign2">
            <bpws:copy>
                <bpws:from>$IntPTOperOut.part1/intElem</bpws:from>
                <bpws:to>$ExtPTOperOut.part1/intElem</bpws:to>
            </bpws:copy>
            <bpws:copy>
                <bpws:from>$IntPTOperOut.part1/strElem</bpws:from>
                <bpws:to>$ExtPTOperOut.part1/strElem</bpws:to>
            </bpws:copy>
        </bpws:assign>

the elements 'strElem' and 'intElem' are not qualified. They have to be 
qualified due to the reason mentioned in the Description.

I don't know how the fix would be, but one way would be to import the schema 
and then qualify the elements by that prefix. 

Hope this helps
Comment 6 Vladimir Yaroslavskiy 2007-02-04 08:07:03 UTC
The problem is that namespaces aren't added if an element is from inline schema
stored in wsdl file. If schema is represented by schema file .xsd, it works fine.
Comment 7 Vladimir Yaroslavskiy 2007-02-13 14:07:14 UTC
Related issue http://www.netbeans.org/issues/show_bug.cgi?id=95346
Comment 8 Vladimir Yaroslavskiy 2007-02-13 14:18:42 UTC
The rules have been implemented for qualifying element name:

1. Global element is always qualified.

2. If schema "elementFormDefault" is qualified,
   any element is qualified.

3. If schema "elementFormDefault" is unqualified:

3.1 if local element has qualified form, it is qualified.
3.2 if element is ElementReference, it is qualified.
Comment 9 Victoria Zhukovskaya 2007-03-19 11:20:03 UTC
WinXP 070313
Mapper generate name with  namespace prefix for this example