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

Web service URL fails with 'https', not 'http'

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following is some of the code I use to connect to a web service. This code functions only if the web service URL starts with 'http' rather than 'https' even though both URL's are valid.

I'd appreciate any ideas on why the code fails when the web service URL starts with 'https', but not when 'http' is used. Thanks.

The error is also included below.
_______________________________________
CODE:


SOAPMessage message = null;
SOAPMessage response = null;
private String EndPointUrl = null;
_________________________________________________
SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance();
SOAPConnection con = scFactory.createConnection();

EndPointUrl = "http:// ... "; // web service URL

URLEndpoint endpoint = new URLEndpoint(EndPointUrl);
response = con.call(message, endpoint);
__________________________________________________

ERROR:


javax.xml.soap.SOAPException: java.net.MalformedURLException: unknown protocol: https at org.apache.axis.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:93)
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using SSL with Axis
Web Services Over SSL - HOW TO
Chapter 11: Web Service Security (PDF) (Page 18)
Chapter 3: SAAJ (PDF) Setting up the client system (page 156 (73))
 
Michael Scott
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peer. The links you provided contain much useful information.
 
There's a city wid manhunt for this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic