Can HTTP content-type charset disagree with its contents XML encoding?

I came across an article that shows an example of a SOAP message
in its List 1:
http://www.atmarkit.co.jp/fxml/tanpatsu/21websvc/websvc02.html
(The article is in Japanese but the List 1 contains only ASCII text
except one line within <m:GoodsName> element.)

In this example, the HTTP level header says the contents is
in UTF-8:

Content-Type: application/soap-xml; charset="utf-8"

But the XML document which is the contents of this HTTP request
claims that the contents is in Shift_JIS as in:
 <?xml version="1.0" encoding="shift_jis"?>

I am puzzled.  Does anyone know:

(1) Is this legal?

(2) If it is legal, which declaration is supposed to wins? I.e. should
the contents be in UTF-8 encoding or Shift_JIS encoding in this
example?

T. "Kuro" Kurosaka
Internationalization Architect
teruhiko.kurosaka@iona.com
-------------------------------------------------------
IONA Technologies
2350 Mission College Blvd. Suite 650
Santa Clara, CA 95054
Tel: (408) 350 9684/9500 
Fax: (408) 350 9501
-------------------------------------------------------
Making Software Work Together TM

Received on Monday, 28 April 2003 21:25:04 UTC