Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

qvpx global methods

i'm currently trying to understand how to use the qvpx protocol to access core api methods, but i'm still a bit confused

so far i've made a little c# project sending requests to the /qvajaxzfc/qvsviewclient.asp, and tested it with the example given at the end of the "QlikView Server API" documentation (the one starting with : <Global method="OpenDoc">). It worked fine, but i have some more questions that need answers :

- what methods are allowed or forbidden when called via the qvpx protocol ? Are they exactly the same as the standard automation API ?

- how are those methods called ? the second (and last) example from the documentation is <Doc method="GetSheetObject">, so i think the syntax is <ObjectType method="ObjectMethod">, but trying this after assuming my last point is true yielded only <message text="Invalid method" />. What am i doing wrong ?

- what is the meaning of the <_retval_>Doc:1</_retval_> returned after the global OpenDoc method ? how am i supposed to use it ?

- is there a more meaningful documentation/tutorial/example about this api ?

14 Replies
Not applicable
Author

I would like to second jgeorges question.

The qvpx API seems to be either very poor documented or very nonfunctional at all...

I am currently trying to export bitmaps of charts via a windows service and cant use neither ocx (which would do the export without problems and only some little code) because its a activeX which doesnt realy run as a service nor can i find any other working solution.

If you dont know the answer but the email adress of one of the ocx developers this would help too Stick out tongue

Please help.

Not applicable
Author

Here is what I found about this topic :

the value returned when executing global method is a handle for a qlikview object

for example :

<!-- request #1: opening the document -->
<Global method="OpenDoc">
<DocName>document.qvw</DocName>
</Global>

<!-- response #1 : document was opened, its handle is 1 (you can have only one document per session, so this handle isn't required for document methods) -->
<Global>
<_retval_>Doc:1</_retval_>
</Global>

<!-- request #2 -->
<Doc method="GetSheetObject">
<ObjectId>CH01</ObjectId>
</Doc>

<!-- response #2 : the handle for this StraightTableBox is 2 -->
<Doc>
<_retval_>StraightTableBox:2</_retval_>
</Doc>

<!-- request #3 : GetContents must be called before trying to access the content of an object, i don't know why -->
<StraightTableBox method="GetContents" handle="2" />

<!-- response #3 -->
<StraightTableBox>
<Cells></Cells>
<_retval_></_retval_>
</StraightTableBox>

<!-- request #4 : now that we have a handle for the object and we have called the GetContents method, it's fine to call the GetTableAsText -->
<StraightTableBox method="GetTableAsText" handle="2" />

I hope this is of some help

Not applicable
Author

Thank you that helps me quite a bit.

Where did you get that information? There has to be someone who knows all this.

If this goes on I am going to BruteForce Xml requests from my server Tongue Tied

Not applicable
Author

I got the information about handle from qliktech support, and the getcontents tip from many tries and errors.....

the lack of documentation is really frustrating....

the only thing left is using a tool like firebug to watch the requests made by the ajax client, but it only uses a strange syntax which has nothing to do with the standard api methods

good luck

kathir
Partner - Contributor
Partner - Contributor

Hi Jgeorge,

We tried to implement the above solution to get the data from Listbox and Straight Table and we have got the results until the Request 2#:

<Doc method="GetSheetObject">
<ObjectId>CH01</ObjectId>
</Doc>

This gives the response.

But the Request 3# onwards we get a message saying "Invalid Method". We use Qlikview 9 SR3. Could you please tell us what could be the problem.

Thanks.

Kathir

Not applicable
Author

I do not know the cause of this problem. I don't remember what version I used to make my tests. Anyway, calling API methods from QVPX methods won't be possible anymore in version 10, so implementing an application based on this feature will become obsolete real fast.

kathir
Partner - Contributor
Partner - Contributor

Thanks for your response...

Not applicable
Author

Hi jgeorge,

Do you know the replacement for QVPX methods in version 10? Thanks in advance.

Not applicable
Author

I do not think there is something to replace this feature. As far as I have understand, qvpx will now handle only the refreshing of the sheets and objects contents. I think there was improvement in the server webservices, but if I remember correctly they are useful for the administration instead of the document interaction.

Why do you need qvpx global methods? Maybe there is another way to achieve your goal.