Use. Net to call Java Web Services

Source: Internet
Author: User

Last week was a week of tragedy. I tried to use C # To call a Java Web service, but it never succeeded.

Because the web services server environment is set to nls_lang = simplified chinese_china.zhs16gbk, it uses the GBK character set.

After the requestencoding of the proxy class is set to GBK/gb2312/UTF-8 multiple times, all requests can only receive the garbled packet header ?? XML version = "1.0" encoding = "UTF-8"?> ", It should actually be "<? XML version = "1.0" encoding = "UTF-8"?> ".

After reading this document for a long time, I learned that myproxy. requestencoding = system. Text. encoding. getencoding ("gb18030") should be used in. Net to set the GBK character set ...... Finally.

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.