WSDLToJava Error: Thrown by JAXB : A class

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

你可能感兴趣的:(Class)