[Mono-list] SOAP response parsing problem - Google Adwords API - Mono 2.4.2.3 & 2.6.1
NielsW
niels at wewer.nl
Wed Mar 17 15:17:45 EDT 2010
I'm using the TargetingIdeaService of the Google Adwords API (v2009). I have
created a loop that does the same 50 requests until the program is stopped
and mono fails about 1 out of 10 times. Not on the same request but rather
random.
The following web service is being called:
https://adwords.google.com/api/adwords/o/v200909/TargetingIdeaService?wsdl
I have tested the application on Windows XP Mono 2.4.2.3 & 2.6.1. And on
Ubuntu 9.10 using the default mono version distributed with the this version
of Ununtu. (also 2.4.x).
It seems to be related with xml parsing but I'm not sure about that. I have
also tested the same code using Microsoft.Net 2.0 and this runs without any
problems.
The program freezes for minutes (don't know how many) and than raises this
error:
System.Net.WebException: The operation has timed out.
at System.Net.WebConnectionStream.Read (System.Byte[] buffer, Int32
offset, In
t32 size) [0x00000]
at System.IO.StreamReader.ReadBuffer () [0x00000]
at System.IO.StreamReader.Read (System.Char[] buffer, Int32 index, Int32
count
) [0x00000]
at Mono.Xml2.XmlTextReader.ReadTextReader (Int32 remained) [0x00000]
at Mono.Xml2.XmlTextReader.PeekChar () [0x00000]
at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000]
at Mono.Xml2.XmlTextReader.ReadContent () [0x00000]
at Mono.Xml2.XmlTextReader.Read () [0x00000]
at System.Xml.XmlTextReader.Read () [0x00000]
at System.Xml.XmlReader.ReadElementString () [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadPrimitiveVal
ue (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElemen
t (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(Sys
tem.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boole
an readByOrder) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
eMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob)
[0x
00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
e (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean
checkType) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(Syst
em.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkTy
pe) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
e (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean
checkType) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(Syst
em.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkTy
pe) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElemen
t (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(Sys
tem.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boole
an readByOrder) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
eMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob)
[0x
00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
e (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean
checkType) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(Syst
em.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkTy
pe) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElemen
t (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(Sys
tem.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boole
an readByOrder) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
eMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob)
[0x
00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
e (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean
checkType) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(Syst
em.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkTy
pe) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElemen
t (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(Sys
tem.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boole
an readByOrder) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
eMembers (System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob)
[0x
00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanc
e (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable,
Boolean
checkType) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject
(Syst
em.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean
checkTy
pe) [0x00000]
at
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElemen
t (System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers
(Sys
tem.Xml.Serialization.ClassMap map, System.Object ob, Boolean isValueList,
Boole
an readByOrder) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage
(Sys
tem.Xml.Serialization.XmlMembersMapping typeMap) [0x00000]
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot ()
[0x0
0000]
at System.Xml.Serialization.XmlSerializer.Deserialize
(System.Xml.Serializatio
n.XmlSerializationReader reader) [0x00000]
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize
(System.Xml.Serializatio
n.XmlSerializationReader reader) [0x00000]
at System.Xml.Serialization.XmlSerializer.Deserialize
(System.Xml.XmlReader xm
lReader) [0x00000]
at System.Web.Services.Protocols.WebServiceHelper.ReadSoapMessage
(System.Xml.
XmlTextReader xmlReader, System.Xml.Serialization.XmlSerializer
bodySerializer,
System.Xml.Serialization.XmlSerializer headerSerializer, Boolean soap12,
System.
Object& body, System.Web.Services.Protocols.SoapHeaderCollection& headers)
[0x00
000]
at System.Web.Services.Protocols.WebServiceHelper.ReadSoapMessage
(System.Xml.
XmlTextReader xmlReader, System.Web.Services.Protocols.SoapMethodStubInfo
method
, SoapHeaderDirection dir, Boolean soap12, System.Object& body,
System.Web.Servi
ces.Protocols.SoapHeaderCollection& headers) [0x00000]
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReceiveResponse
(Syste
m.Net.WebResponse response, System.Web.Services.Protocols.SoapClientMessage
mess
age, System.Web.Services.Protocols.SoapExtension[] extensions) [0x00000]
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke
(System.String
method_name, System.Object[] parameters) [0x00000]
at com.google.api.adwords.lib.SoapServiceBase.Call (System.String
methodName,
System.Object[] parameters) [0x00000]
at com.google.api.adwords.lib.SoapServiceBase.Invoke (System.String
methodName
, System.Object[] parameters) [0x00000]
at com.google.api.adwords.v200909.TargetingIdeaService.get
(com.google.api.adw
ords.v200909.TargetingIdeaSelector selector) [0x00000]
at (wrapper remoting-invoke-with-check)
com.google.api.adwords.v200909.Targeti
ngIdeaService:get (com.google.api.adwords.v200909.TargetingIdeaSelector)
Any idea how this can be fixed? It seems to be a Mono problem and not
something I can fix in my code.
Thanks,
Niels
--
View this message in context: http://n4.nabble.com/SOAP-response-parsing-problem-Google-Adwords-API-Mono-2-4-2-3-2-6-1-tp1596977p1596977.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list