CXF (3.1.1) client exceptions use the @XmlType. Name and @XmlType. Namespace to assign a different name to the class.

Source: Internet
Author: User

The most recent project uses WebService so that the latest version of 3.1.1 is used.

CXF client calls always appear this error, comprehensive network of various information modified as follows, problem solving

"@XmlType. Name and @XmlType. namespace assigning different package names to classes" is probably the meaning of changing the package name to the actual code as follows


1, the client generates the code



2.createtask.java code (two names are the same, so will be reported title error)



3. The cause is the package name in the server CreateTask uppercase (Error)


4. Solution:

(1) Best Scheme package name createtask to all lowercase createtask

(2) or when generating code, use the-p com.service.createtask to rename the application.

(3) The third kind of solution is not recommended, the Createtask.java in the @XmlType (name = "CreateTask", Proporder = {"arg0"}) in the name of the change to CreateTask can be

CXF (3.1.1) client exceptions use the @XmlType. Name and @XmlType. Namespace to assign a different name to the class.

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.