Connecting Kingdee voucher K3 (Java docking)

Source: Internet
Author: User

Talk about how docking before let me spit groove, kingdee what garbage software, docking Kingdee to install Kingdee system, I installed a failure to install a successful, Kingdee company to me installed seven times also did not succeed, finally sent me a mirror, there is a system installed in the Kingdee can only reluctantly, the back is this pit, It's indifferent to you! Docking document three Butt go! Some parameters not clear ask the result the other side is not clear, there is such irresponsible company! I need this piece of Java docking results people gave a C # code of the pit Ah! Later, the man sent a cxf to build! It's been a long time! Later asked each other, the results of the docking information is all Baidu out! That's what the hell pays for the docking. It's all pits! No more! Let's tell you about docking! In fact, connect Kingdee is very simple!

After the Kingdee system is installed:

1, install the APACHE-CXF locally, I will upload on my github you can download or go to csdn, this decompression and then the same as the JDK configuration environment variables.

2. Execute the following command into the bin directory of CXF: wsdl2java-d d:\\demo-client http://127.0.0.1/KDWEBSERVICE/VoucherData.asmx?wsdl I this piece is the generated code to enlarge the D disk of the demo directory, followed by the method you want to generate access path, the path, as long as you install the Kingdee system, and then access http://127.0.0.1/KDWEBSERVICE/this path can see his method.

3, the code is generated after we can go to the database to check the ID of the account set, set table: T_ad_kdaccount_gl Voucher table: T_voucher, the code will generate two methods a query to add, we can first try to find out whether the method can be queried, Can be queried to explain how the method is passed!

Part of the code:

SYSTEM.OUT.PRINTLN ("Invoking query ...");
int _query_iaisid = 2;//account Set ID
Java.lang.String _query_struser = "Administrator";//username
Java.lang.String _query_strpassword = "";
int _query_ipercount = 10;
Java.lang.String _query_strfilter = "";
Java.lang.String _query_strtimestampval = "";
javax.xml.ws.holder<java.lang.string> _query_strtimestamp = new Javax.xml.ws.holder<java.lang.string> ( _query_strtimestampval);
javax.xml.ws.holder<com.kingdee.voucherdata.arrayofvoucher> _query_queryresult = new javax.xml.ws.Holder< Com.kingdee.voucherdata.arrayofvoucher> ();
javax.xml.ws.holder<java.lang.string> _query_strmaxtimestamp = new javax.xml.ws.holder<java.lang.string > ();
javax.xml.ws.holder<java.lang.string> _query_strerror = new javax.xml.ws.holder<java.lang.string> ();
Port.query (_query_iaisid, _query_struser, _query_strpassword, _query_ipercount, _query_strfilter, _query_ Strtimestamp, _query_queryresult, _query_strmaxtimestamp, _query_strerror);

4, this piece of my test is placed in the generated project inside the test, integration into our project, there is a problem, the jar package conflict results conflict resolved after a jar package in the project to the invocation of a method to rewrite, the project jar I dare not delete, then I think of a different method, I built a springboot small project, and then my own project called this project, this project re-call Kingdee project, completely can!

The code and CXF will be posted on github and you can download it!

Connecting Kingdee voucher K3 (Java docking)

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.