Some colleagues used custom modules to intercept WebService some time ago, and obtained some raw data by parsing the WebService class test XML object. However, after going online, the error 400 was always thrown, after repeated analysis, I finally found the problem.
The final reason is in context. request. inputstream. read (buffer, 0, length); and context. request. inputstream. position = 0; if an exception is thrown between the two statements, the client will get the 400 Error returned by the server.
This error is not common, so I also found this problem based on step-by-step debugging. Module, an exception occurs between reading the context current request stream and resetting the data stream to the starting point. As a result, the starting point of the current request stream is the final point of the normal data stream, so an error is thrown.
If reprint please indicate from: http://lawson.cnblogs.com/