persistance api : empty response

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

persistance api : empty response

vivanno
Hello all,

i'm trying to integrate orbeon with another application. My orbeon  is setted to store data in mysql. I created a form and i'm trying to get working API but whitout success.

When i call (with basic authentication) :

http://localhost:8080/orbeon-auth/fr/service/mysql/crud/{app}/{form}/form/form.xml

I receive an empty response with http-code 200.

[15/Mar/2016:14:26:33 +0000] "GET /orbeon-auth/fr/service/mysql/crud/app/form/form/form.xml HTTP/1.1" 200 -

Without error message, i need your help.

Any ideas ?
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

bruno.buzzi
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

Alessandro  Vernet
Administrator
In reply to this post by vivanno
Hi,

Also, and I'm not sure if this explains the issue you're seeing, but you should be calling /fr/service/persistence, not /fr/service/mysql. The former calls the latter based on properties you set, but doing so also passes additional information. You'll let us know if this helps.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

vivanno
In reply to this post by bruno.buzzi
Hello guys,

Thanks you for your help.

- Orbeon working with mysql, i can see data from orbeon to the mysql
database. I think it's good.
- You right, i'm trying to get access to Orbeon Persistence services.

I think it's clear now :)

Now when i call :

MYIP:8080/orbeon/fr/service/persistence/crud/app/form/data/6f427e51bcb86597bf5afdbfdb98ac52d3cc028c/data.xml

I obtain a 403 forbidden error

how to authorize access ?


--
View this message in context: http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661242.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

vivanno
In reply to this post by bruno.buzzi
Hello guys, 

Thanks you for your help. 

- Orbeon working with mysql, i can see data from orbeon to the mysql database. I think it's good. 
- You right, i'm trying to get access to Orbeon Persistence services. 

I think it's clear now :) 

Now when i call : 

http://localhost:8080/orbeon/fr/service/persistence/crud/app/form/data/6f427e51bcb86597bf5afdbfdb98ac52d3cc028c/data.xml 

I obtain a 403 forbidden error 

how to authorize access ? 


Le mardi 15 mars 2016 16:02:08 UTC+1, bruno.buzzi a écrit :
Hi,

Is not clear to me what are you trying to do...

Do you have Orbeon working with MySQL ? and Is working correctly ?

Now you want to integrate Orbeon with other application...
There is a couple of options here:
1- Configure the send to button to send the XML of the form to a REST
service (this can be done inside the properties-local.xml)
Like this:
<property as="xs:string" name="oxf.fr.detail.process.send.ue.*"
value="require-valid
         then save-final
                 then send(replace = &quot;all&quot;, uri =
&quot;http://ipAddress:port/myService&quot;)
         recover navigate(uri = &quot;<a href="http://www.google.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com&#39;;return true;" onclick="this.href=&#39;http://www.google.com&#39;;return true;">http://www.google.com&quot;)"/>

2- This is much more complex. Build your own Persistence Layer.

3- I think you are going this way. To get access to Orbeon Persistence
services.

If you are going with 3 --> you are calling the wrong service.
To get the XML of a form you should call:
../crud/{app}/{form}/data/{form-id}/data.xml

Is this what you are looking for ?

Regards,
Bruno

--
View this message in context: <a href="http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661230.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661230.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGZcNtC328ZokIfnhJLElrFA33mgw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661230.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGZcNtC328ZokIfnhJLElrFA33mgw&#39;;return true;">http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661230.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

Alessandro  Vernet
Administrator
In reply to this post by vivanno
Hi,

Also note that services are protected by default; for more on this, see:

http://doc.orbeon.com/xml-platform/controller/authorization-of-pages-and-services.html

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

vivanno
Hello guys

I'm using tomcat on ubuntu. I know, i need to authorize access on the persistence api, but i don't know how to do that. Sorry, the documentation (http://doc.orbeon.com/xml-platform/controller/authorization-of-pages-and-services.html) is not clear for me. 


wget -S -O - http://localhost:8080/orbeon/fr/service/persistence/crud/app/form/data/139daae00a3f7caa164ee9576d6bd870250caa6b/data.xml  
--2016-03-17 09:04:21--  http://localhost:8080/orbeon/fr/service/persistence/crud/app/form/data/139daae00a3f7caa164ee9576d6bd870250caa6b/data.xml
Résolution de localhost (localhost)... 127.0.0.1
Connexion vers localhost (localhost)|127.0.0.1|:8080... connecté.
requête HTTP transmise, en attente de la réponse... 
  HTTP/1.1 403 Forbidden
  Server: Apache-Coyote/1.1
  Content-Length: 0
  Date: Thu, 17 Mar 2016 08:04:21 GMT
2016-03-17 09:04:21 ERREUR 403: Forbidden.

Regards


Le mercredi 16 mars 2016 17:38:02 UTC+1, bruno.buzzi a écrit :
Hi, 

Are you trying to access the link from the host itself or from somewhere 
else ? 

If you go to Orbeon host and execute (Linux): 
wget -S -O - 
http://localhost:8080/orbeon/fr/service/persistence/crud/app/form/data/6f427e51bcb86597bf5afdbfdb98ac52d3cc028c/data.xml 

You should get an answer. If you trying to access from other site --> i 
think (not sure) you will get that error. 

How to configure access ? - Are you using Linux or Win ? Tomcat o JBoss ? 
The access configuration are in web.xml file in the Orbeon folder. 
(not an expert in this area :) 

Regards, 
Bruno 

-- 
View this message in context: http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661244.html 
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com. 

Le jeudi 17 mars 2016 00:40:57 UTC+1, Alessandro Vernet a écrit :
Hi,

Also note that services are protected by default; for more on this, see:

<a href="http://doc.orbeon.com/xml-platform/controller/authorization-of-pages-and-services.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdoc.orbeon.com%2Fxml-platform%2Fcontroller%2Fauthorization-of-pages-and-services.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHH--qR0FUO3wCsLRRqj2UwMUz98g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdoc.orbeon.com%2Fxml-platform%2Fcontroller%2Fauthorization-of-pages-and-services.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHH--qR0FUO3wCsLRRqj2UwMUz98g&#39;;return true;">http://doc.orbeon.com/xml-platform/controller/authorization-of-pages-and-services.html

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: <a href="http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661246.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661246.html\46sa\75D\46sntz\0751\46usg\75AFQjCNEZiMcfMZtJx2bcsDTZ2SKwLkAm-A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661246.html\46sa\75D\46sntz\0751\46usg\75AFQjCNEZiMcfMZtJx2bcsDTZ2SKwLkAm-A&#39;;return true;">http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661246.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

vivanno
In reply to this post by Alessandro Vernet
Hello.

Do you know where i need to add the following propertie to configure the authorization service ?

<property
  as="xs:anyURI"
  processor-name="oxf:page-flow"
  name="authorizer"
  value="/orbeon-auth"/>



Le jeudi 17 mars 2016 00:40:57 UTC+1, Alessandro Vernet a écrit :
Hi,

Also note that services are protected by default; for more on this, see:

<a href="http://doc.orbeon.com/xml-platform/controller/authorization-of-pages-and-services.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdoc.orbeon.com%2Fxml-platform%2Fcontroller%2Fauthorization-of-pages-and-services.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHH--qR0FUO3wCsLRRqj2UwMUz98g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdoc.orbeon.com%2Fxml-platform%2Fcontroller%2Fauthorization-of-pages-and-services.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHH--qR0FUO3wCsLRRqj2UwMUz98g&#39;;return true;">http://doc.orbeon.com/xml-platform/controller/authorization-of-pages-and-services.html

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: <a href="http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661246.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661246.html\46sa\75D\46sntz\0751\46usg\75AFQjCNEZiMcfMZtJx2bcsDTZ2SKwLkAm-A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661246.html\46sa\75D\46sntz\0751\46usg\75AFQjCNEZiMcfMZtJx2bcsDTZ2SKwLkAm-A&#39;;return true;">http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661246.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

Bharamani
Hi

   Update that property in properties-local.xml file

   location: under config folder
Thanks
Bharamani
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

vivanno
Thanks! 

I added 

<property as="xs:string" processor-name="oxf:page-flow"
  name="page-public-methods" value="GET HEAD POST"/>

<property as="xs:string" processor-name="oxf:page-flow"
  name="service-public-methods" value="GET HEAD"/>

<property as="xs:anyURI" processor-name="oxf:page-flow" name="authorizer"
    value="/orbeon-auth"/>

in properties-local.xml. hallelujah ! Thanks guys ! 

Now when i call: 
http://localhost:8080/orbeon/fr/service/persistence/crud/app/form/data/139daae00a3f7caa164ee9576d6bd870250caa6b/data.xml

i obtain : 
<form>
    <section-1>
        <control-2>1 3 2</control-2>
    </section-1>                
</form>

but when i call : 
http://localhost:8080/orbeon-auth/fr/service/persistence/crud/app/form/data/139daae00a3f7caa164ee9576d6bd870250caa6b/data.xml

i obtain a empty reponse (Status 200) ! Any idea why ? 


Regards

Le jeudi 17 mars 2016 16:45:10 UTC+1, Bharamani Tashildar a écrit :
Hi

   Update that property in properties-local.xml file

   location: under config folder

-----
Regards
Bharamani
--
View this message in context: <a href="http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661251.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661251.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGG9IOZKDj1UeLI43ynmUQ7hPtmjw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661251.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGG9IOZKDj1UeLI43ynmUQ7hPtmjw&#39;;return true;">http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661251.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

Alessandro  Vernet
Administrator
Hi,

The authorization service doesn't return the actual content, it only says "go" (200) or  "no-go" (401 or 403). It is called by Orbeon Forms to authorize the request, and it gets "go", will run the request. Does this help?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: persistance api : empty response

vivanno
Ok thanks

Le vendredi 18 mars 2016 05:07:16 UTC+1, Alessandro Vernet a écrit :
Hi,

The authorization service doesn't return the actual content, it only says
"go" (200) or  "no-go" (401 or 403). It is called by Orbeon Forms to
authorize the request, and it gets "go", will run the request. Does this
help?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: <a href="http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661261.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661261.html\46sa\75D\46sntz\0751\46usg\75AFQjCNETr_CAJnxdnjDod7MQ1c2cFN0qKw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fpersistance-api-empty-response-tp4661228p4661261.html\46sa\75D\46sntz\0751\46usg\75AFQjCNETr_CAJnxdnjDod7MQ1c2cFN0qKw&#39;;return true;">http://discuss.orbeon.com/persistance-api-empty-response-tp4661228p4661261.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].