Closed Bug 199555 Opened 21 years ago Closed 21 years ago

Incorrect encoding for anonymous types.

Categories

(Core :: XML, defect, P1)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
mozilla1.4beta

People

(Reporter: nisheeth_mozilla, Assigned: harishd)

References

()

Details

(Keywords: crash)

Attachments

(1 file, 1 obsolete file)

How to reproduce:

1) Go to the above URL
2) Enter a ticker symbol and click "Get Stock Quote".
3) Crash with the following stack trace:

WSPCallContext::CallCompletionListener() line 329 + 11 bytes
WSPCallContext::HandleResponse(WSPCallContext * const 0x03509dd4,
nsISOAPResponse * 0x03536a14, nsISOAPCall * 0x0350796c, unsigned int 0, int 1,
int * 0x0012fa20) line 158
nsHTTPSOAPTransportCompletion::HandleEvent(nsHTTPSOAPTransportCompletion * const
0x03546d50, nsIDOMEvent * 0x035049c0) line 471
nsXMLHttpRequest::RequestCompleted() line 1057
nsXMLHttpRequest::OnStopRequest(nsXMLHttpRequest * const 0x03578360, nsIRequest
* 0x035019c8, nsISupports * 0x00000000, unsigned int 0) line 958
nsHttpChannel::OnStopRequest(nsHttpChannel * const 0x035019d0, nsIRequest *
0x03504c10, nsISupports * 0x00000000, unsigned int 0) line 3012
nsInputStreamPump::OnStateStop() line 471
nsInputStreamPump::OnInputStreamReady(nsInputStreamPump * const 0x03504c14,
nsIAsyncInputStream * 0x03328db4) line 324 + 11 bytes
nsInputStreamReadyEvent::EventHandler(PLEvent * 0x03504e2c) line 117
PL_HandleEvent(PLEvent * 0x03504e2c) line 659 + 10 bytes
PL_ProcessPendingEvents(PLEventQueue * 0x009f4cd8) line 592 + 9 bytes
_md_EventReceiverProc(HWND__ * 0x003e040a, unsigned int 49390, unsigned int 0,
long 10439896) line 1395 + 9 bytes

SOAP Request generated by Mozilla:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="h
ttp://schemas.xmlsoap.org/soap/encoding/" env:encodingStyle="http://schemas.xmls
oap.org/soap/encoding/" xmlns:xs="http://www.w3.org/1999/XMLSchema" xmlns:xsi="h
ttp://www.w3.org/1999/XMLSchema-instance">
<env:Header/>
<env:Body>
<a0:GetLastTradePrice xmlns:a0="http://example.com/StockQuote">
<ns1:TradePriceRequest xmlns:ns1="http://example.com/stockquote/schemas"
xsi:type="ns1:">
<Symbol xsi:type="xs:st
ring">msft</Symbol>
</ns1:TradePriceRequest>
</a0:GetLastTradePrice>
</env:Body>
</env:Envelope>

The problem is that the xsi:type attribute on the <ns1:TradePriceRequest>
element has the value "ns1:".  The right value, as dictated by the WSDL files
should be "ns1:TradePriceRequest".

The crash is probably related to some other problem, but I thought I'd include
the stack trace for easier debugging.
Blocks: 190182
Status: NEW → ASSIGNED
Keywords: crash
Priority: -- → P1
Target Milestone: --- → mozilla1.4beta
Blocks: 199556
Changing summary to a better, more concise one...
Summary: The name attribute isn't inherited from the <element> element in an XML schema → Anonymous complex types don't inherit name attribute
Changing summary to reflect the problem
Summary: Anonymous complex types don't inherit name attribute → Incorrect encoding for anonymous types.
Attached patch Patch v1.0 (obsolete) — Splinter Review
Do not set xsi:type value if the type is anonymous
Attached patch patch v1.1Splinter Review
Do not set xsi:type for anonymous types. Also, since the anonymous types don't
have a name ( and hence anonymous ) an unique interface name has to be
generated to distinguish these types otherwise we end up creating only one
interface ( based on the type's targetNamespace ), for the first anonymous
type, and do not create any for anonymous types with the same targetNamespace!
Attachment #119386 - Attachment is obsolete: true
Attachment #120496 - Flags: superreview?(jst)
Attachment #120496 - Flags: review?(rayw)
Comment on attachment 120496 [details] [diff] [review]
patch v1.1

sr=jst
Attachment #120496 - Flags: superreview?(jst) → superreview+
Comment on attachment 120496 [details] [diff] [review]
patch v1.1

r=rayw	Looks good!
Attachment #120496 - Flags: review?(rayw) → review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: