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 148447 - BPEL Validation fails for correlation properties that resolve to simpleContent
Summary: BPEL Validation fails for correlation properties that resolve to simpleContent
Status: RESOLVED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-26 04:34 UTC by dlhansen
Modified: 2008-10-07 08:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans Project Example (73.87 KB, application/x-compressed)
2008-09-26 04:35 UTC, dlhansen
Details
UBL 1.0 Schema (5.27 MB, application/x-compressed)
2008-09-26 04:39 UTC, dlhansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dlhansen 2008-09-26 04:34:16 UTC
When validating a BPEL project that uses a complexType that resolves to simpleContent a validation error is produced.

Example:
ERROR: A combination of Message part and query should resolve to a simple data type. Expression: "/ns0:Prefix/ns0:id"

NetBeans IDE 6.1 (Build 200809100101) (GlassFishESB)
BPEL SE: 080919

The WSDL has validation properties defined as:

<vprop:property name="wzrd_prop_id_id" type="xsd:string"/>
    <vprop:propertyAlias propertyName="tns:wzrd_prop_id_id" messageType="ns:getHelloRequest" part="part1">
        <vprop:query>/ns0:UserData/ns0:id</vprop:query>
    </vprop:propertyAlias>
    <vprop:propertyAlias propertyName="tns:wzrd_prop_id_id" messageType="ns:setPrefixRequest" part="part1">
        <vprop:query>/ns0:Prefix/ns0:id</vprop:query>
    </vprop:propertyAlias>

The XSD definition for this data type is:

    <xsd:complexType name="TextType">
        <xsd:annotation>
            <xsd:documentation xml:lang="en">
                <ccts:Acronym>CCT</ccts:Acronym>
                <ccts:PrimaryRepresentationTerm>String</ccts:PrimaryRepresentationTerm>
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attribute name="LanguageIdentifier" type="xsd:string" use="optional">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            <ccts:Acronym>SC</ccts:Acronym>
                            <ccts:Cardinality>0..1</ccts:Cardinality>
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="LanguageLocaleIdentifier" type="xsd:string" use="optional">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="en">
                            <ccts:Acronym>SC</ccts:Acronym>
                            <ccts:Cardinality>0..1</ccts:Cardinality>
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
    
    <xsd:element name="UserData">
        <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:sequence>
                <xsd:element name="data" type="xsd:string">
                </xsd:element>
                <xsd:element name="id" type="tns:TextType">
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="Prefix">
        <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:sequence>
                <xsd:element name="data" type="xsd:string">
                </xsd:element>
                <xsd:element name="id" type="tns:TextType">
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

BPEL Validation Rule:

[SA00045] Properties used in a <correlationSet> MUST be defined using XML Schema simple types. This restriction MUST 
be statically enforced. Each <correlationSet> is a named group of properties that, taken together, serve to identify a 
conversation. A given message can carry information that matches or initiates one or more correlation sets.

I believe this only applies to the property definition itself, and not the resulting query, when is does in fact 
resolve to an XML simple type.

The XSD definition pattern used here is taken from the standards such as UBL and OAGIS.  I've attached a version of 
UBL as an example.

Also attached is an example project, which is a rework of a correlation example from the NetBeans site.

When I modify the build.xml to remove the Validation check, and deploy to runtime.  The supplied example works 
correctly, implying that the runtime-engine has no problem with the construct.
Comment 1 dlhansen 2008-09-26 04:35:44 UTC
Created attachment 70638 [details]
NetBeans Project Example
Comment 2 dlhansen 2008-09-26 04:39:32 UTC
Created attachment 70640 [details]
UBL 1.0 Schema
Comment 3 Samaresh Panda 2008-09-26 15:16:33 UTC
Sounds more like BPEL specific issue.
Comment 4 Sergey Lunegov 2008-09-26 15:23:32 UTC
Vladimir, please take a look.
Comment 5 Vladimir Yaroslavskiy 2008-10-06 14:58:15 UTC
fixed: f066439d3e98
Comment 6 Vladimir Yaroslavskiy 2008-10-06 15:26:47 UTC
additional fix: 95541822420d
Comment 7 Quality Engineering 2008-10-07 06:08:09 UTC
Integrated into 'main-golden', will be available in build *200810070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b865c5fd9d45
User: Vladimir Yaroslavskiy <yaroslavskiy@netbeans.org>
Log: [Issue #148447] BPEL Validation fails for correlation properties that resolve to simpleContent