Closed
Bug 282698
Opened 20 years ago
Closed 19 years ago
use application/soap+xml in nsHTTPSOAPTransport
Categories
(Core Graveyard :: Web Services, defect)
Core Graveyard
Web Services
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: annevk, Assigned: annevk)
References
Details
Attachments
(2 obsolete files)
It has been defined here: <http://www.faqs.org/rfcs/rfc3902> It acts similar to application/xml which means that the default charset if it has not been specified is UTF-8. CC'ing people from bug 244717 to make sure they are all ok with the upcoming patch. This patch also changes text/xml to application/xml within the soap directory.
Assignee | ||
Comment 1•20 years ago
|
||
Attachment #174670 -
Flags: superreview?(jst)
Attachment #174670 -
Flags: review?(jst)
Comment 2•20 years ago
|
||
Will servers accept application/soap+xml? Please test your patch with existing SOAP testcases to make sure we don't break.
Assignee | ||
Updated•20 years ago
|
Attachment #174670 -
Flags: superreview?(jst)
Attachment #174670 -
Flags: review?(jst)
Comment 3•20 years ago
|
||
Also, you can only legally do this for SOAP 1.2 messages.
Comment 4•20 years ago
|
||
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultstring xsi:type="xsd:string">Content-Type must be 'text/xml' instead of 'application/soap+xml'</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> From: http://mozilla.org/projects/webservices/examples/babelfish-wsdl/index.html Which is xmethods.net.
Comment 5•20 years ago
|
||
Hmm... does it really mean text/xml, or will application/xml do? The problem is that you can't send non-ASCII data with text/xml over HTTP, per spec.
Comment 6•20 years ago
|
||
Most toolkits send "text/xml; charset=UTF-8". This is exactly what we do (post bug 244717) and it seems to work well enough. This is what SOAP 1.1 has to say: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383526 This is what SOAP 1.2 has to say: http://www.w3.org/TR/2003/REC-soap12-part2-20030624/#httpmediatype In Doron's example, webmethods.net is clearly talking SOAP 1.1 (note the namespace of the message envelope) so the server has some justification in complaining. I would support a patch that makes us DTRT for SOAP 1.2 (I wrote the comment that Anne is removing in the patch above). But I think that changing anything (even to application/xml) for SOAP 1.1 is risky since there are too many old servers still around.
Comment 7•20 years ago
|
||
Ah, ok. If we're sending an explicit charset param, that's different.
Assignee | ||
Comment 8•19 years ago
|
||
That the charset is UTF-8 is not made explicit everywhere. Should SOAP use "text/xml;charset=utf-8" everywhere or only on some places? Since eventually "text/xml" over HTTP is going to mean that the file is encoded in US-ASCII as far as Gecko is concerned I guess some changes have to be made. (The "application/soap+xml" thing can wait.)
Blocks: 247024
Comment 9•19 years ago
|
||
> That the charset is UTF-8 is not made explicit everywhere. Should SOAP use
> "text/xml;charset=utf-8" everywhere or only on some places?
Everywhere for outgoing requests... But don't we do that already? Do you also
want to change the OverrideMimeType stuff that you did in your original patch? I
would be nervous about anything that makes handling of incoming data
stricter.(Postel's law etc. etc.)
I'd rather see a patch first and consider each change on its own merit.
Assignee | ||
Comment 10•19 years ago
|
||
(In reply to comment #9) > Everywhere for outgoing requests... But don't we do that already? Do you also > want to change the OverrideMimeType stuff that you did in your original patch? I > would be nervous about anything that makes handling of incoming data > stricter.(Postel's law etc. etc.) Perhaps we should change incoming data to application/xml. That would make us less strict and probably more compliant. Perhaps changing everything to application/xml except for the "text/xml; charset=UTF-8" case would be the best thing.
Assignee | ||
Comment 11•19 years ago
|
||
Patch to match what I described. Note that with text/xml you can only overwrite the default charset using the 'charset' parameter of the 'contet-type' header, but with application/xml the XML file itself can do that as well by including a BOM and/or XML declaration. Therefore application/xml is a better choice.
Attachment #174670 -
Attachment is obsolete: true
Assignee | ||
Comment 12•19 years ago
|
||
Can someone comment on patch #2? It seems like the right thing to do.
Comment 13•19 years ago
|
||
Comment on attachment 177473 [details] [diff] [review] patch #2 r=doron, I tested several examples and they worked fine with this.
Attachment #177473 -
Flags: review+
Assignee | ||
Updated•19 years ago
|
Attachment #177473 -
Flags: superreview?(jst)
Comment 14•19 years ago
|
||
Comment on attachment 177473 [details] [diff] [review] patch #2 sr=jst
Attachment #177473 -
Flags: superreview?(jst) → superreview+
Comment 15•19 years ago
|
||
Comment on attachment 177473 [details] [diff] [review] patch #2 mozilla/extensions/webservices/soap/tests/soapsuccess.cgi 1.2 mozilla/extensions/webservices/soap/tests/soapfault.cgi 1.2 mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp 1.40 mozilla/extensions/webservices/soap/src/nsHTTPSOAPTransport.cpp 1.50
Attachment #177473 -
Attachment is obsolete: true
Assignee | ||
Comment 16•19 years ago
|
||
I'm marking this FIXED as we are no longer using text/xml without a charset parameter in the soap directory. If someone really wants application/soap+xml that should be a separate bug. Although they should take this comments from doron into account I guess: doron anne: sure, close it doron anne: soap+xml breaks too much
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•