cancel
Showing results for 
Search instead for 
Did you mean: 

accessing web scipts using matlab

roeland19
Champ in-the-making
Champ in-the-making
hello,

I am trying to acces the web script using matlab. First of all i use a ticket to authenticate myself with the following command
security_ticket = urlread('http://rndbebetosd1.eu.jnj.com/alfresco/service/api/login?u=USERNAME&pw=PASSWORD','get','')

this gives me the ticket in xml format.

security_ticket2 =
<?xml version="1.0" encoding="UTF-8"?>
<ticket>TICKET_5aaebc2c64efa01cbde5c070223db5bb1b9f7a98</ticket>

now i can just copy the ticket to use it later or i can parse the xml code to a string so i can use the string instead of copy pasting it each time.

now when i try to acces a web script where i don't have to input anything i don't get a problem.
in the following piece of code the string ticket contains my ticket.

output = urlread('http://rndbebetosd1.eu.jnj.com/alfresco/s/opsoro/tagQuery','get',{'alf_ticket',ticket})

but when i try to acces a web script where i do have to input something like in a search script i get the following.

output = urlread('http://rndbebetosd1.eu.jnj.com/alfresco/s/opsoro/search?query=test','get',{'alf_ticket',ticket});
Error downloading URL.

it should give back some json code and when i try it in the browser it works just fine.

is by chance anyone else using matlab to do this ?

thnx in advance.


Roeland
1 REPLY 1

roeland19
Champ in-the-making
Champ in-the-making
solved.
it should have been

output = urlread('http://rndbebetosd1.eu.jnj.com/alfresco/s/opsoro/search','get',{'query','test','alf_ticket',ticket});

stupid mistake  Smiley Tongue
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.