• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Webservice SOAP request username & password not retrieved

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

I have the LDAP authentication and authorization configured in weblogic 10.4 (container managed)with user and group details
in a securiy realm. Similarly in my web.xml I have configured the

<security-constraint>
<auth-contraint>

for the respective user and group.

In weblogic.xml I have configured, the respective container security as well.

Like :-

<security-role-assignment/>

Now I am removing the container security with the user defined custom security.
Hence I have removed all the container security config from the weblogic as well as in the code.
My application is a webservice app, when I get a SOAP request with username & password in the header
some how weblogic server is removing the header which contains the username & password (reading the soap request
through SOAPHandler). Why this behavior is happening? If I dont remove the container security it is working fine.
Needless to say my application is deployed in weblogic 10.4

Please clarify.

Thanks.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lakxmi,

Can you please provide me the code snippet of how are you trying to access the soap request header using SOAP handler. I mean the handleMessage method of SoapHandler. This will help me to identify if there is anything that we need to do from code perspective.

Thanks,
Kesava.
 
Rithanya Laxmi
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my SOAPHandler with handleMessage():-

public void handleMessage(SoapMessageContext msgctxt) {
Map map=(Map)msgctxt.get(MessageContext.HTTP_REQUEST_HEADERS);
List username=(List)map.get("Username");
List password=(List)map.get("Password");
System.out.println(username.get(0));
System.out.println(password.get(0));
if(username.get(0).equals("Username") && password.get(0).equals("Password")){
return "correct user "+name;
}else
return "unknown user "+name +username.get(0)+" "+password.get(0);
}
}

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic