This post was updated on .
Hello,
I'm new in Orbeon Forms. I've got problem to send post from xForms to servlet. I want send post like this: <form action="http://..../ExternalUploadServlet" method="post"> <input type="text" name="AdresSkrzynki" value=""/> <input type="text" name="XML" /> <input type="submit" value="Wyslij"/> </form> but in Xforms :) I try : <xf:instance id="request" xmlns=""> <response> <AdresSkrzynki></AdresSkrzynki> <XML/> </response> </xf:instance> <xf:submission id="sendPost" method="put" resource="http://.../ExternalUploadServlet" replace="all" > </xf:submission> and call : <xf:input id="AdresSkrzynki" ref="instance('request')/AdresSkrzynki"/> <xf:input id="XML" ref="instance('request')/XML"/> <xf:trigger> <xf:label>Button</xf:label> <xf:action ev:event="DOMActivate"> <xf:send submission="sendPost"/> </xf:action> </xf:trigger> It not work :( I've got message : "xforms:submission for submission id: sendPost, error code received when submitting instance: 405 oxf:/apps/xforms-calculator/calc.xhtml, line xx, column -1: xforms:submission for submission id: sendPost, error code received when submitting instance: 405 PLEASE HELLLLLP MEEEEE |
Anybody help me ....
|
Hi,
Your working example says you are POSTing data to your service, and your xforms attempt uses a PUT. This may explain the 405 (method not allowed) error. Is your service expecting xml or form-data? If it's the latter, you will need to reformat your post data to something resembling "var1=val1&var2=val2" and add mediatype="application/x-www-form-urlencoded" to your submission. David Lacy Falvey Library Technology Services Villanova University library.villanova.edu 610-519-7361 > -----Original Message----- > From: Dariatka [mailto:[hidden email]] > Sent: Thursday, September 27, 2012 3:23 AM > To: [hidden email] > Subject: [ops-users] Re: Problem subbmission post to servlet > > Anybody help me .... > > > > -- > View this message in context: http://orbeon-forms-ops- > users.24843.n4.nabble.com/Problem-subbmission-post-to-servlet- > tp4655723p4655770.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Yes, you might want to implement the doPut() or the service() method
of the servlet. -Erik On Fri, Sep 28, 2012 at 4:55 AM, David Lacy <[hidden email]> wrote: > Hi, > > Your working example says you are POSTing data to your service, and your xforms attempt uses a PUT. This may explain the 405 (method not allowed) error. > > Is your service expecting xml or form-data? If it's the latter, you will need to reformat your post data to something resembling "var1=val1&var2=val2" and add mediatype="application/x-www-form-urlencoded" to your submission. > > David Lacy > Falvey Library Technology Services > Villanova University > library.villanova.edu > 610-519-7361 > > >> -----Original Message----- >> From: Dariatka [mailto:[hidden email]] >> Sent: Thursday, September 27, 2012 3:23 AM >> To: [hidden email] >> Subject: [ops-users] Re: Problem subbmission post to servlet >> >> Anybody help me .... >> >> >> >> -- >> View this message in context: http://orbeon-forms-ops- >> users.24843.n4.nabble.com/Problem-subbmission-post-to-servlet- >> tp4655723p4655770.html >> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Unfortunately, the servlet is not my....
I'm only try to send data - Xml, and then this xml should be shown.... If I don't have function like doPosr() service() in servlet it's possible to do it ? |
In reply to this post by Erik Bruchez
"you will need to reformat your post data to something resembling "var1=val1&var2=val2" "
How can I reformat post data ? |
Administrator
|
If the servlet is not yours, you absolutely need to know the exact
format the servlet expects. Does it accept XML? If so, with the POST method? Or the PUT method? If it doesn't accept XML, then what's the format? Is it the HTML form submission format? In that case, the "urlencoded-post" method might be what you need: <xforms:submission method="urlencoded-post" ... or: <xforms:submission method="post" serialization="urlencoded-post" ... -Erik On Wed, Oct 3, 2012 at 11:53 PM, Dariatka <[hidden email]> wrote: > "you will need to reformat your post data to something resembling > "var1=val1&var2=val2" " > > How can I reformat post data ? > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-subbmission-post-to-servlet-tp4655723p4655782.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
This post was updated on .
All the time all try to contact with author of servlet....
I know that this example works good: <form action="http://.../ExternalUploadServlet" method="post"> <input type="text" name="AdresSkrzynki" value=""/> <input type="text" name="XML" /> <input type="submit" value="Wyslij"/> </form> And I got the 2 params: AdresSkrzynki and XML ( I set like this and it's works in example with action- <xf:setvalue ev:event="DOMActivate" ref="instance('SaveXmlRequest')/soap:Body/service:SaveXml/service:inputXml" value="saxon:serialize(instance('main'), 'xml')"/> ) I try do the same in XForms.... |
This post was updated on .
Response of author of servlet :
endpoint: https://.../ExternalUploadServlet method: post params: -XML : (some document in utf-8) - I can get it - AdresSkrzynki : I have result: url to page whre XML send as params show in specific page ... |
Administrator
|
I seems that you want to do the same as an HTML form post. Then
method="urlencoded-post" should work. -Erik On Mon, Oct 8, 2012 at 1:42 AM, Dariatka <[hidden email]> wrote: > Response of author of servlet : > > endpoint: https://epuap.gov.pl/fe_web/ExternalUploadServlet > method: post > params: > -XML : (some document in utf-8) - I can get it > - AdresSkrzynki : I have > result: url to page whre XML send as params show in specific page ... > > > > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-subbmission-post-to-servlet-tp4655723p4655797.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
This post was updated on .
Unfortunately, this does not work.
I think I need a step by step .... In event's viewer I noticed another difference: Address at which message is sent in XForms: Request URL: http://localhost:8080/orbeonCE40/xforms-server Address at which message is sent in Html: Request URL: http://.../ExternalUploadServlet What should I set to requst URL was correct? How to set the params : XML and AdresSkrzynki sended to the servlet? At the moment my submission is : <xf: submission id = "sendPost" method = "urlencoded-pos" action = "http://.../ExternalUploadServlet" replace = "all"> <xf:message ev:event="xforms-submit-error" level="modal"> Operation failed. </ xf: message> </ xf: submission> |
Administrator
|
The post to /xforms-server is just internal communication used by the
XForms engine. It shouldn't affect your issue. "urlencoded-pos" is a typo I assume, but it should be "urlencoded-post". For clarity your submission should also have a ref attribute pointing the XML document to submit: <xform:submission ref="instance('request')" ...> -Erik On Wed, Oct 10, 2012 at 5:27 AM, Dariatka <[hidden email]> wrote: > Unfortunately, this does not work. > I think I need a step by step .... > > In event's viewer I noticed another difference: > > Address at which message is sent in XForms: > Request URL: http://localhost:8080/orbeonCE40/xforms-server > > Address at which message is sent in Html: > Request URL: http://epuap.gov.pl/fe_web/ExternalUploadServlet > > What should I set to requst URL was correct? > How to set the params : XML and AdresSkrzynki sended to the servlet? > > At the moment my submission is : > > <xf: submission > id = "sendPost" method = "urlencoded-pos" > action = "http://test.epuap.gov.pl/fe_web/ExternalUploadServlet" > replace = "all"> > <xf:message ev:event="xforms-submit-error" level="modal"> Operation > failed. </ xf: message> > </ xf: submission> > > > > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-subbmission-post-to-servlet-tp4655723p4655826.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
This post was updated on .
Thanks,
now is better.. but still doesn't work .... I'm testing on Chrome, XForms version CE 40. I'm compare "Network actions" in XForms and simple Html Simple HTML - it's work: Request URL:http://.../ExternalUploadServlet Host:epuap.gov.pl Origin:null Xforms -doesn't work: Request URL:http://localhost:8080/orbeonCE40/xforms-calculator/calc Host:localhost:8080 Origin:http://localhost:8080 Referer:http://localhost:8080/orbeonCE40/xforms-calculator/calc other parameters are the same or similar in both calling. Maybe this is problem.... ??? |
I read in other posts about sending 'POST' in Orbeon.
It is necessary settings in the config file (XForms or Apache) to make it work properly? Is the standard installation provides support for method "POST' ? Still no effects |
Administrator
|
Yes, POST should work out of the box.
Try using an HTTP monitor to observe what's going on the wire, if anything: http://wiki.orbeon.com/forms/doc/developer-guide/admin/monitoring-http-requests -Erik On Tue, Oct 23, 2012 at 12:45 AM, Dariatka <[hidden email]> wrote: > I read in other posts about sending 'POST' in Orbeon. > It is necessary settings in the config file (XForms or Apache) to make it > work properly? > Is the standard installation provides support for method "POST' ? > > Still no effects > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-subbmission-post-to-servlet-tp4655723p4655886.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
I'm still nothing find....
My screenshot : IE.png Firebug.png wireshark_2_interfaces_20121024084418_a06124 |
Free forum by Nabble | Edit this page |