CDRonDemand web service authentication problem

Version 1
    This document was generated from CDN thread

    Created by: an dong on 13-11-2008 02:34:57 AM
    I download the WSDL file of CDRonDemand web service, use the WSDL2Java tool to generate the Java file. But it tell me the '(401)Unauthorized' information when i use this code by apache axis component:
    try
    {
    System.setProperty("axis.socketSecureFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory");


    CDRonDemandService service = new CDRonDemandServiceLocator();


    //authentication

    Stub stub = (Stub) service.getCDRonDemand();

    stub.setUsername("admin");

    stub.setPassword("111111");


    String[] files = service.getCDRonDemand().get_file_list("200811110100", "200811110130", true);

    System.out.println("Files:" + files .length);
    }
    catch (Exception e)
    {

    e.printStackTrace();
    }

    The full error is:
    AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (401)Unauthorized
    faultActor:
    faultNode:
    faultDetail:
    {}:return code: 401
    <html><head><title>Apache Tomcat/5.5.17 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color kiss 525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color kiss 525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color kiss 525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color kiss 525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>This request requires HTTP authentication ().</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.17</h3></body></html>
    {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)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.cisco.schemas.ast.soap.CDRonDemandSoapBindingStub.get_file_list(CDRonDemandSoapBindingStub.java:182)
    at com.cisco.schemas.ast.soap.Test.main(Test.java:50)


    It seems that the authentication code does not work correctly. What can i to do now?

    Subject: Re: CDRonDemand web service authentication problem
    Replied by: Stephan Steiner on 13-11-2008 11:00:41 AM
    Can you tell us what Roles the user admin has?

    I've noted that with AXL serviceability, Cisco undid their entire permission system.. you can create whatever roles you like with proper access.. serviceability won't work unless your user has the role "Standard CCM Admin Users"

    Subject: Re: CDRonDemand web service authentication problem
    Replied by: an dong on 14-11-2008 01:23:57 AM
    The user admin is the default user that we install the CCM
    system. It's Groups is 'Standard CCM Super Users', It has these roles:Standard AXL API Access,Standard Admin Rep Tool Admin,Standard CCM Admin Users,Standard CCMADMIN Administration,Standard EM Authentication Proxy Rights,Standard SERVICEABILITY Administration.

    This problem is solved now. I hard code the authentication info to the stub java class,then it's passed.

    Thanks a lot.