Hello,


I have been trying to invoke a web service (build in axis2, deployed in 
weblogic). The client is built in .net.



The web service is build & deployed.



While invoking the web service, one of the exception that we faced:



Exception:



            -                       ex         {"The maximum message size quota 
for incoming messages (65536) has been exceeded. To increase the quota, use the 
MaxReceivedMessageSize property on the appropriate binding element."}          
System.Exception {System.ServiceModel.CommunicationException}





StackTrace:

                        `

                        StackTrace        "\r\nServer stack trace: \r\n   at 
System.ServiceModel.Channels.MessageEncoder.BufferMessageStream(Stream stream, 
BufferManager bufferManager, Int32 maxBufferSize)\r\n   at 
System.ServiceModel.Channels.MessageEncoder.ReadMessage(Stream stream, 
BufferManager bufferManager, Int32 maxBufferSize, String contentType)\r\n   at 
System.ServiceModel.Channels.HttpInput.ReadChunkedBufferedMessage(Stream 
inputStream)\r\n   at 
System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception& 
requestException)\r\n   at 
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan
 timeout)\r\n   at System.ServiceModel.Channels.RequestChannel.Request(Message 
message, TimeSpan timeout)\r\n   at 
System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message
 message, TimeSpan timeout)\r\n   at 
System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, 
TimeSpan timeout)\r\n   at 
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, 
ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan 
timeout)\r\n   at System.ServiceModel.Channels.ServiceChannel.Call(String 
action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] 
outs)\r\n   at 
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
 methodCall, ProxyOperationRuntime operation)\r\n   at 
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage 
message)\r\n\r\nException rethrown at [0]: \r\n   at 
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, 
IMessage retMsg)\r\n   at 
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, 
Int32 type)\r\n   at 
exampleServiceCommonLibrary.exampleJobService.exampleJobServicePortType.getJobFetcherResponse(getJobFetcherResponseRequest
 request)\r\n   at exampleService.JobFetchingThread.ThreadJob() in 
E:\\Working_Folder\\exampleService\\exampleService\\Thread 
Factory\\JobFetchingThread.cs:line 104"



>From the exception, it is understood that the issue is with the binding. We 
>checked in one of the forums - 
>http://forums.silverlight.net/p/21326/74375.aspx and in the thread it mentions:

"Change should be on the ServiceReferences.ClientConfig, but in my case even 
though I had changed it I was still getting the error. Then I realized I was 
creating the binding dynamically in code, so if you are doing the same make 
sure you set the MaxReceivedMessageSize there, e.g.

[9/27/2012 4:57:00 PM] Anshuk Pal Chaudhuri: BasicHttpBinding binding - new 
BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);

binding.MaxReceivedMessageSize = 2147483647;"



We did this changes and it worked, but what makes me wonder is that is this the 
real long term solution or just a temporary workaround. If anyone has faced a 
similar issue, please share what of fundamental changes are required to make 
this work as a permanent fix.



Anshuk

Reply via email to