Clarity

  • 1.  Extracting Data from Clarity

    Posted Dec 18, 2009 09:54 AM
    We are Saas customer and CA Ondemand looks after our database. We use the VPN connection to login to the database and to query it.We would like to import some of the data into a local database on a regular frequency through automated process. Once we have the data, we would show that data (using a different software) on dashboard on LCD panels.  Options (not sure even if this is possible)XOGEmail Data through a processuse webservice (not sure if it can login on vpn connection)use webmethods or some other integration tool  other ways to do this...  What would you suggest the best way is to export this data from Clarity and import it on the local database? Do you do this in your environment?   Please advise.  Thanks,Atul  


  • 2.  Re: Extracting Data from Clarity

    Posted Dec 18, 2009 10:25 AM
    Any bespoke NSQL queries that you write get (automatically) an associated web-service created for them.  Therefore you can write a Clarity NSQL query (that extracts the data you are after) - and then call that query by ANY client that can call a webservice (i.e. over internet protocols) and get your query results back in an XML format.  So your "different software" could just do that, or you could build something to save the results of such a query to a local database and then your "different software" uses that.  (Just an option tho')Dave.


  • 3.  Re: Extracting Data from Clarity

    Posted Dec 18, 2009 10:51 AM
    Thanks Dave. We are new to Clarity. Have been using it for only one year. Also don't have much knowledge in webservices. I can go to technical folks and talk about it. Do you have any technical details or examples on webservices?


  • 4.  Re: Extracting Data from Clarity

    Posted Dec 21, 2009 02:59 AM
    I'm not going to be able to tell you much I'm afraid!  "webservices" are not a Clarity-thing, its a standard internet term for stuff you can call over the internet (your technical folks should be familiar with that as a concept).  Point your browser at       /niku/wsdl (instead of /niku/niku/app?action=npt.overview) and you will see the "wsdl" (web services definition langauge) provided by the Clarity application (essentially what services you can call and how ) - in the "Query" link in the wsdl you'll see all the NSQL queries that you have in your application.  So by writing new NSQL queries (or reusing existing ones) you can expose any (real time) data in the Clarity DB across a webservice (providing your NSQL is clever enough that is)!.  The complicated bit (to me its complicated anyway!) is writing the "client" (your "different software") that is going to use the webservice...   this can be anything that is capable of calling a webservice... you have to set up the client to authenticate (log into) Clarity somehow (the details of how are in the wsdl stuff), but all that is down to exactly how your "different software" works!  --  The ultimate solution is really all up to you.... do you want a "daily extract" type solution, or a "real time data" solution, or.....   there are many ways to do all this stuff.  Dave.


  • 5.  Re: Extracting Data from Clarity

    Posted Dec 21, 2009 07:47 AM
    Thanks Dave. That gave some good information we can mull on. I will let you know if we get stuck on something.


  • 6.  Re: Extracting Data from Clarity

    Posted Dec 21, 2009 08:16 AM
    We downloaded the SoapUI software to give this a quick try.We get an error. Any advise?
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
       <soapenv:Header>
          <obj:Auth>
             <!--Optional:-->
             <obj:SessionID>session</obj:SessionID>
             <!--Optional:-->
             <obj:Username>userid</obj:Username>
             <!--Optional:-->
             <obj:Password>password</obj:Password>
          </obj:Auth>
       </soapenv:Header>
       <soapenv:Body>
          <obj:ReadIdea>
           <DataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="C:\Program Files\CA\Clarity\XOG\xsd\nikuxog_idea.xsd" xmlns="">
    <Header version="7.5" externalSource="NIKU" />
    <Query>
    <Filter name="subject" criteria="EQUALS">admin</Filter>
    </Query>
    </DataBus>
          </obj:ReadIdea>
       </soapenv:Body>
    </soapenv:Envelope>
    
     
    
     ERROR...
    
     
    
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Header/>
       <soapenv:Body>
          <ReadIdeaResponse xmlns="http://www.niku.com/xog/Object">
             <XOGOutput xsi:noNamespaceSchemaLocation="../xsd/status.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Status state="FAILURE"/>
                <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="0" updatedRecords="0"/>
                <ErrorInformation>
                   <Severity>FATAL</Severity>
                   <Description>Missing NikuDataBus request document</Description>
                </ErrorInformation>
             </XOGOutput>
          </ReadIdeaResponse>
       </soapenv:Body>
    </soapenv:Envelope>


  • 7.  Re: Extracting Data from Clarity
    Best Answer

    Posted Dec 22, 2009 05:52 AM
    Now you are in an area I really can't debug - getting your webservices client of choice (in your case SoapUI) to talk to Clarity happily!  Some pointers might be;  # understand the CA provided Clarity "Integration Guide" documents (essentially the manuals for doing this sort of thing!)  # look elsewhere on this board for people trying to do to same as you (eg this post http://caforums.ca.com/ca/board/message?board.id=CAClarityGeneralDiscussion&message.id=5036)  # Sangeet's (who lurks around here sometimes!) blog has some code in it (topic #8) http://letstalkclarity.blogspot.com/  --  All I can immediately say is that the "NikuDataBus" is what we normally need to "wrap" all our XML in when we send it across to the webservice... so I guess the XML you have send is mal-formed (somehow!)  Good luck!  Dave. Message Edited by Dave on 22-12-2009 03:52 PM [left]


  • 8.  Re: Extracting Data from Clarity

    Posted Dec 22, 2009 08:38 AM
    That worked for reading. Thanks Dave.You are a genius.  Now one last question - Do you see anything wrong with the "Write" code  
       
             
                   
                    session id
                   
                    ?
                   
                    ?
             
       
       
             
                       
                                 
                         
                               
                               
                         
                   
     
              I get this error. I am sure there is a syntx error in my code but not sure what.   CA Clarity PPM :: Error 500 - Internal Server Error <a href="#508content"></a> Error 500 - Internal Server Error [left] Processing your request... Stop
                          Error Error 500 - Internal Server Error. The server could not retrieve the document due to server-configuration or other technical problems. Contact your site administrator. [left] [left] <a href="Copyright  © 2008 CA.   All rights reserved.  [url=#top"></a>


  • 9.  Re: Extracting Data from Clarity

    Posted Dec 22, 2009 11:05 PM
    I don't think that Java dump tells us anything...  Whenever you get a "CA Clarity PPM :: Error 500 - Internal Server Error" that just means "something has gone wrong" and you need to go look in the app_niku.log on the server (or thru the NSA) to get the real error message.   ..  Note that If the "write" was generating a sensible error message (like you've not used the correct login credentials, or your XML is missing something mandatory), then you do normally get a sensible error returned in the XML from the call (so your calling client can trap this and handle it).   What you have with that java dump looks a bit more serious than that.  When I'm trying to develop code to write things thru XOG I will usually read it first from the application and write back exactly the same information (just to prove everything that is non-XOG is working OK)... then I'll start to change the information that I'm writing as I need to....  Is the stuff between your tags in the above looking like the same XML you get when you read skills out of the system (it looks ok to me based on the example skills write XOG files)?   If so then the problem is probaby not in the XOG bit of the XML, maybe elsewhere in the XML call to the webservice???   Useful to know whats in the app_niku.log though....  --  Anyway, your original question was about READING data from Clarity not writing it, I've solved that one!   :-)