Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SSL Web Service Client

 
Bernhard Haeussermann
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I have a web service that uses SSL running a Glassfish application server.
Its web.xml looks like this:

Now, when I create a client for this web service and generate the client-stubs with Eclipse's "New Web Service Client" wizard, there is no problem.
However, when I do this with wsimport using the following Ant-file:

the code generation is successful, but when I try to do a web service call I get this exception:

I also made the web method in the web service write a message to standard output when it is called, but the method doesn't even seem to be called!
What am I doing wrong?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Misunderstood question, see new reply below!
 
Bernhard Haeussermann
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a new plain Java project and generated the artifacts using the Ant script

but I get exactly the same error when I try to do a web service call.
Note that when I use the "New Web Service Client" wizard the web service call is successful.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I misread your question!
Take a look at my SCDJWS study notes, in which I describe how to develop a plain Java client connecting to both a service requiring SSL and a service requiring mutual authentication: http://faq.javaranch.com/content/Exam-Objectives-5.pdf
The tutorial can be found in section 8.3, starting at page 235.
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic