Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GRAILS - web service client using client certificate

I am trying to write a Web Service test and it needs to connect to a Web Service using a client certificate. I have already set up a server that accepts client certificates and it works correctly when using a .NET client application. The client certificate works as an authentication mechanism together with spring security plugin, therefore i need a way to write a client that can use my custom certificate when performing a request.

Now i am trying to write an integration test for testing this service but i cannot find any mean to attach client certificate when performing a request. I have thried wsclient for groovy, ws-lite for groovy and even cxf for java. Still no luck.

Is there any way that i can attach my own, custom client certificate to web service client request?

like image 509
Pma Avatar asked Nov 04 '22 05:11

Pma


1 Answers

You can use HttpBuilder, specifically look here: http://groovy.codehaus.org/modules/http-builder/apidocs/groovyx/net/http/AuthConfig.html

like image 98
Rick Mangi Avatar answered Nov 08 '22 07:11

Rick Mangi