Clarity

  • 1.  Need help: need to Consume Clarity Web Service with Apache Axis

    Posted Oct 20, 2011 05:06 AM
    I am trying to consume Clarity Users -Login WebService. I am trying to retrieve session id value by providing username and password. For valid Credential m getting Session id as null. Please let me know on this. help me to resolve the problem ASAP. I am new on this.

    Below is code Snippet:

    package com.niku.www.xog.Object;


    public class WebServiceClient {

    /**
    * @param args
    * @throws Exception
    */
    public static void main(String[] args) throws Exception {

    //user Login To Clarity
    String strUrl = "http://XXXX:8000/niku/xog";
    Login login = new Login("admin","Infy123+");
    /*login.setUsername("admin");
    login.setPassword("Infy123+");*/

    UsersServiceLocator serviceLocator = new UsersServiceLocator();
    serviceLocator.setUsersServiceEndpointAddress(strUrl);
    UsersPort port = serviceLocator.getUsersService();
    System.out.println("PORT::"+port);

    String sessionId = null;
    sessionId = port.login(login.getUsername(),login.getPassword());
    System.out.println("Session Id::-"+sessionId);
    }
    }


  • 2.  RE: Need help: need to Consume Clarity Web Service with Apache Axis

    Posted Oct 20, 2011 10:25 AM
    Hi,

    The problem may be that the user does not have the rights to access Clarity via the XOG interface.

    Try this:
    Login to Clarity as admin
    Choose the wrench to go to the administration screen
    Choose Resources from the left-hand side menu
    Filter for your target resource, then click on that resource to drill down into the Resource record
    Choose Resource's Access Rights > Global
    Choose Add
    Choose Administration - XOG

    That will give your resource the right to XOG into Clarity.

    Mike


  • 3.  RE: Need help: need to Consume Clarity Web Service with Apache Axis

    Posted Oct 20, 2011 09:44 PM
    Hi Mike,

    Thanks for your reply

    Its already working on Hudson and CXF framework, it not working on Axis framework. then How Access rights matters here?

    SessionId is getting created if I use Hudson or CXF framework. but not getting generated in Axis. I dont think so Access rights matters here.

    is any other alternative available ?

    Thanks,
    Rahul.


  • 4.  RE: Need help: need to Consume Clarity Web Service with Apache Axis

    Posted Oct 21, 2011 07:25 AM
    no clue, but I would tried to see response back from server (plain SOAP)
    by monitoring traffic or sending request thru proxy?


  • 5.  RE: Need help: need to Consume Clarity Web Service with Apache Axis
    Best Answer

    Posted Oct 27, 2011 12:23 PM
    Hi,

    I had the same problem: Clarity uses JAX-WS, part of Java 6 / 7, on the exposed webservices, while Axis is an JAX-RPC implementation and does not work.

    I solved the problem to connect to Clarity using the NetBeansIDE 7.0.1 IDE. Includes an assistant to connect to webservices that worked for me. Uses JAX-WS as a client to web services.

    Hope this helps

    Best regards,
    Víctor


  • 6.  RE: Need help: need to Consume Clarity Web Service with Apache Axis

     
    Posted Nov 03, 2011 10:00 AM
    Hi Rahul,

    Did Victor's response help you resolve? If so please mark the post as Accepted Solution.

    Thanks!
    Chris


  • 7.  RE: Need help: need to Consume Clarity Web Service with Apache Axis

    Posted Nov 04, 2011 03:42 AM
    yes Chris.! It working for Netbean IDE coz it using Hudson Framework. also in eclipse for cfx framework its working fine. But i m getting problem for Axis frameowrk using eclipse IDE.