[Mono-bugs] [Bug 79057][Wis] Changed - Mono does not correctly map types in SOAP reply

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 31 23:53:13 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by nathan at mammoth.com.au.

http://bugzilla.ximian.com/show_bug.cgi?id=79057

--- shadow/79057	2006-08-31 13:12:00.000000000 -0400
+++ shadow/79057.tmp.9925	2006-08-31 23:53:13.000000000 -0400
@@ -74,6 +74,72 @@
 ------- Additional Comments From miguel at ximian.com  2006-08-31 13:12 -------
 Hello,
 
     Could you provide a test case that we could use to fix this?
 
 Miguel.
+
+------- Additional Comments From nathan at mammoth.com.au  2006-08-31 23:53 -------
+Unfortuately I'm not familiar with whatever XML classes are involved
+so this is still a web service based test, but I've boiled it down to
+a simpler form.
+
+I created a web service that just returns long[], modified the WSDL to
+use encoded messages instead of literal, then generated a C# client
+and server from it.
+
+Here's the working reply from the server:
+
+<?xml version="1.0" encoding="utf-8"?>
+<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
+<parameters href="#id1" />
+<q1:Array id="id1" q1:arrayType="xsd:long[1]"
+xmlns:q1="http://schemas.xmlsoap.org/soap/encoding/">
+<Item xsi:type="xsd:long">1234</Item>
+</q1:Array>
+</soap:Body>
+</soap:Envelope>
+
+In particular, note there is no xsi:type attribute on the <q1:array>
+element (in contrast to my  initial bug report where the corresponding
+element does have an xsi:type set).
+
+So, I created an alternate SOAP reply that changed the <q1:array>
+element to have the appropriate xsi:type, like the original
+problematic SOAP reply has:
+
+<?xml version="1.0" encoding="utf-8"?>
+<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
+xmlns:s0="http://tempuri.org/">
+<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
+<parameters href="#id1" />
+<q1:Array id="id1" xsi:type='s0:ArrayOfLong'
+q1:arrayType="xsd:long[1]"
+xmlns:q1="http://schemas.xmlsoap.org/soap/encoding/">
+<Item xsi:type="xsd:long">
+1234</Item>
+</q1:Array>
+</soap:Body>
+</soap:Envelope>
+
+Feeding this reply into my test client, I see the same behaviour from
+the initial bug report: a bunch of XmlNode's are returned instead of
+the expected long[] .
+
+I will attach the test client, server, .wsdl and working/non-working
+SOAP replies. I don't know how to serve up a static XML file as a SOAP
+reply, so I threw together
+
+http://mammoth.com.au/~nats/xmltest/test.php
+
+which simply returns the non-working response.
+
+The client when run on Microsoft.NET correctly handles the xsi:type
+attribute.
+
+I can possibly narrow the test case down further if pointed in the
+right direction as to what System.Xml classes are involved here.


More information about the mono-bugs mailing list