NetBeans Forums

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

Multiple Web Service References?

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
onethousand



Joined: 01 Oct 2008
Posts: 3

PostPosted: Wed Oct 01, 2008 4:49 pm    Post subject: Multiple Web Service References? Reply with quote

I'm writing a web service client with NetBeans, and have imported three web service references from the same package. When I click on each and select "Refresh Client," however, it deletes the generated classes from the previous ones meaning that only one can be imported at a time.

Looking at the console, it's running a build rule like: wsimport-client-clean-ServiceName

Clearly it's the "clean" rule that's causing all this headache, but I don't know how else to properly invoke wsimport on each of my web service references.

Is there any way to refresh all the clients without having each one delete the others?
Back to top
emiddio-verizon
Posted via mailing list.





PostPosted: Wed Oct 01, 2008 7:12 pm    Post subject: Multiple Web Service References? Reply with quote

i'm curious also -- i think if/when i had the problem i used separate
package for each import.

gary

----- Original Message -----
From: "onethousand" <address-removed>
To: <address-removed>
Sent: Wednesday, October 01, 2008 9:49 AM
Subject: [nbj2ee] Multiple Web Service References?


Quote:
I'm writing a web service client with NetBeans, and have imported three
web service references from the same package. When I click on each and
select "Refresh Client," however, it deletes the generated classes from
the previous ones meaning that only one can be imported at a time.



Looking at the console, it's running a build rule like:
wsimport-client-clean-ServiceName



Clearly it's the "clean" rule that's causing all this headache, but I
don't know how else to properly invoke wsimport on each of my web service
references.



Is there any way to refresh all the clients without having each one delete
the others?



Back to top
onethousand



Joined: 01 Oct 2008
Posts: 3

PostPosted: Wed Oct 01, 2008 7:53 pm    Post subject: Re: Multiple Web Service References? Reply with quote

emiddio-verizon wrote:
i think if/when i had the problem i used separate
package for each import.


The problem with that approach is that common data types are then duplicated in each of the different packages and can't be cast into each other. (So if I had a class, say Vehicle, that all the web services use, there's suddenly be a Vehicle class for every web service and instances of the different Vehicles couldn't be exchanged between web services.)

Obviously this is a big problem for me. Surely there's a way around it. Confused
Back to top
joeo



Joined: 07 Oct 2008
Posts: 7
Location: Sterling, Va

PostPosted: Tue Oct 07, 2008 9:53 pm    Post subject: Reply with quote

I too am having this same problem.
Anyone found a work around? This seems like a bug in the IDE.

-Joe
http://www.lovehorsepower.com
Back to top
rousseau_jp



Joined: 04 Dec 2008
Posts: 1
Location: Brussels, BE

PostPosted: Thu Dec 04, 2008 1:46 pm    Post subject: Reply with quote

The only solution when importing multiple wsdl that share the same namespace is to edit the web service attributes.

On the Web Service Reference, right-click on "Edit Web Service Attributes"
In the WSDL customization tab, expand the first node "Global customization"
There you should enter a unique package name that differs from the one that would be generated from the wsdl's namespace.

Please note that even if you were able to build all your web client references in the same package, you would still have a problem with the generated class ObjectFactory. Indeed, that class is generated by Jaxb to offer createXXX methods for your objects (ports, portypes, ...).
That class would always be overwritten by the latest wsdl compiled...

Hope this helps..


joeo wrote:
I too am having this same problem.
Anyone found a work around? This seems like a bug in the IDE.

-Joe
http://www.lovehorsepower.com
Back to top
vincewebb



Joined: 15 Jan 2009
Posts: 16

PostPosted: Mon Jul 06, 2009 4:33 pm    Post subject: Reply with quote

When I came across the answer above from Julien-Pierre Rousseau I was very pleased. It fixed the difficulty I was having trying to consume two different web services from the same company.

The default name spaces are identical:
com.peregrine.servicecenter.pws

This caused big problems but using NetBeans 6.5 I followed Julien-Pierre's instructions and specified 2 different package names:
com.peregrine.servicecenter.pws.im
com.peregrine.servicecenter.pws.pm

This was some months back, it did the job and I was very pleased. Thank you Julien-Pierre.

BUG in NetBeans 6.7 ?

Last week after being prompted by a PC disk failure I moved on from NetBeans 6.5 to 6.7. Julien-Pierre's documented steps still appear to look OK, however Netbeans 6.7 does not obey. Most of the auto generated code is placed in the default package and a sub directory of the default package. Only a couple of files get placed in each of the specified packages.

Any ideas ?
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