• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis2 Rampart client configuration

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Nikes Shah
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic