Bugzilla – Bug 322506
Soap Response interrupted mid-way by Target of Invocation Exception
Last modified: 2007-09-15 21:24:57 UTC
---- Reported by glen.ford@spinvox.com 2006-11-02 07:15:14 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: A soap response from a method is generating a corrupted response, by examining the output using TCPDump it can be seen that the response is interrupted mid generation by a Target of Invocation Exception. Steps to reproduce the problem: 1. Use the web service in the attachment via mod_mono or xsp 2. Start tcpdump or your favorite pack trace on the port 3. Run the client in the attachment Actual Results: 1. The following output from the client: mono client.exe Starting Test Unhandled Exception: System.Xml.XmlException: expected '>' (3E) but found '<' (3C) Line 1, position 3074. at System.Xml.XmlTextReader.Expect (Int32 expected) [0x00000] at System.Xml.XmlTextReader.ReadStartTag () [0x00000] at System.Xml.XmlTextReader.ReadContent () [0x00000] at System.Xml.XmlTextReader.Read () [0x00000] at System.Xml.XmlReader.Skip () [0x00000] at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement (System.String name, System.String ns, Boolean elementCanBeType, System.String fixupReference) [0x00000] at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement (System.String name, System.String ns, System.String fixupReference) [0x00000] at System.Xml.Serialization.XmlSerializationReader.ReadList (System.Object resultList) [0x00000] at System.Xml.Serialization.XmlSerializationReader.ReadReferencedElement (System.String name, System.String ns) [0x00000] at System.Xml.Serialization.XmlSerializationReader.ReadReferencedElement () [0x00000] at System.Xml.Serialization.XmlSerializationReader.ReadReferencedElements () [0x00000] at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage (System.Xml.Serialization.XmlMembersMapping typeMap) [0x00000] at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () [0x00000] at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader) [0x00000] 2. Verify you see the following on the tcp trace: HTTP/1.1 500 Internal Server Error^M Date: Thu, 02 Nov 2006 11:02:47 GMT^M Server: Apache/2.0.54 (Linux/SUSE)^M Content-Length: 3461^M Cache-Control: private^M Connection: close^M Content-Type: text/xml; charset=utf-8^M ^M <?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/"><q1:Method1Response xmlns:q1="http://tempuri.org/"><Method1Result href="#id1" /></q1:Method1Response><q2:Array id="id1" xmlns:q3="http://tempuri.org/" q2:arrayType="q3:Item[200]" xmlns:q2="http://schemas.xmlsoap.org/soap/encoding/"><Item href="#id2" /><Item href="#id3" /><Item href="#id4" /><Item href="#id5" /><Item href="#id6" /><Item href="#id7" /><Item href="#id8" /><Item href="#id9" /><Item href="#id10" /><Item href="#id11" /><Item href="#id12" /><Item href="#id13" /><Item href="#id14" /><Item href="#id15" /><Item href="#id16" /><Item href="#id17" /><Item href="#id18" /><Item href="#id19" /><Item href="#id20" /><Item href="#id21" /><Item href="#id22" /><Item href="#id23" /><Item href="#id24" /><Item href="#id25" /><Item href="#id26" /><Item href="#id27" /><Item href="#id28" /><Item href="#id29" /><Item href="#id30" /><Item href="#id31" /><Item href="#id32" /><Item href="#id33" /><Item href="#id34" /><Item href="#id35" /><Item href="#i/><Item href="#id37" /><Item href="#id38" /><Item href="#id39" /><Item href="#id40" /><Item href="#id41" /><Item href="#id42" /><Item href="#id43" /><Item href="#id44" /><Item href="#id45" /><Item href="#id46" /><Item href="#id47" /><Item href="#id48" /><Item href="#id49" /><Item href="#id50" /><Item href="#id51" /><Item href="#id52" /><Item href="#id53" /><Item href="#id54" /><Item href="#id55" /><Item href="#id56" /><Item href="#id57" /><Item href="#id58" /><Item href="#id59" /><Item href="#id60" /><Item href="#id61" /><Item href="#id62" /><Item href="#id63" /><Item href="#id64" /><Item href="#id65" /><Item href="#id66" /><Item href="#id67" /><Item href="#id68" /><Item href="#id69" /><Item href="#id70" /><Item href="#id71" /><Item href="#id72" /><Item href="#id73" /><Item href="#id74" /><Item href="#id75" /><Item href="#id76" /><Item href="#id77" /><Item href="#id78" /><Item href="#id79" /><Item href="#id80" /><Item href="#id81" /><Item href="#id82" /><Item href="#id83" /><Item href="#id84" /><Item href="#id85" /><Item href="#id86" /><Item href="#id87" /><Item href="#id88" /><Item href="#id89" /><Item href="#id90" /><Item href="#id91" /><Item href="#id92" /><Item href="#id93" /><Item href="#id94" /><Item href="#id95" /><Item href="#id96" /><Item href="#id97" /><Item href="#id98" /><Item href="#id99" /><Item href="#id100" /><Item href="#id101" /><Item href="#id102" /><Item href="#id103" /><Item href="#id104" /><Item href="#id105" /><Item href="#id106" /><Item href="#id107" /><Item href="#id108" /><Item href="#id109" /><Item href="#id110" /><Item href="#id111" /><Item href="#id112" /><Item href="#id113" /><Item href="#id114" /><Item href="#id115" /><Item href="#id116" /><Item href="#id117" /><Item href="#id118" /><Item href="#id119" /><Item href="#id120" /><Item href="#id121" /><Item href="#id122" /><It<?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:Fault><faultcode>soap:Server</faultcode><faultstring>Exception has been thrown by the target of an invocation.</faultstring></soap:Fault></soap:Body></soap:Envelope> Expected Results: The following output from the client: $ mono client.exe Starting. $ How often does this happen? Once the soap call fails once then on every call until the xsp is restarted. Additional Information: mono 1.1.16.1 (have also tried mono 1.1.18) ---- Additional Comments From glen.ford@spinvox.com 2006-11-02 07:17:31 MST ---- Created an attachment (id=170776) web service and client for reproducing the issue ---- Additional Comments From gonzalo@ximian.com 2006-11-02 18:23:23 MST ---- I checked the exceptions thrown when processing a request and found this: at System.Exception..ctor () at System.SystemException..ctor () at System.ArgumentException..ctor () at System.ArgumentNullException..ctor () at System.Convert.ToBase64String () at Mono.GeneratedSerializers.Encoded.GeneratedWriter.WriteObject_Item () at Mono.GeneratedSerializers.Encoded.GeneratedWriter.WriteCallback_Item () at System.MulticastDelegate.invoke_void_object () at System.Xml.Serialization.XmlSerializationWriter.WriteReferencedElements () at Mono.GeneratedSerializers.Encoded.GeneratedWriter.WriteRoot_Method1Respons --> Lluis. ---- Additional Comments From glen.ford@spinvox.com 2006-11-03 04:24:18 MST ---- Interesting, if in my server I pass a value in the byte[] element of my object then I don't get the problem - is not great but gives me a work around for the moment. ---- Additional Comments From miguel@ximian.com 2006-11-05 11:56:39 MST ---- Atsushi is looking at some serializer bugs now. Am assigning to him. ---- Additional Comments From atsushi@ximian.com 2006-11-07 04:52:12 MST ---- Created an attachment (id=170777) fix, will be applied soon ---- Additional Comments From atsushi@ximian.com 2006-11-07 14:32:25 MST ---- Fixed in svn (r67476). Imported an attachment (id=170776) Imported an attachment (id=170777) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>SuSe 10.0</cf_op_sys_details> Unknown operating system other. Setting to default OS "Other".