This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

(401)Unauthorized while invoking the webservice!!!!  RSS feed

Rajesh Unnithan
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am facing an issue with my web service. I am trying to port my application from jboss to weblogic. I deployed the application in weblogic and tried to invoke the web service. But I am getting a 401 Un authorized error.
I am exposing a stateless session bean as web service. In the server-config.wsdd I have specified the authentication mechanism as “SimpleAuthenticationHandler”. Please see the code below.
<service name="XXXService" provider="java:EJB">
<parameter name="allowedMethods" value="MMMM,NNNN"/>
<parameter name="beanJndiName" value="XXXX"/>
<parameter name="homeInterfaceName" value="XXXXHome"/>
<handler type="javarg.apache.axis.handlers.SimpleAuthenticationHandler" />

And in my WEB-INF folder I have a users.lst file which specifies the UID/PWD which should be used for authentication.

When I tried to invoke the webservice using the end point URL I am able to access the web service. It is not even asking for UID/PWD to enter. I am not sure if it’s a default behavior or not. But If I try to access the service using a client programme. I am getting a 401Un authorized error. I am sure that I am passing the correct UID/PWD.

The following code explains how I am connecting to the web service via the client.
XXXStub abc = (XXXStub)factory.getMyService();
result = ((XXXStub)abc).MMMM();

I am getting the following error message when I invoke the webservice


at org.apache.axis.transport.http.HTTPSender.readFromSocket(

at org.apache.axis.transport.http.HTTPSender.invoke(
at org.apache.axis.strategies.InvocationStrategy.visit(
at org.apache.axis.SimpleChain.doVisiting(
at org.apache.axis.SimpleChain.invoke(
at org.apache.axis.client.AxisClient.invoke(
at org.apache.axis.client.Call.invokeEngine(
at org.apache.axis.client.Call.invoke(

When I remove the security code from the client & from the server-config.wsdd. It works fine. I am thinking the way that I am specifying the security information in server-config.wsdd is incorrect. I dont have any issue with this in jboss. its all appearing only in weblogic. I am using axis1.2 and weblogic10.

Please help me to resolve this issue?

Appreciate your help

lee bluse
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem . Can you tell me hao you resolve it ???
You can send e-mail to me , the address is :
Wait your help!
Appreciate your help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!