• Post Reply Bookmark Topic Watch Topic
  • New Topic

Webservice SOAP request username & password not retrieved

 
Rithanya Laxmi
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • 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.
 
krishna atok
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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: 185
  • Mark post as helpful
  • send pies
  • 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);
}
}

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!