[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-7234) JAX-WS generated portType implementation has incorrect @WebService annotation

Gary Brown (JIRA) jira-events at lists.jboss.org
Fri Oct 1 06:35:39 EDT 2010


    [ https://jira.jboss.org/browse/JBIDE-7234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12554576#action_12554576 ] 

Gary Brown commented on JBIDE-7234:
-----------------------------------

If the web service is created from a WSDL definition, then I would expect the resulting web service implementation to represent a service with the same name and target namespace. So although I understand according to the spec the namespace is optional, I think it should be generated in this case, to allow the dynamically presented WSDL (from the jaxws service) to be equivalent to the WSDL from which it was created.

The developer can always remove the field (or change it) if they wish, but I think in this case having the targetNamespace is a sensible default.

I retried the test without the name field on the implementation class, and that works fine - so the name attribute is not needed.

I think the 'serviceName' is not a minor improvement, it is a bug. The name of the service is CreditAgencyService - that is the name used in the original WSDL definition, and it is also the name used in the 'serviceName' field of the @WebServiceClient annotation. So this needs to be fixed.



> JAX-WS generated portType implementation has incorrect @WebService annotation
> -----------------------------------------------------------------------------
>
>                 Key: JBIDE-7234
>                 URL: https://jira.jboss.org/browse/JBIDE-7234
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Webservices
>    Affects Versions: 3.2.0.M2
>         Environment: JBTools 3.2.0.beta1 nightly build.
>            Reporter: Gary Brown
>            Assignee: Brian Fitzpatrick
>         Attachments: PurchaseGoodsProcess-CreditAgency.zip
>
>
> When generating a Java Bean skeleton web service, based on a WSDL definition, the port type implementation class has an incorrect annotation.
> The port type implementation has:
> @WebService(serviceName = "CreditAgencyInterface", endpointInterface = "org.example.purchasing.creditAgency.CreditAgencyInterface")
> but the interface associated with the implementation defines:
> @WebService(name = "CreditAgencyInterface", targetNamespace = "http://www.jboss.org/examples/creditAgency")
> The end result is that when accessing the WSDL for the endpoint, once deployed to the JBossAS server, the WSDL has an incorrect target namespace and service name - service name is 'CreditAgencyInterface' instead of 'CreditAgencyService', and the target namespace is autogenerated based on the Java package name of the implementation class.
> When the annotation in the port type implementation's annotation was changed to be:
> @WebService(name = "CreditAgencyInterface", serviceName="CreditAgencyService", targetNamespace="http://www.jboss.org/examples/creditAgency", endpointInterface = "org.example.purchasing.creditAgency.CreditAgencyInterface")
> This fixes the serviceName attribute, and adds a 'name' attribute to be the port type. It also specifies explicitly the target namespace.
> Note: tried using jax-ws version 2.0 and 2.1, with same result.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list