Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Webservice call failing with error message: Got handshake alert: unrecognized_name while opening stream from

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Webservice call failing with error message: Got handshake alert: unrecognized_name while opening stream from

    I am having a problem with accessing a web service running on a Tomcat server with an Apache HTTP server using SSL. This project was working correctly the last time I worked with it, but since then the following has changed.
    1) I have a new workstation that I moved the project to.
    2) The certificate on the server has expired and been replaced
    3) The name of the server on the web was changed, so the URL has changed.
    So at this point I am not sure what is causing my problem.

    The error message I am getting is:
    "Failed to access the WSDL at:
    It failed with:
    Got handshake alert: unrecognized_name while opening stream from

    The code that I am executing at this point looks like the following:
    public class OpenWS {
    public static Object openWS (String serviceURN, String serviceClass, String portName) {
    try {
    //App.getHostURL returns the URL of my host, which has changed since
    // the last time I ran this on my old workstation.
    URL url = new URL(App.getHostURL() + "wsdl?targetURI=" + serviceURN);
    Class classService = Class.forName(serviceClass);
    Constructor constructorService = classService.getConstructor(URL.class);
    //This is the line that is failing.
    Object objectService = constructorService.newInstance(url);
    Method portMethod = objectService.getClass().getMethod(portName);
    Object port = portMethod.invoke(objectService);
    return port;
    } catch (MalformedURLException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    } catch (ClassNotFoundException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    } catch (NoSuchMethodException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    } catch (SecurityException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    } catch (InstantiationException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    } catch (IllegalArgumentException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    } catch (InvocationTargetException ex) {
    Logger.getLogger(OpenWS.class.getName()).log(Level .SEVERE, null, ex);
    }
    return null;
    }
    }

    Below is the stack trace from the error.
    java.lang.NullPointerException
    at baseCode.LoginEmployeeController.serverLoginEmploy eeXml(LoginEmployeeController.java:99)
    at baseCode.LoginEmployeeController.processLogin(Logi nEmployeeController.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java :75)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java :279)
    at javafx.fxml.FXMLLoader$ControllerMethodEventHandle r.handle(FXMLLoader.java:1437)
    at com.sun.javafx.event.CompositeEventHandler.dispatc hBubblingEvent(CompositeEventHandler.java:69)
    at com.sun.javafx.event.EventHandlerManager.dispatchB ubblingEvent(EventHandlerManager.java:217)
    at com.sun.javafx.event.EventHandlerManager.dispatchB ubblingEvent(EventHandlerManager.java:170)
    at com.sun.javafx.event.CompositeEventDispatcher.disp atchBubblingEvent(CompositeEventDispatcher.java:38 )
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:37)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:35)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:35)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:35)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.EventUtil.fireEventImpl(Event Util.java:53)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil .java:28)
    at javafx.event.Event.fireEvent(Event.java:171)
    at javafx.scene.Node.fireEvent(Node.java:6863)
    at javafx.scene.control.Button.fire(Button.java:179)
    at com.sun.javafx.scene.control.behavior.ButtonBehavi or.mouseReleased(ButtonBehavior.java:193)
    at com.sun.javafx.scene.control.skin.SkinBase$4.handl e(SkinBase.java:336)
    at com.sun.javafx.scene.control.skin.SkinBase$4.handl e(SkinBase.java:329)
    at com.sun.javafx.event.CompositeEventHandler.dispatc hBubblingEvent(CompositeEventHandler.java:64)
    at com.sun.javafx.event.EventHandlerManager.dispatchB ubblingEvent(EventHandlerManager.java:217)
    at com.sun.javafx.event.EventHandlerManager.dispatchB ubblingEvent(EventHandlerManager.java:170)
    at com.sun.javafx.event.CompositeEventDispatcher.disp atchBubblingEvent(CompositeEventDispatcher.java:38 )
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:37)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:35)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:35)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:35)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.BasicEventDispatcher.dispatch Event(BasicEventDispatcher.java:35)
    at com.sun.javafx.event.EventDispatchChainImpl.dispat chEvent(EventDispatchChainImpl.java:92)
    at com.sun.javafx.event.EventUtil.fireEventImpl(Event Util.java:53)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil .java:33)
    at javafx.event.Event.fireEvent(Event.java:171)
    at javafx.scene.Scene$MouseHandler.process(Scene.java :3328)
    at javafx.scene.Scene$MouseHandler.process(Scene.java :3168)
    at javafx.scene.Scene$MouseHandler.access$1900(Scene. java:3123)
    at javafx.scene.Scene.impl_processMouseEvent(Scene.ja va:1563)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Sc ene.java:2265)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$Mo useEventNotification.run(GlassViewEventHandler.jav a:250)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$Mo useEventNotification.run(GlassViewEventHandler.jav a:173)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.ha ndleMouseEvent(GlassViewEventHandler.java:292)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:5 28)
    at com.sun.glass.ui.View.notifyMouse(View.java:922)
    at com.sun.glass.ui.win.WinApplication._runLoop(Nativ e Method)
    at com.sun.glass.ui.win.WinApplication.access$100(Win Application.java:29)
    at com.sun.glass.ui.win.WinApplication$3$1.run(WinApp lication.java:73)
    at java.lang.Thread.run(Thread.java:722)
    I am pretty sure it is something simple that I am missing, but if anyone can point me in the right direction I would appreciate it.

    Thank you


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Webservice call failing with error message: Got handshake alert: unrecognized_name while opening stream from

    java.lang.NullPointerException
    at baseCode.LoginEmployeeController.serverLoginEmploy eeXml(LoginEmployeeController.java:99)
    Is that happening in your code? What variable(s) on line 99 can have a null value?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Sep 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Webservice call failing with error message: Got handshake alert: unrecognized_name while opening stream from

    The problem seems to have been with me changing the server name. I was just now able to resolve the first problem with the following code "System.setProperty("jsse.enableSNIExtension", "false");" I am now working on a second problem, and if I need help on that I will let you know.
    Thank you
    Freddy

Similar Threads

  1. HTML call to a Webservice
    By kienkun1990 in forum Web Frameworks
    Replies: 2
    Last Post: January 5th, 2014, 01:57 AM
  2. Getting an error when opening a new Window through a JMenuItem
    By !Marcus in forum Java Theory & Questions
    Replies: 3
    Last Post: December 31st, 2011, 07:51 PM
  3. How to call webservice in java?
    By Subhasri in forum Web Frameworks
    Replies: 2
    Last Post: September 30th, 2011, 09:15 AM
  4. Error when opening eclipse
    By BlackJavaCoder in forum Java IDEs
    Replies: 4
    Last Post: September 3rd, 2011, 07:57 AM
  5. [SOLVED] Trying to call web service (and failing)
    By jamesruk21 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 15th, 2011, 12:35 PM