Bug 112237 - ServiceRef is not properly created if the project is a generated sample app
ServiceRef is not properly created if the project is a generated sample app
Status: VERIFIED FIXED
Product: webservices
Classification: Unclassified
Component: Client
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Milan Kuchtiak
issues@webservices
:
Depends on: 112766
Blocks: 105645
  Show dependency treegraph
 
Reported: 2007-08-07 20:37 UTC by Peter Liu
Modified: 2017-07-25 15:33 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Liu 2007-08-07 20:37:52 UTC
He is another issue with ServiceRef. Here is how to reproduce:

1. Install the standard NB.
2. First, create the stock service project by invoking New Project -> Samples -> Identity Blueprints -> Stock Service.
You'll need to resolve a few missing module references. Deploy the ear project. (Note due to bug 108075) you'll need to
restart the IDE in order to deploy the ear project.
3. Next, create the stock client project by invoking New Project -> Samples -> Identity Blueprints -> Stock Client.
4. Invoke Edit WS Attributes on the StockService service reference. Notice that AM security panel will come up with an
error message indicating that now ServiceRef exists in the project.

The only way I've found for the AM security panel to come is first build the project and then restart the IDE.
Comment 1 Milan Kuchtiak 2007-08-08 17:16:51 UTC
I see 2 problems actually here :

1.
The ServiceRef object isn't created for @WebServiceRef annotation when the service class is missing.
This is in due to Annoation Model architecture, when TypeElements require to be resolved (The fully qualified name for
the service class cannot be obtained when the class doesn't exist). I am afraid we cannot do anything with this.

2. 
Edit WS Attributes cashes the information from Annotation Model.
Even, when Service class (source file) is created in the project (case 1), the "Edit WS Attributes" dialog doesn't get
the actual model. The information from J2EE Annotation Model should be obtained "on fly" when the dialog is open.

Reassigning back to Peter for evaluation as I don't know who is the owner of AM security panel.
Comment 2 Peter Liu 2007-08-09 01:52:00 UTC
It looks like we will just have to document the first issue.
As for the second issue, I doubled checked. The AM security panel is not caching the annotation model at all.  The AM
security panel recheck for the service refs using model.runReadAction().  So, I don't this is the issue.

I am reassigning this back to Milan.
Comment 3 Milan Kuchtiak 2007-08-09 11:01:17 UTC
I found the reason for this issue - I mean for the second problem I described.
It's caused by the obscure way how we are adding build/generated/wsimport/client directory to source roots.
We hack somehow the WebProject's SourcePathImplementation:getResources(). Problem is that this method is not called when
client artifacts are generated from wsdl file (build action), only when a WS Clent is created by the wizard.

The result is that java source infracstructure cannot react in this case, that means java source infracstructure is not
notified that java artifacts are generated in build/generated/wsimport/client.

We need to solve this differently : similarly as in java project where we add/remove, programaticaly, the
build/generated/wsimport/client to compile classpath, when needed, that means :
when build/generated/wsimport/client is created or when build/generated/wsimport/client is removed.

I'll try to fix this issue for Beta 1.
Comment 4 Milan Kuchtiak 2007-08-13 14:44:43 UTC
Provided build/generated/wsimport/client is under source roots the problem no.2 is gone.
Comment 5 Milan Kuchtiak 2007-08-27 17:44:47 UTC
I cannot reproduce the issue since the Blueprints Sample -> StockService project cannot be created. 
Comment 6 Milan Kuchtiak 2007-08-30 21:21:20 UTC
This should be fixed.
See also the fix for issue 112736.
Comment 7 Jaroslav Pospisil 2008-01-31 13:56:22 UTC
v.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo