Click here to Skip to main content
12,445,931 members (76,464 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

14.6K views
1 bookmarked
Posted

Apache CXF wsdl2java Error

, 14 Jan 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
I was trying to consume a web service, creating the Java classes using Apache CXF and the command line wsdl2java tool

Introduction

I was trying to consume a web service, creating the Java classes using Apache CXF and the command line wsdl2java tool.

Error

WSDLToJava Error: Thrown by JAXB : A class/interface with the same name "*************" is already in use. Use a class customization to resolve this conflict.

org.apache.cxf.tools.common.ToolException: Thrown by JAXB : A class/interface with the same name "*************" is already in use. Use a class customization to resolve this conflict.

Solution

You can create a class customization binding to resolve this issue or just use the autoNameResolution flag:

Option A

wsdl2java -autoNameResolution http://api.yourwebservice.com/yourWebService.wsdl

Option B

Check additional information to create a custom binding here.

Additional Information

A suggestion was added to the CXF Apache Project to improve the error message which seems to be already implemented in the latest versions:

https://issues.apache.org/jira/browse/CXF-2600

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Klaus Stefan Gerber
Architect POHN IT-Consulting GmbH
Switzerland Switzerland
No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160811.3 | Last Updated 14 Jan 2011
Article Copyright 2011 by Klaus Stefan Gerber
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid