NetBeans Forums

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

Web Service Client code generation does not work with more than one WS-Client

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



Joined: 06 Jan 2009
Posts: 2

PostPosted: Tue Jan 06, 2009 9:44 am    Post subject: Web Service Client code generation does not work with more than one WS-Client Reply with quote

Hello everybody.

I started using netbeans ws-client feature a few days ago reading this: http://www.netbeans.org/kb/60/websvc/client.html.

All went smoothly so I decided to start a new test application on my own.
At first I created a pojo using this web service (code generation feature):

http://www.webservicex.net/geoipservice.asmx?WSDL

My application was running fine.
Then I add a new Web Service Reference to:

http://www.webservicex.net/CurrencyConvertor.asmx?WSDL

and I get in some troubles. Just adding this reference makes the same code unusable. It compiles but it doesn't work anymore.

This is the error I got:

Quote:

run:
javax.xml.ws.WebServiceException: class net.webservicex.GetGeoIP do not have a property of the name {http://www.webservicex.net}IPAddress
at com.sun.xml.internal.ws.client.sei.BodyBuilder$DocLit.<init>(BodyBuilder.java:188)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.<init>(SyncMethodHandler.java:120)
at com.sun.xml.internal.ws.client.sei.SEIStub.<init>(SEIStub.java:67)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:544)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:292)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:274)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:267)
at javax.xml.ws.Service.getPort(Service.java:92)
at net.webservicex.GeoIPService.getGeoIPServiceSoap(GeoIPService.java:56)
at wstest.Main.main(Main.java:20)
Caused by: javax.xml.bind.JAXBException: {http://www.webservicex.net}IPAddress is not a valid property on class net.webservicex.GetGeoIP
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:910)
at com.sun.xml.internal.ws.client.sei.BodyBuilder$DocLit.<init>(BodyBuilder.java:185)
... 9 more


Also I experienced a curious situation. Replacing the code using the first ws (GeoIP) with code (automatically generated by drag-n-drop) using the seconde ws works. Shocked

Is it a bug or am I wrong?

I'm facing the same problem with netbeans 6.1 and 6.5.

Bye,
m-
Back to top
elibus



Joined: 06 Jan 2009
Posts: 2

PostPosted: Tue Jan 06, 2009 10:15 am    Post subject: Reply with quote

I found where the problem is.

The services I used comes from the same organization and Netbeans creates a "ObjectFactory.java" class for each ws. Because the folder is named using the ws base URL (net.webservicex) which is the same for both the secondo ws overwrite "ObjectFactory.java" generated for the first one.
I think it's a bug.

m-
Back to top
advocat3



Joined: 16 Mar 2013
Posts: 3

PostPosted: Sat Mar 16, 2013 6:26 am    Post subject: Reply with quote

Wow I had this same exact problem and it took me HOURS of messing around only to get really lucky and google my problem. Thank you for pasting the entire stack trace!!

The solution is here in the bug you filed:
http://netbeans.org/bugzilla/show_bug.cgi?id=156337
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