Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341295 - Repetitive XML namespace declarations on collections
Summary: Repetitive XML namespace declarations on collections
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 19:20 EDT by Evgeny CLA
Modified: 2022-06-09 10:22 EDT (History)
2 users (show)

See Also:


Attachments
Builder Configuration (951 bytes, text/xml)
2011-03-29 19:20 EDT, Evgeny CLA
no flags Details
Proposed fix. (5.00 KB, patch)
2011-05-09 15:45 EDT, David McCann CLA
no flags Details | Diff
Supporting and modified test cases. (99.66 KB, patch)
2011-05-09 15:45 EDT, David McCann CLA
no flags Details | Diff
Proposed fix v2 - added XML Schema namespace declaration as well (5.28 KB, patch)
2011-05-19 12:49 EDT, David McCann CLA
no flags Details | Diff
Supporting test cases v2 - adjusted instance docs to reflect XML Schema namespace declaration being added (99.74 KB, patch)
2011-05-19 12:50 EDT, David McCann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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