• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

NetBeans Web Service client attempt

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have NetBeans 6.7 on Tomcat 6.0.20.
I have built regular Web apps with NetBeans and Tomcat 6.0.20, but now I want to build my first Web Service client using the demo that comes with NetBeans called StockQuoteClient.

After I hit the Run command I get the following failed message:



Do I need to load something to make this work?
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe make sure you have JAX-WS 2.1 added as a library. Get into your project properties and click Add Library, you should see the jax-ws2.1 library there. Hope that helps.
 
Ed Carrington
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I added the JAX-WS 2.1 libary and attempted Run again and got the following message:


Please advise.
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ed Carrington wrote:I added the JAX-WS 2.1 libary and attempted Run again and got the following message:
[code]
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
wsimport-init:
Created dir: C:\webnet\StockQuoteClient\StockQuoteClient\build\generated-sources\jax-ws
wsimport-client-StockService:
Created dir: C:\webnet\StockQuoteClient\StockQuoteClient\build\generated\jax-wsCache\StockService
Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
parsing WSDL...


[ERROR] Unable to parse "http://localhost:8080/StockQuoteService/StockService?xsd=1" : Connection refused: connect
line 47 of file:/C:/webnet/StockQuoteClient/StockQuoteClient/src/conf/xml-resources/web-service-references/StockService/wsdl/localhost_8080/StockQuoteService/StockService.wsdl

[ERROR] Unable to parse "http://localhost:8080/StockQuoteService/StockService?xsd=1" : Connection refused: connect

Failed to read the WSDL document: file:/C:/webnet/StockQuoteClient/StockQuoteClient/src/conf/xml-resources/web-service-references/StockService/wsdl/localhost_8080/StockQuoteService/StockService.wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.


[ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s):


Please advise.



Are you running this locally (laptop or desktop)? If you deployed this to another box then it's likely the environment changed. That could mean that your service is looking for the wsdl on the c drive and if you deployed to Linux then there is no c drive. In which case you need to put the wsdl in a place where your deployed code can retrieve it.

I could be way off too.

I had a similar problem and solved it by putting the wsdl on a different box I could connect to. In my case, the wsdl came from a COBOL web service that didn't have a mechanism for publishing the wsdl. So I had initially put it on my c drive and ran into problems when I deployed to a Linux box. My solution was to put the COBOL wsdl on another box and then reference the wsdl from there. I also had some proxy issues that, thankfully, my server support team helped me hurdle. I should also mention that the app I was working on was a daisy chained web service. That is to say that a front end client connected to my web service that connected to a Legacy (COBOL) web service.

If you are using an example, it doesn't seem like it should be this difficult. Wish I could be of more help and give you a better concrete answer.

 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Have you installed Metro in Tomcat, as described on this webpage: https://metro.dev.java.net/2.0/ ?
Basically, what it does is copy some JARs into the Tomcat installation.
After having installed Metro, developing web services in NetBeans and deploying to Tomcat is identical to when deploying to GlassFish.
Best wishes!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic