cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bimargul...@gmail.com>
Subject Re: [jira] Commented: (CXF-1979) wsdl2java fails to generate working client code if web service name or serviceName is "Service"
Date Tue, 13 Jan 2009 21:09:24 GMT
Other packages I've seen manage to detect these collisions and FQ names as
needed to avoid collisions.

On Tue, Jan 13, 2009 at 4:03 PM, Glen Mazza (JIRA) <jira@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/CXF-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663472#action_12663472]
>
> Glen Mazza commented on CXF-1979:
> ---------------------------------
>
> I doubt we would want to get into class renaming, but I suspect the code
> would become seriously unreadable if we were to fully qualify every
> generated object just so clients can have services named "String",
> "Service", "List", "HttpServletRequest", etc.  Code readability would
> suffer, and from that, it would become a source of new errors.  I wonder
> what Metro does.
>
> OTOH, if users are indeed allowed to name their services whatever they
> want, perhaps we would need to allow this too in order to be compatible with
> JSR-224.
>
>
> > wsdl2java fails to generate working client code if web service name or
> serviceName is "Service"
> >
> -----------------------------------------------------------------------------------------------
> >
> >                 Key: CXF-1979
> >                 URL: https://issues.apache.org/jira/browse/CXF-1979
> >             Project: CXF
> >          Issue Type: Bug
> >          Components: Tooling
> >    Affects Versions: 2.1.3
> >         Environment: Windows XP, JDK 1.6.0_11, JAX-WS RI for the web
> service, and CXF for the client
> >            Reporter: Jon Miller
> >            Priority: Minor
> >
> > If you create a web service and set the name or serviceName to "Service"
> like the following,
> > @WebService(name = "Service", serviceName = "Service")
> > public class Service {
> > ...
> > }
> > and you use wsdl2java to generate client code for the web service. The
> generated code won't compile. This is because javax.xml.ws.Service is
> imported in some of the files and it gets confused between this and the
> generated classes. It would be better if the generated code fully qualified
> the class names rather than importing them. Or, if knew to look for
> conflicts and renamed the classes to something else. i.e. maybe just call it
> Service2 instead.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message