AnsweredAssumed Answered

Fetch data from clarity webservice into excel

Question asked by sachin.ghorpade on Aug 11, 2010
Latest reply on Jul 22, 2015 by Dave_3.0
Hi All,

I'm planning to make the use of clarity webservice to fetch data from clarity into excel.

I have created simple query(asp_resource_q) in clarity (returning first and last name of one resource). This query automiatically appears as web service at http://localhost:8095/niku/wsdl/Query/asp_resource_q.

I have used Microsoft web service tool kit to generate VBA code to access web service.
I'm able to access web service i.e. I'm able to login through VBA and getting back session id. But i'm not able to access and fetch data from clarity query through VBA.

WebService tool kit has produced following classes.

clsof_Factory_aspresourceqQ .......... (mapper class)
clsws_aspresourceqQueryServ.... (does initialization, login, logout, query)
struct_aspresourceqFilter .... (contains filter attribute)
struct_aspresourceqQuery ..... (contains Code attribute and Filter as object of struct_aspresourceqFilter )
struct_aspresourceqQueryRes...... (contains result set records)
struct_aspresourceqRecord......... (final data cna be retrieved from record)

The code which i'm using is below

Dim serviceObj As clsws_aspresourceqQueryServ
Set serviceObj = New clsws_aspresourceqQueryServ

sessionId = serviceObj.wsm_Login("username", "password")... I'm able to get session id here...

Dim filterObj As struct_aspresourceqFilter
Set filterObj = New struct_aspresourceqFilter
Dim queryObj As struct_aspresourceqQuery
Set queryObj = New struct_aspresourceqQuery
queryObj.Code = "asp_resource_q"
Set queryObj.filterObj = filterObj
Dim responseObj As struct_aspresourceqQueryRes
Set responseObj = serviceObj.wsm_Query(queryObj) ... It gives me error at this point

I'm not able to proceed ahead.

Do i have to create these class objects using mapper class. Can anybody give me hint on using mapper class?
How can i pass my session id while accessing query service, as my serviceObj.wsm_Query(queryObj) method takes only query object as paramater.

Has anybody worked on this kind of things? Any hint would be helpful.

Thanks in Advance!