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 84074

Summary: J2EE 1.5 web project doesnt create service-ref for jsp based client
Product: webservices Reporter: Srividhya Narayanan <vidhya>
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Status: NEW ---    
Severity: blocker CC: jungi, ludo, mgrebac, pcw, petertliu, pjiricka
Priority: P2    
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 84560    

Description Srividhya Narayanan 2006-09-02 00:37:25 UTC
I created a JavaEE5 web project. I have a web service client node created
referring to a local wsdl file. I create a jsp to call the client node. I open
the sun Dd to check to see if the service-ref is created an it is not. When I
get the merged DD bean and look for service-ref in it I get an empty list. This
prevents the enterprise pack identity functionality to work since I dont see the
service-ref, I am unable to secure it.
Comment 1 Milan Kuchtiak 2006-09-04 16:26:50 UTC
The javaee5 style supports @WebServiceRef annotations to inject web services to
client code. If you create client in a servlet, the @WebServiceRef is created there.
Unfortunately, the annotation lietener implemented in web/ejp project doesn't
listen to JSP (if you add @WebServiceRef to JSP the project doesn't know about it).

I think is not a bug but enhancement. Currently, in JAX-WS support(javaee5
project), we don't create any entries neither to webservices.xml nor to web.xml.

There are 3 workarounds :
1. use servlets instead of JSP
2. create <web-service-ref> element maually.
3. use J2EE1.4 project

If we wanted to support jsr109 style entirely we should have a "Client Type"
combo box information in WS Client wizard (as it is in J2EE1.4 project).
Currently we don't have.

Comment 2 Srividhya Narayanan 2006-09-06 17:47:49 UTC
I am fine to leave it as an enhancement.
Comment 3 Milan Kuchtiak 2007-05-15 10:50:01 UTC
The reason that annotations are not supported on JSP pages or tag files is
because all the information represented by annotations needs to be known at
deployment time. If an annotation is included in a JSP page, it won't be seen at
deployment time.

The only way is to generate <service-rev> element in web.xml.

The best solution, I see, is to generate <service-ref> element automatically
when WS Operation is drag & dropped to JSP.
Comment 4 Milan Kuchtiak 2007-05-15 11:28:42 UTC
See also a glassfish bug:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=3005