• 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

setting username and password

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all

i'm currntly getting username and password using basic authentication in my web service.

we are using a product that doesn't support http basic authentaication in the http header, so now i have to re-write my web service. Can anyone suggest an alternative way to do this?

Can i set the username and password in the SOAP Envelope/body?

Thsi is the code i'm curently using
String headerAuth = (String)msgContext.getProperty(HTTPConstants.HEADER_AUTHORIZATION);

if (headerAuth != null)
{
headerAuth = headerAuth.trim();
}

if (headerAuth != null && headerAuth.startsWith("Basic "))
{
int i;

headerAuth = new String(Base64.decode(headerAuth.substring(6)));

String [] userNamePassword = headerAuth.split(":");

userName = userNamePassword[0];
password = userNamePassword[1];
}

thanks for any help
 
reply
    Bookmark Topic Watch Topic
  • New Topic