You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Reto Weiss <re...@axonivy.com.INVALID> on 2023/02/08 13:00:51 UTC

wsdl2java produces code that cannot be compiled

Hi There

wsdl2java produces code that cannot be compiled if the service or port name in the *.wsdl file has similar or equal names as the javax.jws annotations used on the generated code.

Example of generated code for the attached service.wsdl file:

package ws.ws.client;

import javax.annotation.Generated;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;

/**
* This class was generated by Apache CXF 3.5.3
* 2023-02-06T17:05:45.493+01:00
* Generated source version: 3.5.3
*
*/
@WebService(targetNamespace = http://ws.ws/, name = "WebService")
@XmlSeeAlso({ObjectFactory.class, process.webservice.ivy.ivyteam.ch.client.ObjectFactory.class, org.w3._2001.xmlschema.ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2023-02-06T17:05:45.493+01:00", comments = "Apache CXF 3.5.3")
public interface WebService {

Here the name of the web service is 'WebService' but also the @WebService annotation is used. Therefore, this code does not compile. Wsdl2Java should use full qualified name for the @WebService annotation in this case.

This seems to be a bug.

Should I file an issue for this?

Regards

Reto Weiss
El. Ing. HTL
Product Owner / Core Developer
Axon Ivy AG


+41 41 249 25 70<tel:+41412492570>
reto.weiss@axonivy.com<ma...@axonivy.com>
www.axonivy.com<https://www.axonivy.com/>
Baarerstrasse 12 ∙ CH-6300 Zug


[Ein Bild, das Text enthalt.  Automatisch generierte Beschreibung]
LinkedIn<https://www.linkedin.com/company/axonivy> ∙ Facebook<https://www.facebook.com/axonivy> ∙ Xing<https://www.xing.com/pages/axonivyag> ∙ Twitter<https://twitter.com/axonivy> ∙ YouTube<https://www.youtube.com/channel/UCkoNcDoeDAVM7FB-txy3jnQ>