This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 96930

Summary: Create serviceName annotation by default
Product: webservices Reporter: gborkowski <gborkowski>
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description gborkowski 2007-03-01 12:19:53 UTC
When you create web service "MyService" using IDE (JAX-WS 2.0), you get class
like this:

@WebService
public class MyService {
}

If you deploy it to Tomcat, your service will be named "MyService". If you move
it to GlassFish, it will be named "MyServiceService". (IMHO it's a bit strange -
isn't it regulated by JAX-WS spec? perhaps no). It makes your service less
portable and is rather undesirable, I think. 
The simplest solution is to change it to:

@WebService(serviceName="MyService")
public class MyService {
}

In such a case it will be always named "MyService".

So I think it would be better if NetBeans by default generated web service
classes with serviceName annotation, preventing from unpleasent surprises during
deployment.
Comment 1 Milan Kuchtiak 2007-03-02 13:37:36 UTC
Good point.
The @WebService should have at least the serviceName attribute specified.
Comment 2 Lukas Jungmann 2008-04-14 17:10:23 UTC
moving opened issues where TM != dev to TM=TBD