This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes SOAP and HTTPs Help!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP and HTTPs Help!!!" Watch "SOAP and HTTPs Help!!!" New topic
Author

SOAP and HTTPs Help!!!

James Bukowska
Greenhorn

Joined: May 10, 2007
Posts: 9
Hi all,

I am trying to connect to a secure site running a SOAP server but every method I have tried results in a deadend..., can anyone tell me if I have the right idea?

I am new to SOAP and new to creating secure connections HTTPs so the mix probably isn't good, ideally I'd deal with 1, then move onto 2 but that isn't possible atm since I don't have the server here, I suppose if the need should arise (which hopefully it won't) I could write a simple server and test that way then build up, but surely, it can't be that difficult can it?

My first attempt resulted in something I more or less expected, I assume the PriviledgedActionException indicates me trying to access a secure connection without sending any information about a username/password?

Does the following mean the server replied/rejected my request and therefore spawned the exception? e.g. I got to the server at least, or was it within Java recognising the protocol?

Exception: com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed



Attempt 2: next, I tried to create a HttpsURLConnection and use that but succeeding in the next exception: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad endPoint type sun.net.www.protocol.https.DelegateHttpsURLConnection:https://partners.dev.alibris.com/partners

I do have a username/password, and the protocol is HTTPs, am I at least on the right track?

Should the above code example (or some rendition of it) and below work?



Thank you for any ideas/help, much appreciated... I truly would like
understand more about this, it seems so simple yet so darned illusive!

Oops, i just added the output I tried to send...

The app is run from the command line... I do not have a SecurityManager, the only information i was given was an example message, an example response...

The url, https as protocol and username/password

Thanks
[ August 23, 2007: Message edited by: James Bukowska ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41015
    
  43
PrivilegedActionException is usually thrown if an action is attempted that is not allowed by a security manager. What kind of client is this - applet, web app, desktop app, ... ? Is it run with a security manager?

That the code at the end of your post doesn't get a response is not surprising, since it sends no request.


Ping & DNS - my free Android networking tools app
James Bukowska
Greenhorn

Joined: May 10, 2007
Posts: 9
Updated post
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOAP and HTTPs Help!!!
 
Similar Threads
HttpsURLConnection ClassCastException Question
Posting values to HTTPS Url
URLConnection 422 Http Error response
Java: entering a secure website with userid and password
FTP