forwarding submissions from orbeon to servlet in separate deployments

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

forwarding submissions from orbeon to servlet in separate deployments

Gunzenreiner Simon
forwarding submissions from orbeon to servlet in separate deployments

Hi all

I would like the xforms submission to be forwarded to a servlet deployed in a separate deployment (in a container with crossContext="true"), but on the same application server. So this Servlet would not be deployed under the /orbeon context, nor do I want to execute a http request over the wire.

So, in a setup with two deployments (war files)

/myapp/myservlet

/orbeon/myapp/myform

I would like a submission from myform with a resource="/myapp/myservlet" to be forwarded to myserlvet.

Basically I would like to do something similar to what is decribed here (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications), but the request would be forwarded from orbeon to the Servlet, and not the other way around.

How could the above be achieved? (I did not find any hints here http://wiki.orbeon.com/forms/doc/developer-guide/xforms-advanced-submissions).

Is there another way instead of writing my own Processor?

Best regards,

Simon



--
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
Reply | Threaded
Open this post in threaded view
|

Re: forwarding submissions from orbeon to servlet in separate deployments

Han Ming Low
Hi,
 
Not sure if I'm right, but I will try.  :)
 
You can in the "Advanced" section and try "Edit Source"
Then, in the form code,
add to the xforms:model section
    <xforms:submission id="submit_form" action="http://localhost:8080/myapp/myservlet" method="post"/>
 
then to add a button, or customize the button to
 
     <xforms:submit submission="submit_form">
      <xforms:label>Submit</xforms:label>
    </xforms:submit>

Then you should be able to see the whole xml being submitted to your servlet.
 
I hope it's right.  :)
 
Cheers.
 
 
Han Ming
On Wed, Aug 11, 2010 at 5:31 PM, Gunzenreiner Simon <[hidden email]> wrote:

Hi all

I would like the xforms submission to be forwarded to a servlet deployed in a separate deployment (in a container with crossContext="true"), but on the same application server. So this Servlet would not be deployed under the /orbeon context, nor do I want to execute a http request over the wire.

So, in a setup with two deployments (war files)

/myapp/myservlet

/orbeon/myapp/myform

I would like a submission from myform with a resource="/myapp/myservlet" to be forwarded to myserlvet.

Basically I would like to do something similar to what is decribed here (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications), but the request would be forwarded from orbeon to the Servlet, and not the other way around.

How could the above be achieved? (I did not find any hints here http://wiki.orbeon.com/forms/doc/developer-guide/xforms-advanced-submissions).

Is there another way instead of writing my own Processor?

Best regards,

Simon



--
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
Reply | Threaded
Open this post in threaded view
|

AW: Re: forwarding submissions from orbeon to servlet in separate deployments

Gunzenreiner Simon

Hi Han Ming

 

Thanks a lot – but this is exactly what I do not want to do, which is, sending an HTTP request. I want the Servlet forward mechanism to be used.

 

Best regards,

Simon

 

Von: Han Ming Low [mailto:[hidden email]]
Gesendet: Mittwoch, 11. August 2010 12:11
An: [hidden email]
Betreff: [ops-users] Re: forwarding submissions from orbeon to servlet in separate deployments

 

Hi,

 

Not sure if I'm right, but I will try.  :)

 

You can in the "Advanced" section and try "Edit Source"

Then, in the form code,

add to the xforms:model section

    <xforms:submission id="submit_form" action="http://localhost:8080/myapp/myservlet" method="post"/>

 

then to add a button, or customize the button to

 

     <xforms:submit submission="submit_form">
      <xforms:label>Submit</xforms:label>
    </xforms:submit>

Then you should be able to see the whole xml being submitted to your servlet.

 

I hope it's right.  :)

 

Cheers.

 

 

Han Ming

On Wed, Aug 11, 2010 at 5:31 PM, Gunzenreiner Simon <[hidden email]> wrote:

Hi all

I would like the xforms submission to be forwarded to a servlet deployed in a separate deployment (in a container with crossContext="true"), but on the same application server. So this Servlet would not be deployed under the /orbeon context, nor do I want to execute a http request over the wire.

So, in a setup with two deployments (war files)

/myapp/myservlet

/orbeon/myapp/myform

… I would like a submission from myform with a resource="/myapp/myservlet" to be forwarded to myserlvet.

Basically I would like to do something similar to what is decribed here (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications), but the request would be forwarded from orbeon to the Servlet, and not the other way around.

How could the above be achieved? (I did not find any hints here http://wiki.orbeon.com/forms/doc/developer-guide/xforms-advanced-submissions).

Is there another way instead of writing my own Processor?

Best regards,

Simon



--
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
Reply | Threaded
Open this post in threaded view
|

Re: AW: Re: forwarding submissions from orbeon to servlet in separate deployments

Alessandro  Vernet
Administrator
Simon,

I think that what you're looking for is what Orbeon Forms calls "local
submissions". I am not sure though if those do work across contexts.
Can I ask why you'd like to avoid having an actual HTTP request? In
the meantime you can learn more about this on:

http://www.orbeon.com/orbeon/doc/reference-xforms-configuration#local-submissions-enabling

Alex

On Wed, Aug 11, 2010 at 3:43 AM, Gunzenreiner Simon
<[hidden email]> wrote:

> Hi Han Ming
>
>
>
> Thanks a lot – but this is exactly what I do not want to do, which is,
> sending an HTTP request. I want the Servlet forward mechanism to be used.
>
>
>
> Best regards,
>
> Simon
>
>
>
> Von: Han Ming Low [mailto:[hidden email]]
> Gesendet: Mittwoch, 11. August 2010 12:11
> An: [hidden email]
> Betreff: [ops-users] Re: forwarding submissions from orbeon to servlet in
> separate deployments
>
>
>
> Hi,
>
>
>
> Not sure if I'm right, but I will try.  :)
>
>
>
> You can in the "Advanced" section and try "Edit Source"
>
> Then, in the form code,
>
> add to the xforms:model section
>
>     <xforms:submission id="submit_form"
> action="http://localhost:8080/myapp/myservlet" method="post"/>
>
>
>
> then to add a button, or customize the button to
>
>
>
>      <xforms:submit submission="submit_form">
>       <xforms:label>Submit</xforms:label>
>     </xforms:submit>
>
> Then you should be able to see the whole xml being submitted to your
> servlet.
>
>
>
> I hope it's right.  :)
>
>
>
> Cheers.
>
>
>
>
>
> Han Ming
>
> On Wed, Aug 11, 2010 at 5:31 PM, Gunzenreiner Simon
> <[hidden email]> wrote:
>
> Hi all
>
> I would like the xforms submission to be forwarded to a servlet deployed in
> a separate deployment (in a container with crossContext="true"), but on the
> same application server. So this Servlet would not be deployed under the
> /orbeon context, nor do I want to execute a http request over the wire.
>
> So, in a setup with two deployments (war files)
>
> /myapp/myservlet
>
> /orbeon/myapp/myform
>
> … I would like a submission from myform with a resource="/myapp/myservlet"
> to be forwarded to myserlvet.
>
> Basically I would like to do something similar to what is decribed here
> (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications),
> but the request would be forwarded from orbeon to the Servlet, and not the
> other way around.
>
> How could the above be achieved? (I did not find any hints here
> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-advanced-submissions).
>
> Is there another way instead of writing my own Processor?
>
> Best regards,
>
> Simon
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

AW: Re: AW: Re: forwarding submissions from orbeon to servlet in separate deployments

Gunzenreiner Simon
Hi Alex

I would like to avoid the http request for 2 reasons:
1) I don't have to rely on the principal passed in the Header Authorization information, but rather can use the authenticated Principal (authenticated when accessing the orbeon forms serlvet.
2) Performance

I was aware of the local submission doc, bus was tricked by having replace="instance" but not oxf.xforms.local-submission-include = true ....

Just solved it yesterday evening, otherwise I would have replied that it's resolved.

Thanks a lot,
Simon

-----Ursprüngliche Nachricht-----
Von: Alessandro Vernet [mailto:[hidden email]]
Gesendet: Freitag, 13. August 2010 02:44
An: ops-users
Betreff: [ops-users] Re: AW: Re: forwarding submissions from orbeon to servlet in separate deployments

Simon,

I think that what you're looking for is what Orbeon Forms calls "local submissions". I am not sure though if those do work across contexts.
Can I ask why you'd like to avoid having an actual HTTP request? In the meantime you can learn more about this on:

http://www.orbeon.com/orbeon/doc/reference-xforms-configuration#local-submissions-enabling

Alex

On Wed, Aug 11, 2010 at 3:43 AM, Gunzenreiner Simon <[hidden email]> wrote:

> Hi Han Ming
>
>
>
> Thanks a lot - but this is exactly what I do not want to do, which is,
> sending an HTTP request. I want the Servlet forward mechanism to be used.
>
>
>
> Best regards,
>
> Simon
>
>
>
> Von: Han Ming Low [mailto:[hidden email]]
> Gesendet: Mittwoch, 11. August 2010 12:11
> An: [hidden email]
> Betreff: [ops-users] Re: forwarding submissions from orbeon to servlet
> in separate deployments
>
>
>
> Hi,
>
>
>
> Not sure if I'm right, but I will try.  :)
>
>
>
> You can in the "Advanced" section and try "Edit Source"
>
> Then, in the form code,
>
> add to the xforms:model section
>
>     <xforms:submission id="submit_form"
> action="http://localhost:8080/myapp/myservlet" method="post"/>
>
>
>
> then to add a button, or customize the button to
>
>
>
>      <xforms:submit submission="submit_form">
>       <xforms:label>Submit</xforms:label>
>     </xforms:submit>
>
> Then you should be able to see the whole xml being submitted to your
> servlet.
>
>
>
> I hope it's right.  :)
>
>
>
> Cheers.
>
>
>
>
>
> Han Ming
>
> On Wed, Aug 11, 2010 at 5:31 PM, Gunzenreiner Simon
> <[hidden email]> wrote:
>
> Hi all
>
> I would like the xforms submission to be forwarded to a servlet
> deployed in a separate deployment (in a container with
> crossContext="true"), but on the same application server. So this
> Servlet would not be deployed under the /orbeon context, nor do I want to execute a http request over the wire.
>
> So, in a setup with two deployments (war files)
>
> /myapp/myservlet
>
> /orbeon/myapp/myform
>
> ... I would like a submission from myform with a resource="/myapp/myservlet"
> to be forwarded to myserlvet.
>
> Basically I would like to do something similar to what is decribed
> here
> (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-app
> lications), but the request would be forwarded from orbeon to the
> Servlet, and not the other way around.
>
> How could the above be achieved? (I did not find any hints here
> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-advanced-submissions).
>
> Is there another way instead of writing my own Processor?
>
> Best regards,
>
> Simon
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet


--
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
Reply | Threaded
Open this post in threaded view
|

Re: AW: Re: AW: Re: forwarding submissions from orbeon to servlet in separate deployments

Alessandro  Vernet
Administrator
Simon,

Great, I'm glad the local submission works for you, and thank you for
the update on this.

Alex

On Fri, Aug 13, 2010 at 12:12 AM, Gunzenreiner Simon
<[hidden email]> wrote:

> Hi Alex
>
> I would like to avoid the http request for 2 reasons:
> 1) I don't have to rely on the principal passed in the Header Authorization information, but rather can use the authenticated Principal (authenticated when accessing the orbeon forms serlvet.
> 2) Performance
>
> I was aware of the local submission doc, bus was tricked by having replace="instance" but not oxf.xforms.local-submission-include = true ....
>
> Just solved it yesterday evening, otherwise I would have replied that it's resolved.
>
> Thanks a lot,
> Simon
>
> -----Ursprüngliche Nachricht-----
> Von: Alessandro Vernet [mailto:[hidden email]]
> Gesendet: Freitag, 13. August 2010 02:44
> An: ops-users
> Betreff: [ops-users] Re: AW: Re: forwarding submissions from orbeon to servlet in separate deployments
>
> Simon,
>
> I think that what you're looking for is what Orbeon Forms calls "local submissions". I am not sure though if those do work across contexts.
> Can I ask why you'd like to avoid having an actual HTTP request? In the meantime you can learn more about this on:
>
> http://www.orbeon.com/orbeon/doc/reference-xforms-configuration#local-submissions-enabling
>
> Alex
>
> On Wed, Aug 11, 2010 at 3:43 AM, Gunzenreiner Simon <[hidden email]> wrote:
>> Hi Han Ming
>>
>>
>>
>> Thanks a lot - but this is exactly what I do not want to do, which is,
>> sending an HTTP request. I want the Servlet forward mechanism to be used.
>>
>>
>>
>> Best regards,
>>
>> Simon
>>
>>
>>
>> Von: Han Ming Low [mailto:[hidden email]]
>> Gesendet: Mittwoch, 11. August 2010 12:11
>> An: [hidden email]
>> Betreff: [ops-users] Re: forwarding submissions from orbeon to servlet
>> in separate deployments
>>
>>
>>
>> Hi,
>>
>>
>>
>> Not sure if I'm right, but I will try.  :)
>>
>>
>>
>> You can in the "Advanced" section and try "Edit Source"
>>
>> Then, in the form code,
>>
>> add to the xforms:model section
>>
>>     <xforms:submission id="submit_form"
>> action="http://localhost:8080/myapp/myservlet" method="post"/>
>>
>>
>>
>> then to add a button, or customize the button to
>>
>>
>>
>>      <xforms:submit submission="submit_form">
>>       <xforms:label>Submit</xforms:label>
>>     </xforms:submit>
>>
>> Then you should be able to see the whole xml being submitted to your
>> servlet.
>>
>>
>>
>> I hope it's right.  :)
>>
>>
>>
>> Cheers.
>>
>>
>>
>>
>>
>> Han Ming
>>
>> On Wed, Aug 11, 2010 at 5:31 PM, Gunzenreiner Simon
>> <[hidden email]> wrote:
>>
>> Hi all
>>
>> I would like the xforms submission to be forwarded to a servlet
>> deployed in a separate deployment (in a container with
>> crossContext="true"), but on the same application server. So this
>> Servlet would not be deployed under the /orbeon context, nor do I want to execute a http request over the wire.
>>
>> So, in a setup with two deployments (war files)
>>
>> /myapp/myservlet
>>
>> /orbeon/myapp/myform
>>
>> ... I would like a submission from myform with a resource="/myapp/myservlet"
>> to be forwarded to myserlvet.
>>
>> Basically I would like to do something similar to what is decribed
>> here
>> (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-app
>> lications), but the request would be forwarded from orbeon to the
>> Servlet, and not the other way around.
>>
>> How could the above be achieved? (I did not find any hints here
>> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-advanced-submissions).
>>
>> Is there another way instead of writing my own Processor?
>>
>> Best regards,
>>
>> Simon
>>
>> --
>> 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
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet