After click Send send xml to a POST Rest service

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

After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

Erik Bruchez
Administrator
Based on this log the service URL which fails seems to be:

    /fr/ursea-asdire/serviceTest2/

I don't see any reference to:

    http://myip:8888/orbeon-api/processform

in the logs.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

Alessandro  Vernet
Administrator
Hi Bruno,

In the log, I see:

- The page /fr/ursea-asdire/serviceTest2/new loaded by the browser.
- (The browser loading assets the page depends on: CSS, images, JavaScript.)
- An Ajax request; I assume that was you pressing the "Send button".
- Then it runs the fr-create-update-submission XForms submission; I imagine that this happens when the save action runs, which is part of the save-final process you're running from your process.
- Finally, the submission that fails is fr-send-submission-none. This is the submission is executed by the send() action. It's just that here from the log we don't know why it failed, except it got a 404.

Could you try setting the value of oxf.xforms.logging.debug as in the snippet below? With this, the body/response of the submission should be logged, which hopefully will give us more information about what is happening.

<property as="xs:NMTOKENS" name="oxf.xforms.logging.debug"
    value="document model submission control event action analysis server server-body html
           submission-details submission-body"/>

BTW, in the last snippet, you have a send("http://ip:8888/orbeon-api/processform"). This should be send("http://ip:8888/orbeon-api/processform"). I imagine you had that, and replaced the " with " when you edited your internal address.

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

Alessandro  Vernet
Administrator
Bruno,

The "Broken pipe" often comes from the browser interrupting a request. For instance in this case, you might have gone to /fr/ursea-asdire/simple/new and then immediately done the equivalent of ctrl-l enter, to the server receives 2 requests, but when issuing the second one, it closes the connection on the first one, which causes the broken pipe when Orbeon Forms tries to write on that connection. So usually "Broken pipe" isn't a problem.

However the None.get at the end of the log is different, and looks more like a "real" error. What does your navigate() look like in that process?

https://github.com/orbeon/orbeon-forms/blob/4.5-ce/src/main/scala/org/orbeon/oxf/fr/SimpleProcess.scala#L414

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

Alessandro  Vernet
Administrator
In reply to this post by bruno.buzzi
Hi Bruno,

In the code, I see:

    def isAbsolute(s: String) = s.startsWith("/") || NetUtils.urlHasProtocol(s)
    def fromParams = params.get(Some("uri")) orElse (params.get(None) filter isAbsolute)

So most likely, if you don't specify the name of the parameter, it will only work if the URL is of the form "/path/to/page". Anyway, it is better to say what you want in this case, since navigate() can take either a uri = "…" or a property = "…". I'm glad you found the solution to this one.

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

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

Re: After click Send send xml to a POST Rest service

Erik Bruchez
Administrator
Bruno,

Templates now work with `navigate` in 4.6:

    https://github.com/orbeon/orbeon-forms/issues/1226

See the other message for the `recover` vs. `then`.

-Erik