My client has to be authenticated on the third party service using the certificate they provided. And the code in the link is to fool java security into accepting a fake certificate. I can't be doing that.
Main Topics
Browse All TopicsI'm creating a java web service using axis 1.4. I've already generated a client and service from a 3rd party provided wsdl.
The 3rd party server requires authentication and I have their certificate and keystore. When I test the client, the response tells me I'm not trusted, so I need to get the certificate (or a reference) put into the request. Or should I be using the keystore?
I've researched this and can't determine whether I should pass the location of the keystore or the the .cer file as a string with addBodyElement or addParameter or what? Or am I completely lost in the weeds?
I'm under time pressure on this, so max points. Thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Sorry I must have misread the page. When I find the code I did where I used a valid 3rd party certificate, I will post. Thought the information in that link looked like what I used though. Know definitely, I imported using keytool then used the TrustManager. I know the topic is slightly different, but I was pointing you there for the API used. Probably wrong of me, so as I said I know I have some code I used to connect a driver code I wrote to a remote web service via HTTPS and worked great.
Was back in 2004 on older JRE, so may be outdated approach but still works to this day. Have only had to import new certificates as they expire.
Apparently, the version I had on my flash drive is with HTTP, so must be on my machine that is currently 'toast' that I am recovering. Will continue to look, but these look like references for same approach:
Using SSL with Axis
http://www.informit.com/ar
Web Services Over SSL
http://www.pankaj-k.net/WS
(and referred link from Web Services Over SSL)
Use HTTPS in your Java client code
http://www.javaworld.com/j
The gist of what I remember seems to be covered in the 1st and 3rd especially.
Hope that helps.
Thanks, I think that has me going the right direction as far as the SSL stuff.
What I'm still having real trouble with is in my code, actually putting guts into my concrete class for my requests to work.
I've got my stubbed request methods that return null generated from the wsdl by axis. I'm spinning my wheels trying to figure out how to get reference to my endpoint or a Call instance or something to tell it, "OK, make the request."
I'm missing something (probably several somethings) and nothing I've been able to find is giving me any idea what to do.
The 3rd party service url has obviously been changed, but the one I'm using was provided by the 3rd party.
OK, never mind the previous code. I've started over using axis2 v 1.4. I'm sent a request and got a response, but when I tried to add a signature to the message, I got:
org.apache.axis2.AxisFault
at org.apache.axis2.util.Util
at org.apache.axis2.descripti
at org.apache.axis2.descripti
at org.apache.axis2.descripti
at org.apache.axis2.client.Op
at com.tibco.www.secure.clien
at com.tibco.www.secure.clien
See if these help with the WSSE security header.
http://www.xml.com/pub/a/2
http://edocs.bea.com/works
I'm looking at my axis2.xml settings. I wasn't aware from any of my reference/tutorials I've been looking at that I had to do much there. I'm getting AxisFault: InvalidSecurity errors now, so I'm looking at the security description in my axis2.xml. Should I just reference the services.xml and/or rampart-config.xml from there?
Yes, it should be referenced as a module from my understanding albeit limited.
http://ws.apache.org/rampa
(the above should have most of the information you need)
http://ws.apache.org/axis2
Regards,
Kevin
Business Accounts
Answer for Membership
by: mwvisa1Posted on 2009-08-01 at 08:42:43ID: 24995715
See if this helps: ki/WebObje cts/Web_Se rvices/ How _to_Trust_ Any_SSL_Ce rtificate
http://en.wikibooks.org/wi