The custom module intercepts the original content of all WebServices and throws the 400 error.

Source: Internet
Author: User

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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.