I come along with a problem I can’t fix by myself, even I’ve tried almost everything.
I developed a SOAP web service with NetBeans (7.2.1) and Java (jdk1.7.0_09,jre7) using Glassfish (3.1.2.2) with Windows 7 as OS, and need to secure the connection through SSL.
If I try to reach:
https://localhost:8181/secauth/Secauth?WSDL
I just see a blank page.
The error in GlassFish status window is:
“WARNING: Invalid request scheme for Endpoint Secauth. Expected http . Received https”
What I did to secure the connection:
-
Checked “Secure Service” in “Quality of Service” tab in NetBeans with option “Transport Security”
-
Edited the “web.xml” with the security tab and added a “security constraint”
<security-constraint> <display-name>SSL</display-name> <web-resource-collection> <web-resource-name>secauth</web-resource-name> <description/> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <description/> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>-
I can call:
https://localhost:8181/secauth/
-
and recive:
Hello World!
So my question is:
– What do I have to change to access WSDL over SSL ? / What occurs that problem above ?
Use case:
Webservice is called from an android application with ksoap2, works fine with HTTP, but not with HTTPS.
It seems that the “blank” page can not be parsed and some parsing errors appear.
Thank you really much in advanced !
Regards,
Marcel
http://docs.oracle.com/cd/E17802_01/webservices/webservices/reference/tutorials/wsit/doc/WSIT_Security9.html#wp151774
Solved my problem !
Seems to be that the problem was that the project was run BEFORE the security settings were applied.
So just follow the step-by-step instructions, insert your old src code BEFORE you run the project and everything should be fine !
Regards,
Marce