I have tomcat server on which web services are deployed using Apache CXF framework.
(Well I am having Alfresco open source content management server)
I want to write standalone java client to consume these web services.
Can I use Axis2 at client side in this case?
Also in Axis2 I want to configure rampart security module, but I don't have much idea how to configure it.
Do I have to configure Axis2 and rampart on server side also? even if I only want to consume the deployed web services in Apache CXF/Spring.
Rampart comes with many examples - check the "samples" directory. You need to configure it where you're using it - it sounds as if that's only on the client side, since you're using CXF on the server side.
I don't think Rampart uses a policy.xml file - is that a CXF thing? if so, there's no point in having one on the client if you use Axis/Rampart there.
Following is the code i took from rampart's samples directory.
It loads policy file named "policy.xml".
Kindly provide links to develop client with axis2/rampart.
thanks for any help.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35446
9
posted
0
Why are you using that sample code - do you intend to work with SAML? If not, I suggest to stick to the examples in the "basic" directory, which do no use policy files.
Also, what do you intend to use WS-Security for - signing, encryption, or authentication?
As an introduction, I published a couple of articles in the JavaRanch Journal (www.javaranch.com/journal) about using Rampart for Authentication and Encryption.
Nikes Shah
Ranch Hand
Joined: Jul 18, 2007
Posts: 132
posted
0
Web services on server requires security header in soap request (wss security) like username,password and timestamp etc.
I am not much aware about rampart options. Can you please suggest me which option would fit my requirement?
Thanks.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35446
9
posted
0
like username, password and timestamp etc.
Those three are covered by WSS's UsernameToken and Timestamp features. Only you know which other ones you mean by "etc." :-)
Example basic/sample02 demonstrates those two features in action (as does the sample code in my article on Web Service Authentication with Axis 2).
Nikes Shah
Ranch Hand
Joined: Jul 18, 2007
Posts: 132
posted
0
I have followed suggestions given by you.
It seems still I am missing something.
Following is my client code, when I execute it throws following exception.