NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Webservices and WS clients in netbeans

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
David Dirga
Posted via mailing list.





PostPosted: Fri Aug 07, 2009 12:28 pm    Post subject: Webservices and WS clients in netbeans Reply with quote

Hello,
I've recently started experimenting with WS in netbeans. Having very little idea about java's approach to the issue, I've followed a tutorial. I managed to create a web project for webservice, java console project for a client and everything worked fine.
I'm now trying to have individual WS communicate with each other, call WS methods from WS methods themselves. I was hoping to achieve that by making webservice clients in the same project and making calls the same way it worked in tutorial aplication (for example by drawing the method I need to call from webservices reference to the code).
I ran into two different problems (on different versions on netbeans, but I suspect that's just coincidence). For one, when I draw two different methods from two different webservice clients (references) to the code, it creates first a variable called service (of type <WebserviceName>Service) wchich works fine, then a service_1 variable which reports as symbol not found.
I tried updating to NB 6.7 and before I even got this far, I ran into NB generating code for the clients, including interfaces with same names as are those of WS classes, putting them into the same package (as generated code) - which leads to duplicate class error.
I'd like to ask
1) Is my approach maybe generally wrong?
and if not
2) How to avoid the duplicate class problem (jax-ws client doesn't allow me to specify package)
3) What's with this service_1 variable.
Thanks for help,
David Dirga
Back to top
mkuchtiak
Posted via mailing list.





PostPosted: Mon Aug 10, 2009 9:21 am    Post subject: Webservices and WS clients in netbeans Reply with quote

Hi.

It's generally not recommended to create WS client in the same project
as web service. Anyway, in your case it has a sense.
Actually, in 6.7 or 6.5 release it is possible to specify a package
name where Client java artifacts should be generated :

- set "package" option to wsimport in :

WEB Service References | WS Node | Edit WS Attributes | Wsimport Options

e.g.

Option Value
package org.mypackage.com

(and for sure clean & build the project)

The package cannot be specified in WS Client wizard. However, this was
already fixed. Next release should be fine.
See: http://www.netbeans.org/issues/show_bug.cgi?id=169904
Sorry for inconvenience.
Milan


David Dirga wrote:
Quote:
Hello,
I've recently started experimenting with WS in netbeans. Having very
little idea about java's approach to the issue, I've followed a
tutorial. I managed to create a web project for webservice, java
console project for a client and everything worked fine.
I'm now trying to have individual WS communicate with each other, call
WS methods from WS methods themselves. I was hoping to achieve that by
making webservice clients in the same project and making calls the
same way it worked in tutorial aplication (for example by drawing the
method I need to call from webservices reference to the code).
I ran into two different problems (on different versions on netbeans,
but I suspect that's just coincidence). For one, when I draw two
different methods from two different webservice clients (references)
to the code, it creates first a variable called service (of type
<WebserviceName>Service) wchich works fine, then a service_1 variable
which reports as symbol not found.
I tried updating to NB 6.7 and before I even got this far, I ran into
NB generating code for the clients, including interfaces with same
names as are those of WS classes, putting them into the same package
(as generated code) - which leads to duplicate class error.
I'd like to ask
1) Is my approach maybe generally wrong?
and if not
2) How to avoid the duplicate class problem (jax-ws client doesn't
allow me to specify package)
3) What's with this service_1 variable.
Thanks for help,
David Dirga
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


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