Hi,
While accessing B1WS getting the following error.
Please help us to resolve the error
{http://xml.apache.org/axis/}HttpErrorCode:401
(401)Unauthorized
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
Here is the Code :
public class Test {
// public static final java.lang.String _dst_MSSQL2008 = "dst_MSSQL2008";
public static final LoginDatabaseType dst_MSSQL2008 = new LoginDatabaseType("dst_MSSQL2008");
public static final LoginLanguage ln_English = new LoginLanguage("ln_English");
public static void main(String[] arg) throws ServiceException, IOException
{
LoginServiceSoapStub login = (LoginServiceSoapStub) new LoginServiceLocator().getLoginServiceSoap(new URL("http://10.10.5.115/sapb1web/WebReferences/LoginService.wsdl"));
try {
login.login("ESPL-LAP-048", "INDIAHEAD", dst_MSSQL2008,"manager", "12345", ln_English, "ESPL-LAP-048:30000");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("Error "+e.getMessage());
}
}
Thanks
Ravi Shankar