HTTP Client Processor?

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

HTTP Client Processor?

flyingzumwalt
I need to consume a web service that expects requests in the form of an HTTP multi-part POST.  Is there already a processor in OPS that can act as an HTTP client (ie. that implements Jakarta Commons HttpClient), or should I implement my own custom processor?


Matt Zumwalt
MediaShelf, LLC







--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript error loading xforms.js

Brian Bacsu

I am using the 09_29_2006 nightly build, and when any of my  pages load, I get this JavaScript error.

Error: element has no properties
Source File: http://localhost:8888/CSC_PFW_30_CORE/ops/javascript/xforms.js
Line: 195

Which corresponds to this line in xforms.js - if (!element.orbeonClasses) { as seen in the code fragment below:

hasClass: function(element, className) {
       
if (!element.orbeonClasses) {
           element.orbeonClasses = {};
           var classes = element.className.split(" ");
           for (var i = 0; i < classes.length; i++)
               element.orbeonClasses[classes[i]] = true;
       }
       return element.orbeonClasses[className] == true;
   },


Is this an issue in xforms.js, or is it something I am doing wrong?  

Also... I cannot seem to get the following JavaScript function to return a value:

var value = ORBEON.xforms.Document.getValue("myControl")

Any suggestions would be appreciated.


Thanks,

Brian Bacsu


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: HTTP Client Processor?

Stephen Bayliss
In reply to this post by flyingzumwalt

Hi Matt

 

Try taking a look at these two in the documentation:

 

http://www.orbeon.com/ops/doc/reference-page-flow#external-submission

http://www.orbeon.com/ops/doc/reference-page-flow#accessing-submission

 

You should be able to pick up the data directly I think.

 

You can access the HTTP request directly as well using the oxf:request generator processor.

 

Steve

 

 

 


From: Matt Zumwalt [mailto:[hidden email]]
Sent: 02 October 2006 20:29
To: [hidden email]
Subject: [ops-users] HTTP Client Processor?

 

I need to consume a web service that expects requests in the form of an HTTP multi-part POST.  Is there already a processor in OPS that can act as an HTTP client (ie. that implements Jakarta Commons HttpClient), or should I implement my own custom processor?

 

 

Matt Zumwalt

MediaShelf, LLC

 

 

 



 



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript error loading xforms.js

Brian Bacsu
In reply to this post by Brian Bacsu

Hi

I have discovered this was an error that I caused, not an issue with xforms.js


Thanks,

Brian Bacsu



Brian Bacsu/FSG/CSC@CSC

10/02/2006 11:22 PM

Please respond to
[hidden email]

To
[hidden email]
cc
Subject
Re: [ops-users] JavaScript error loading xforms.js






I am using the 09_29_2006 nightly build, and when any of my  pages load, I get this JavaScript error.


Error: element has no properties

Source File: http://localhost:8888/CSC_PFW_30_CORE/ops/javascript/xforms.js

Line: 195


Which corresponds to this line in xforms.js -
if (!element.orbeonClasses) { as seen in the code fragment below:

hasClass: function(element, className) {
     
if (!element.orbeonClasses) {
          element.orbeonClasses = {};
          var classes = element.className.split(" ");
          for (var i = 0; i < classes.length; i++)
              element.orbeonClasses[classes[i]] = true;
      }
      return element.orbeonClasses[className] == true;
  },


Is this an issue in xforms.js, or is it something I am doing wrong?  


Also... I cannot seem to get the following JavaScript function to return a value:


var value = ORBEON.xforms.Document.getValue("myControl")


Any suggestions would be appreciated.



Thanks,

Brian Bacsu

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: HTTP Client Processor?

flyingzumwalt
In reply to this post by Stephen Bayliss
Thanks Steve,

If I'm not confused, the external submission is a way for other applications to pass XML into a page in the OPS Page Flow via HTTP POST.  I need the opposite of that.  How can I set up a processor in my pipeline that acts as a HTTP client using HTTP POST to pass info out to another application via HTTP POST, dumping that application's response to the processor's output?  I would expect this to be listed as one of the delegation processors if it existed, so my guess is that there isn't currently a processor to do the job.  Am I completely off base here?

Cheers,
Matt Zumwalt



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: HTTP Client Processor?

Henrik Pettersen
Matt,

does this help?
http://www.orbeon.com/ops/doc/processors-generators-url

Henrik

On 10/3/06, [hidden email] <[hidden email]> wrote:

> Thanks Steve,
>
> If I'm not confused, the external submission is a way for other applications to pass XML into a page in the OPS Page Flow via HTTP POST.  I need the opposite of that.  How can I set up a processor in my pipeline that acts as a HTTP client using HTTP POST to pass info out to another application via HTTP POST, dumping that application's response to the processor's output?  I would expect this to be listed as one of the delegation processors if it existed, so my guess is that there isn't currently a processor to do the job.  Am I completely off base here?
>
> Cheers,
> Matt Zumwalt
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: HTTP Client Processor?

Ross Horne
Matt,

Or this one which is not documented yet and makes use of the XForms model:
http://mail-archive.objectweb.org/ops-users/2006-05/msg00237.html

Ross.

On 03/10/06, Henrik Pettersen <[hidden email]> wrote:
Matt,

does this help?
http://www.orbeon.com/ops/doc/processors-generators-url

Henrik

On 10/3/06, [hidden email] <[hidden email]> wrote:

> Thanks Steve,
>
> If I'm not confused, the external submission is a way for other applications to pass XML into a page in the OPS Page Flow via HTTP POST.  I need the opposite of that.  How can I set up a processor in my pipeline that acts as a HTTP client using HTTP POST to pass info out to another application via HTTP POST, dumping that application's response to the processor's output?  I would expect this to be listed as one of the delegation processors if it existed, so my guess is that there isn't currently a processor to do the job.  Am I completely off base here?
>
> Cheers,
> Matt Zumwalt
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Client Processor?

Erik Bruchez
Administrator
All,

Even better, we have now packaged this in a processor called
oxf:xforms-submission. It is documented here:

   http://www.orbeon.com/ops/doc/processors-submission

-Erik

Ross Horne wrote:

> Matt,
>
> Or this one which is not documented yet and makes use of the XForms model:
> http://mail-archive.objectweb.org/ops-users/2006-05/msg00237.html 
> <http://mail-archive.objectweb.org/ops-users/2006-05/msg00237.html>
>
> Ross.
>
> On 03/10/06, *Henrik Pettersen* <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Matt,
>
>     does this help?
>     http://www.orbeon.com/ops/doc/processors-generators-url
>
>     Henrik
>
>     On 10/3/06, [hidden email] <mailto:[hidden email]>
>     <[hidden email] <mailto:[hidden email]>> wrote:
>      > Thanks Steve,
>      >
>      > If I'm not confused, the external submission is a way for other
>     applications to pass XML into a page in the OPS Page Flow via HTTP
>     POST.  I need the opposite of that.  How can I set up a processor in
>     my pipeline that acts as a HTTP client using HTTP POST to pass info
>     out to another application via HTTP POST, dumping that application's
>     response to the processor's output?  I would expect this to be
>     listed as one of the delegation processors if it existed, so my
>     guess is that there isn't currently a processor to do the job.  Am I
>     completely off base here?
>      >
>      > Cheers,
>      > Matt Zumwalt
>      >
>      >
>      >
>      >
>      > --
>      > You receive this message as a subscriber of the
>     [hidden email] <mailto:[hidden email]> mailing list.
>      > To unsubscribe: mailto:[hidden email]
>     <mailto:[hidden email]>
>      > For general help: mailto:[hidden email]
>     <mailto:[hidden email]>?subject=help
>      > ObjectWeb mailing lists service home page:
>     http://www.objectweb.org/wws
>      >
>      >
>      >
>
>
>
>
>     --
>     You receive this message as a subscriber of the
>     [hidden email] <mailto:[hidden email]> mailing list.
>     To unsubscribe: mailto:[hidden email]
>     <mailto:[hidden email]>
>     For general help: mailto: [hidden email]
>     <mailto:[hidden email]>?subject=help
>     ObjectWeb mailing lists service home page: http://www.objectweb.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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Client Processor?

Erik Bruchez
Administrator
In reply to this post by flyingzumwalt
Matt,

We have now exposed the HTTP processor as oxf:xforms-submission, see the
doc here:

   http://www.orbeon.com/ops/doc/processors-submission

Now unfortunately we don't yet support method="multipart-post". When
implemented, it will act like specified here:

   http://www.w3.org/TR/xforms/slice11.html#serialize-multipart

In your particular case, what must the different parts contain? If it is
too different from what XForms will do, you will probably have to either
write your own processor, or add and implement a custom method to the
XForms submission code (like xxforms:multipart-post).

-Erik

Matt Zumwalt wrote:
> I need to consume a web service that expects requests in the form of an
> HTTP multi-part POST.  Is there already a processor in OPS that can act
> as an HTTP client (ie. that implements Jakarta Commons HttpClient), or
> should I implement my own custom processor?
>
>
> Matt Zumwalt
> MediaShelf, LLC
> http://www.yourmediashelf.com

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Client Processor?

marc-62
In reply to this post by Erik Bruchez
Hi Erik,

I tried your doc example for the get request :

"This is how you perform a GET of an XML document to the URL
|http://example.org/list?first=12&size=100|:"

<p:processor name="oxf:xforms-submission">
   <p:input name="submission">
      <xforms:submission method="get" action="http://example.org/list"/>
   </p:input>
   <p:input name="request">
      <parameters>
         <first>12</first>
         <size>100</size>
      </parameters>
   </p:input>
   <p:output name="response" id="response"/>
</p:processor>

The server receiving the url shows this one as
|http://example.org/list?first=12;size=100.
The & is a ;
|It's an aspx page on IIS. Any idea ?

--
Marc


Erik Bruchez a écrit :

> All,
>
> Even better, we have now packaged this in a processor called
> oxf:xforms-submission. It is documented here:
>
>   http://www.orbeon.com/ops/doc/processors-submission
>
> -Erik




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Client Processor?

Erik Bruchez
Administrator
Marc,

Good catch. This is because the default separator in XForms is ";". Add
separator="&amp;" to switch to "&". I updated the example as well in the
doc.

-Erik

marc wrote:

> Hi Erik,
>
> I tried your doc example for the get request :
>
> "This is how you perform a GET of an XML document to the URL
> |http://example.org/list?first=12&size=100|:"
>
> <p:processor name="oxf:xforms-submission">   <p:input name="submission">
>      <xforms:submission method="get" action="http://example.org/list"/>
>   </p:input>
>   <p:input name="request">
>      <parameters>
>         <first>12</first>
>         <size>100</size>
>      </parameters>
>   </p:input>
>   <p:output name="response" id="response"/>
> </p:processor>
>
> The server receiving the url shows this one as
> |http://example.org/list?first=12;size=100.
> The & is a ;
> |It's an aspx page on IIS. Any idea ?
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Client Processor?

flyingzumwalt
In reply to this post by flyingzumwalt
Thanks Erik and Ross,

The submission processor looks really useful.  I'm glad to see it there.  For my current task, I need to perform a multipart-post and I also need to authenticate with the HTTP server, so I will either write my own processor or extend yours.  If my code ends up being recyclable, I will share it.

Nice work.  OPS is great.



Matt Zumwalt
MediaShelf, LLC



From: Erik Bruchez <[hidden email]>
Date: October 5, 2006 4:03:22 AM CDT
Subject: Re: [ops-users] HTTP Client Processor?
Reply-To: [hidden email]


Matt,

We have now exposed the HTTP processor as oxf:xforms-submission, see the doc here:


Now unfortunately we don't yet support method="multipart-post". When implemented, it will act like specified here:


In your particular case, what must the different parts contain? If it is too different from what XForms will do, you will probably have to either write your own processor, or add and implement a custom method to the XForms submission code (like xxforms:multipart-post).

-Erik

Matt Zumwalt wrote:

I need to consume a web service that expects requests in the form of an HTTP multi-part POST.  Is there already a processor in OPS that can act as an HTTP client (ie. that implements Jakarta Commons HttpClient), or should I implement my own custom processor?
Matt Zumwalt
MediaShelf, LLC



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Client Processor?

Erik Bruchez
Administrator
Matt,

Thanks! The ideal way would be to build on oxf:xforms-submission, but I
understand if this turns out to be hard. The code is mainly in
XFormsModelSubmission.java and XFormsSubmissionUtils.java.

For Basic HTTP authentication, you can either use username and password
in the action URL:

   action="http://john:password@.../my/service"

or you can use, on xforms:submission:

   xxforms:username="john" xxforms:password="password"

I have updated the doc as well:

   http://www.orbeon.com/ops/doc/processors-submission#authentication

-Erik

Matt Zumwalt wrote:

> Thanks Erik and Ross,
>
> The submission processor looks really useful.  I'm glad to see it
> there.  For my current task, I need to perform a multipart-post and I
> also need to authenticate with the HTTP server, so I will either write
> my own processor or extend yours.  If my code ends up being recyclable,
> I will share it.
>
> Nice work.  OPS is great.
>
>
>
> Matt Zumwalt
> MediaShelf, LLC
> http://www.yourmediashelf.com
>
>
>
> *From: *Erik Bruchez <[hidden email] <mailto:[hidden email]>>
> *Date: *October 5, 2006 4:03:22 AM CDT
> *To: *[hidden email] <mailto:[hidden email]>
> *Subject: **Re: [ops-users] HTTP Client Processor?*
> *Reply-To: *[hidden email] <mailto:[hidden email]>
>
>
> Matt,
>
> We have now exposed the HTTP processor as oxf:xforms-submission, see the
> doc here:
>
>   http://www.orbeon.com/ops/doc/processors-submission
>
> Now unfortunately we don't yet support method="multipart-post". When
> implemented, it will act like specified here:
>
>   http://www.w3.org/TR/xforms/slice11.html#serialize-multipart
>
> In your particular case, what must the different parts contain? If it is
> too different from what XForms will do, you will probably have to either
> write your own processor, or add and implement a custom method to the
> XForms submission code (like xxforms:multipart-post).
>
> -Erik
>
> Matt Zumwalt wrote:
>
>> I need to consume a web service that expects requests in the form of
>> an HTTP multi-part POST.  Is there already a processor in OPS that can
>> act as an HTTP client (ie. that implements Jakarta Commons
>> HttpClient), or should I implement my own custom processor?
>> Matt Zumwalt
>> MediaShelf, LLC
>> http://www.yourmediashelf.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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws