• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NetBeans 7.2 Web Service Client: InaccessibleWsdlException

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been trying to figure out for > 2 days how to deploy a web service client
jar within a "Java Web Application" project in NetBeans.

If I create a web service client in a "Java Application" project, the service is
called without fail. So, it does not appear to be a connectivity/VPN issue.
However, calling the same code deployed within an external jar file in a "Java
Web Application" project yields a plethora of different
InaccessibleWsdlException causes (depending on what trial/error solution I try
to implement). I have seen "401 for URL", "PKIX path building failed",
"ValidatorException", and other errors.

Nothing I have tried has worked except simply creating a "Java Application"
project, which I cannot really use. I.e., this is a web application which has a
GoF Command pattern calling a framework to process a web service call. The
framework is a distributed jar file and contains the commands which call the web
services. If I put the command class in the "Java Application" project, it runs
without fail. If I try to call it from within the jar file in the framework, it
always gives an "InaccessibleWsdlExeption", with various causes.

I need to know how to bundle/build/distribute/configure/whatever the framework
and/or WSDLs to be able to keep the framework separate from the rest of the
"Java Web Application" project files. This framework calls a facade, which may
call a whole different set/version of web services. It also can/will be changed
for various clients/configurations, so the external jar is necessary to avoid
having 1001 branches of the web app.

The code fails on trying to instantiate an instance of the WSDL class' web
service client.



I have tried both creating the client stubs and domain objects from both a local
WSDL and a WSDL URL, to no avail. I have only used the "Web Service Client"
wizards from within NetBeans; however, I am willing to entertain any suggestion
on manually writing one. I generally have someone write/generate the stubs for
me; but I am flying solo on this project and am a novice with NetBeans.

This is the annotation in the generated class for a web service client generated
from a local WSDL:



This is the annotation in the generated class for a web service client generated
from a WSDL URL:



I have tried deploying the "Java Application" jar file in the "Java Web
Application" and it, too, failed for the same reason(s).

I have tried various solutions found on the net (e.g., using the
BindingProvider.ENDPOINT_ADDRESS_PROPERTY, putting the wsdls and
jax-ws-catalog.xml in the META-INF folder of the jar, changing paths to
relative, et. al.). Nothing has worked except creating a "Java Application"
project, which doesn't really help me. I haven't really found anything close to
a simple guide for building this type of application. The few guides I have
found has been 1-2 hours of reading to determine that they were no where close
to solving the problem. So, I have been doing a lot of trial-and-error, which
has utterly failed.

Can anyone please help me to figure out how to bundle/build/distribute/configure
a jar file with web service client(s) in a web app's war (or whatever)?

Thanks in advance for your help.
 
IvanG Bell
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, so in order to eliminate some clutter, I broke the project down into three separate projects:

1) The Web Service stubs.

This project is simply all of the stubs (i.e., clients) compiled into its own jar file.

2) The command framework.

This project is the GoF Command framework (called by the Java Web Application). It has the web service stubs jar in its classpath.

3) The NetBeans Java Web Application project.

This project generates the war file used to deploy the solution.


I am still getting the "2 counts of InaccessibleWsdlException" error; but am now consistently getting a "401 for URL" cause. I am looking into how to bundle authenticated web service clients now.

Any help on this would be appreciated.
 
IvanG Bell
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, with the help of http://netbeans.org/bugzilla/show_bug.cgi?id=136115 and http://stackoverflow.com/questions/4163586/jax-ws-client-whats-the-correct-path-to-access-the-local-wsdl, I am a little closer. I am now getting a "Got Connection refused" error. Anyone seen this?
 
IvanG Bell
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am past creating the service object. 3 days of hell and now it is failing on the very next statement (creating a port from the service object).



Fails on line #4. I am getting "Unable to create JAXBContext" caused by a lot of conflicts:



So, it seems as if it is not reading my bindings/schema correctly. Can anyone out there please help me with this? I simply want to call my client's web service over https. I am using a jax-ws client generated by NetBeans 7.2. I have no control over their services, can't change the security, can't put the SSL on the VPN tunnel, et. al. And, yet, I can't seem to write a client bundled in a war file that can communicate with it. I know that someone on the globe has done this. I hope they read and respond.
 
IvanG Bell
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, so I gave up and deleted all of the projects and started from scratch, to no avail. I got the same errors as before.

So, I uninstalled NetBeans, cleaned up registry, directories, old project files (e.g., build.xml, nbproperties), et. al. Then I reinstalled NetBeans, created new projects from existing sources and voila! Everything is working as it should have on the first day of this trial.

I have three projects.

1) The Web Service stubs.

This NetBeans Java Application project is simply all of the stubs (i.e., clients) compiled into its own jar file. Created all of the Web Service References from the WSDL URLs and did a build into the jar.

2) The command framework.

This project is the GoF Command framework (called by the Java Web Application). It has the web service stubs jar (created from #1 above) in its classpath.

3) The NetBeans Java Web Application project.

This project contains both libraries (from #1 and #2) and generates the war file used to deploy the solution.

I hope this helps anyone else who struggles with this issue. I found nothing like it on the web. I haven't used the "uninstall/reinstall" strategy since the late 80's early 90's. Go figure.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have the following problem




Can you help me, to please?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic