开发者

SOAP response size

I'm attempting to consume a web service that has been creating using Soap::Lite (Perl). I'm consuming the service using C#. For the most part it works fine. I can grab responses and parse them as I see fit. However, I have certain calls that do not work.

I get the following message: "An existing connection was forcibly closed by the remote host"

It's my understanding that the server is probably cutting off the connection for whatever reason. I'm trying to find that reason. I think it's happening due to the size of the details of some responses. I've got one in particular that will always fail and when I view the XML from the SOAP response, it is always truncated at the exact same spot as if it gets to that spot and has hit a size limit.

So, I've done everything I can think of on the client size such as changing the MaxReceivedMessageSize and timeout settings, etc. I've noticed that I can increase timeouts and the execution time subsequently increases, but the diagnostics logging I'm doing always stops at the same spot.

I've also written a class that allows me to view the raw XML and again, it stops at the same spot.

I'm thinking maybe something on the server needs to changed but everything I've tried doesn't work. The service is hosted on a web server running IIS 6.

Does anyone have any suggestions for what I can do on either the client and/or server side?

Thanks

EDIT


I should note that there is no WSDL file for me to use. The application I'm working with is the only time I've ever worked with SOAP::Lite and from what I can tell it doesn't generate a WSDL.

@e36M3 - Thanks for the suggestion. I had never heard of soapUI. I installed it and tried it out and I can see many uses for it so I will be keeping it in mind for the future. Unfortunately it seems to be build around WSDL testing and I can't see how to test with it without providing a WSDL which is a problem given this particular situation.


Here is some of the relevant data from my trace logging. It starts with where the invalid xml ends and ends with the error information.

System.Net Verbose: 0 : [5772] 000031E0 ;/map>.</data

System.Net Verbose: 0 : [5772] 000031E0 >. System.Net Verbose: 0 : [5772] 000031E0 esp1:MRWebServic

System.Net Verbose: 0 : [5772] 000031E0 es__getIssueDeta

System.Net Verbose: 0 : [5772] 000031E0 ilsResponse> System.Net Verbose: 0 : [5772] 000031E0 AP-ENV:Body> System.Net Verbose: 0 : [5772] 000031E0 AP-ENV:Envelope>

System.Net Verbose: 0 : [5772] Exiting ConnectStream#15566556::Read() -> 12880#12880< br/> System.Net Verbose: 0 : [5772] ConnectStream#15566556::Read()

System.Net.Sockets Verbose: 0 : [5772] Socket#20784002::Receive()

System.Net.Sockets Error: 0 : [5772] Exception in the Socket#20784002::Receive - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

System.Net.Sockets Verbose: 0 : [5772] Exiting Socket#20784002::Receive() -> 0#0

System.Net.Sockets Verbose: 0 : [5772] Socket#20784002::Dispose()

System.Net开发者_运维问答 Error: 0 : [5772] Exception in the HttpWebRequest#63722612:: - The underlying connection was closed: An unexpected error occurred on a receive. System.Net Verbose: 0 : [5772] ConnectStream#15566556::Close()

System.Net Verbose: 0 : [5772] Exiting ConnectStream#15566556::Close()


In your binding for the web service in the app.exe.config should be a setting for the maximum received message size. The default is maxReceivedMessageSize="65536". Increasing the value should allow the client app to receive all of the data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜