Использование Orbeon Rest API с другим Java-приложением - PullRequest
0 голосов
/ 06 февраля 2012

Можно ли вызвать orbeons rest api (PUT, GET, DELETE, POST) из другого Java-приложения?

Я использую ORACLE и все отлично работает с формами из Form Builder, но когда я пытаюсь использовать остальные API с другими приложениями Java, я не могу.

С ORACLE только GET работает:

GET:    http://localhost:8080/orbeon/fr/service/oracle/crud/Test/restApiTests/data/964b1844148a05928ffb773c8084c89b/data.xml 



RESPONSE: 
            STATUS: 200
            CONTENT :<?xml version="1.0" encoding="utf-8"?><form xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:saxon="http://saxon.sf.net/" xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:exforms="http://www.exforms.org/exf/1-0" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:odt="http://orbeon.org/oxf/xml/datatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                            <section-1>
                                <control-1>1</control-1><control-2>2</control-2><control-3>3</control-3><control-4>4</control-4>
                            </section-1>
                        </form> 

Другие функции не работают. Если я сделаю, например, PUT для обновления:

PUT:   http://localhost:8080/orbeon/fr/service/oracle/crud/Test/restApiTests/data/964b1844148a05928ffb773c8084c89b/data.xml  

contentType : application/xml;charset=utf-8 and 
content : <?xml version="1.0" encoding="utf-8"?><form xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:saxon="http://saxon.sf.net/" xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:exforms="http://www.exforms.org/exf/1-0" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:odt="http://orbeon.org/oxf/xml/datatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                    <section-1>
                        <control-1>123456789</control-1><control-2>2</control-2><control-3>3</control-3><control-4>4</control-4>
                    </section-1>
                </form>

Я получаю ответ

STATUS: 200
CONTENT: <?xml version="1.0" encoding="utf-8"?><dummy xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:odt="http://orbeon.org/oxf/xml/datatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

А когда я смотрю в oracle DB никаких изменений не было.


Если я делаю то же самое PUT с EXIST , он работает нормально.

...