• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting wsse:Security from Java swing client

 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a java swing client that makes calls to a web service through a proxy. How can I set the Username and password in the wsse:UsernameToken so that it will pass security on the server?

Thanks.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This article (written by, ahem, myself) shows how to write Java clients that use WS-Security authentication, and has example code. It's all done with config files, not programmatically, though.
 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added the following code however when I run the application outside of
Rad I still get an error stating that the security token is missing.

OffsiteCustomerService service = offsite.getOffsiteCustomerService();

Stub stub = (Stub) service;
stub._setProperty(Stub.USERNAME_PROPERTY, "username");
stub._setProperty(Stub.PASSWORD_PROPERTY, "password");
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://localhost****");
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those methods are used for HTTP authentication, not for WS-Security authentication.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic