aspose file tools*
The moose likes Web Services and the fly likes Urgent Help needed!! calling a https url from java program and sending a soap envelope request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Urgent Help needed!! calling a https url from java program and sending a soap envelope request " Watch "Urgent Help needed!! calling a https url from java program and sending a soap envelope request " New topic
Author

Urgent Help needed!! calling a https url from java program and sending a soap envelope request

Candida Samuel
Greenhorn

Joined: Jul 22, 2011
Posts: 2
Hi!

I am trying to call a https url via a java main. I have to pass a Soap envelope request to the url and I am expecting a String response from the other end. I have the necessary keystore files.
I get the following error response:
Server returned HTTP response code: 415 for URL


Can any one provide with a java program?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
According to the W3 standard document, HTTP response code means:
The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.

Have you tried to run the client and server without HTTPS, that is, using plain HTTP?
If you are having problems setting up either plain SSL or SSL with mutual authentication in connection to web services, please have a look at my book that contains complete examples on how to do both: http://www.slideshare.net/krizsan/scdjws-5-study-notes-3085287
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Candida Samuel
Greenhorn

Joined: Jul 22, 2011
Posts: 2
Hi!
Thanks for your reply.I have tried using plain http url and it works well.Not sure, how to go about https url.

If you have a code piece where in you' re calling a https url via java, can you please share it.

Thanks,
Candida
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Candida Samuel wrote:If you have a code piece where in you' re calling a https url via java, can you please share it.

Check the book I gave a link to in my previous post!
Best wishes!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Urgent Help needed!! calling a https url from java program and sending a soap envelope request
 
Similar Threads
Newbie doubts on XML Signature
Web services security implementation question
SOAP and https not working.
How to use java to invoke an external webservices (soap, soap1.2)?
java.text.ParseException in Web service