aspose file tools*
The moose likes Web Services and the fly likes Axis2 Rampart client configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2 Rampart client configuration" Watch "Axis2 Rampart client configuration" New topic
Author

Axis2 Rampart client configuration

Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Dear All,

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.

Where should i drop policy.xml at client side?

Thanks for any help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42274
    
  64
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.


Ping & DNS - my free Android networking tools app
Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Hi Ulf,

I have downloaded "rampart-dist-1.5-bin.zip"

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: 42274
    
  64
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: 133
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: 42274
    
  64
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: 133
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.




Exception:



Kindly help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis2 Rampart client configuration