Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339909

Summary: DBWS should support optional argument queries
Product: z_Archived Reporter: Mike Norman <michael.norman>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david.twelves, eclipselink.dbws-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 339905    
Bug Blocks:    
Attachments:
Description Flags
Proposed fix.
none
Supporting test cases. none

Description Mike Norman CLA 2011-03-14 11:24:11 EDT
Needs 339905

Support for optional arguments requires changes to schema and WSDL generation
to include choice/optional elements.

Also, the current implementation of o.e.p.platform.database.oracle.publisher
.sqlrefl.SqlReflector returns 'weird' results when argument defaults are used
for a Stored Procedure (sets internal variable that distort 'overload' cases).
Comment 1 David McCann CLA 2012-02-21 12:18:55 EST
Created attachment 211346 [details]
Proposed fix.
Comment 2 David McCann CLA 2012-02-21 12:19:12 EST
Created attachment 211347 [details]
Supporting test cases.
Comment 3 David McCann CLA 2012-02-21 12:20:25 EST
The fix provides support for optional scalar, PL/SQL scalar, VArray, Object and ObjectTable arguments.
Comment 4 David McCann CLA 2012-02-21 13:08:11 EST
Optional attribute in generated service xml:


   <query>
      <name>OptionalArgTest4</name>
      <parameter optional="true">
         <name>X</name>
         <type>ns1:dbws_phonetype_tableType</type>
      </parameter>
      <result>
         <type>xsd:string</type>
         <simple-xml-format/>
      </result>
   </query>
Comment 5 David McCann CLA 2012-02-21 13:10:00 EST
Snippet from generated WSDL showing minOccurs for optional argument 'X':


    <xsd:complexType name="OptionalArgTest4RequestType">
      <xsd:sequence>
        <xsd:element minOccurs="0" name="X" type="ns1:dbws_phonetype_tableType"/>
      </xsd:sequence>
    </xsd:complexType>
Comment 6 David McCann CLA 2012-02-22 16:17:01 EST
Reviewed by:  michael.norman@oracle.com
Tests:  all unit tests pass as expected;  optionalarguments/OptionalArgumentTestSuite
Revision: 10886
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:16:28 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:18:52 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink