Closed Bug 247541 Opened 20 years ago Closed 20 years ago

SOAP decoder sometimes encodes incorrect xsi:type

Categories

(Core Graveyard :: Web Services, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha2

People

(Reporter: keeda, Assigned: keeda)

Details

Attachments

(1 file)

This happens when trying to send an array of structs. I have a fix.
Status: NEW → ASSIGNED
Summary: SOAP decoder sometimes encodes incorrec xsi:type → SOAP decoder sometimes encodes incorrect xsi:type
Target Milestone: --- → mozilla1.8alpha2
Attached patch FixSplinter Review
If no name is specified for the value being encoded, EncodeSimpleValue attempts
to guess at a suitable name by walking up the type hierarchy till we find
something usable. The loop that does this uses the typeNS variable that
contains the namespace for the type, and clobbers its value. This looks
incorrect since we want to later use the value for encoding the type
information. This caused the encoder to put structs that were part of an array
in the schema namespace instead of the correct targetnamespace.

The fix is to make the loop not use typeNS, but currentURI. Looks like that was
the intention all along, but someone had a brainfart or something.

Also includes unrelated cleanup: GetNativeType() always returns OK, so get rid
of the nsresult return.
Comment on attachment 151131 [details] [diff] [review]
Fix

timeless, I'm hoping you might be interested in this. Would you please review?
Attachment #151131 - Flags: review?(timeless)
Attachment #151131 - Flags: review?(timeless) → review+
Attachment #151131 - Flags: superreview?(jst)
Comment on attachment 151131 [details] [diff] [review]
Fix

sr=jst
Attachment #151131 - Flags: superreview?(jst) → superreview+
Thanks for the reviews.

Checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 151131 [details] [diff] [review]
Fix

hierarcy(sp)

:)
(In reply to comment #5)
> hierarcy(sp)

Duh! I'll fix that the next time I checkin to this file.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: