File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP and HTTPs Help!!!" Watch "SOAP and HTTPs Help!!!" New topic

SOAP and HTTPs Help!!!

James Bukowska

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: 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

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

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

Joined: Mar 22, 2005
Posts: 42965
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.
James Bukowska

Joined: May 10, 2007
Posts: 9
Updated post
I agree. Here's the link:
subject: SOAP and HTTPs Help!!!
jQuery in Action, 3rd edition