错误信息:
faultString: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ServiceModel.Dispatcher.NetDispatcherFaultException: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:ProcessRequestResponse. The InnerException message was 'There was an error deserializing the object of type Ctrip.Flight.TradeOpenApi.ProxyService.TradeAPIPolicyWS.ProcessRequestResponseBody. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 15296.'.  Please see InnerException for more details. ---> System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type Ctrip.Flight.TradeOpenApi.ProxyService.TradeAPIPolicyWS.ProcessRequestResponseBody. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 15296. ---> System.Xml.XmlException: The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 15296.
   at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
   at System.Xml.XmlBaseReader.ReadContentAsString()
   at System.Xml.XmlBaseReader.ReadElementContentAsString()
   at ReadProcessRequestResponseBodyFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
   at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
   at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   --- End of inner exception stack trace ---
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName)
   at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)
   --- End of inner exception stack trace ---
上面是说最大字符串内容长度指标(8192)已超过在读取XML数据。该指标可以增加,通过改变maxstringcontentlength。
我是用wsdl文件生成的client请求的。maxstringcontentlength这个值在哪里设置啊?求帮助webservicejava长度接口

解决方案 »

  1.   


    没有找到方法,配置文件是哪个?知道吗?
    亲,你就给我一个异常报错。我去哪里找啊。。
    这没有什么说明文档么?
    你怎么知道可以设置maxstringcontentlength的?肯定有一个地方告诉你吧,告诉你的那个地方没有告诉你怎么设置么?
      

  2.   


    没有找到方法,配置文件是哪个?知道吗?
    亲,你就给我一个异常报错。我去哪里找啊。。
    这没有什么说明文档么?
    你怎么知道可以设置maxstringcontentlength的?肯定有一个地方告诉你吧,告诉你的那个地方没有告诉你怎么设置么?上面错误信息里面说的:This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 15296.
    但不知道哪里配。。
      

  3.   

    就是用wsdl生成的client代码去调用webservice接口,,也没有找到什么可以配置的东西,不知道要怎么设置。网上找了下。。看.net和C#都有个web.config可以在里面配的。