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

Bug 341295

Summary: Repetitive XML namespace declarations on collections
Product: z_Archived Reporter: Evgeny <forrestline>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: david.mccann, michael.norman
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Builder Configuration
none
Proposed fix.
none
Supporting and modified test cases.
none
Proposed fix v2 - added XML Schema namespace declaration as well
none
Supporting test cases v2 - adjusted instance docs to reflect XML Schema namespace declaration being added none

Description Evgeny CLA 2011-03-29 19:20:10 EDT
Build Identifier: 2.2.0

Hi,

SQL statement generated as collection contains repetitive 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

declaration.

I.e.:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Body>
      <srvc:getDataResponse xmlns="urn:PGDB" xmlns:srvc="urn:PGDBService">
         <srvc:result>
            <sRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <id>1</id>
               <text1>t1</text1>
            </sRecord>
            <sRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <id>2</id>
               <text1>t1</text1>
            </sRecord>
         </srvc:result>
      </srvc:getDataResponse>
   </env:Body>
</env:Envelope>

Could it be moved please to the envelope, body or better yet wrapper element to avoid repetition and save on the size of the document?

It becomes an noticeable overhead on big collections.


Thank you.



Reproducible: Always

Steps to Reproduce:
1. Define SQL statement as collection
2. Generate WebService
3. Invoke it
Comment 1 Evgeny CLA 2011-03-29 19:20:54 EDT
Created attachment 192149 [details]
Builder Configuration
Comment 2 Mike Norman CLA 2011-03-30 14:00:46 EDT
I've reproduced the problem ... now see if I can fix it
Comment 3 David McCann CLA 2011-05-09 15:45:23 EDT
Created attachment 195134 [details]
Proposed fix.
Comment 4 David McCann CLA 2011-05-09 15:45:52 EDT
Created attachment 195135 [details]
Supporting and modified test cases.
Comment 5 David McCann CLA 2011-05-19 12:49:26 EDT
Created attachment 196138 [details]
Proposed fix v2 - added XML Schema namespace declaration as well
Comment 6 David McCann CLA 2011-05-19 12:50:05 EDT
Created attachment 196139 [details]
Supporting test cases v2 - adjusted instance docs to reflect XML Schema namespace declaration being added
Comment 7 David McCann CLA 2011-05-19 13:08:25 EDT
We now write out both the XML Schema and XML Schema Instance namespace declarations on the <envelope> element.

Reviewed by:  michael.norman@oracle.com
Tests:  all unit tests pass as expected; SQLAsCollectionTestSuite
Revision: 9423
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:22:10 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink