User login

[wsf-javascript-dev] Using Host Object approach to implement WSRequest for Rhino

Forums :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,
We are having some limitations with the WSRequest implementation for
Rhino as Rhino does not allow to use this externally loaded script in
internal functions... Also this importing of javascript does not look
like a standard feature in Rhino..

While looking for a better approach for the above, we came across the
host objects[1] approach and felt that it would be a better way to
implement WSRequest in Rhino.. Host objects are JavaScript objects that
provide special access to the host environment. For example, in a
browser environment, the Window and Document objects are host objects.
Other host objects which we can provide to the users in our Mashup
environments are File,RSS Parsers, etc, etc..

We also feel that it's cleaner to implement the WSRequest rhino version
using pure java since we are using Axis2/java underneath.

Please provide your valuable feedback on this..

Thanks,
Thilina

[1] http://www.mozilla.org/rhino/tutorial.html#javaScriptHostObjects
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFGCFVETt0cKycFPQgRAtm3AJ4+dLll5my8AjY8WqUqptEEo3XzwgCfcEaS
u9/+tKkRDLbPIVMLG3oz+9c=
=G8Iz
-----END PGP SIGNATURE-----

_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

[wsf-javascript-dev] Using Host Object approach to implement WSR

Can we have these discussions on wsf-general@? Its hard to keep track of
these different mailing lists .. maybe use a [javascript] prefix?

(I thought we decided not to create javascript, php etc. lists but I must
be mistaken.)

Sanjiva.

Thilina Gunarathne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
> We are having some limitations with the WSRequest implementation for
> Rhino as Rhino does not allow to use this externally loaded script in
> internal functions... Also this importing of javascript does not look
> like a standard feature in Rhino..
>
> While looking for a better approach for the above, we came across the
> host objects[1] approach and felt that it would be a better way to
> implement WSRequest in Rhino.. Host objects are JavaScript objects that
> provide special access to the host environment. For example, in a
> browser environment, the Window and Document objects are host objects.
> Other host objects which we can provide to the users in our Mashup
> environments are File,RSS Parsers, etc, etc..
>
> We also feel that it's cleaner to implement the WSRequest rhino version
> using pure java since we are using Axis2/java underneath.
>
> Please provide your valuable feedback on this..
>
> Thanks,
> Thilina
>
> [1] http://www.mozilla.org/rhino/tutorial.html#javaScriptHostObjects
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQFGCFVETt0cKycFPQgRAtm3AJ4+dLll5my8AjY8WqUqptEEo3XzwgCfcEaS
> u9/+tKkRDLbPIVMLG3oz+9c=
> =G8Iz
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Wsf-javascript-dev mailing list
> Wsf-javascript-dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev
>

--
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
email: sanjiva@wso2.com; cell: +94 77 787 6880; fax: +1 509 691 2000

"Oxygenating the Web Service Platform."

_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

[wsf-javascript-dev] Using Host Object approach to implement WSR

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sanjiva Weerawarana wrote:
> Can we have these discussions on wsf-general@? Its hard to keep track of
> these different mailing lists .. maybe use a [javascript] prefix?
+1.. We have toooooooo many mailing lists now.. This also gives rise to
plenty of cross posting too...

~Thilina
>
> (I thought we decided not to create javascript, php etc. lists but I
> must be mistaken.)
>
> Sanjiva.
>
> Thilina Gunarathne wrote:
> Hi all,
> We are having some limitations with the WSRequest implementation for
> Rhino as Rhino does not allow to use this externally loaded script in
> internal functions... Also this importing of javascript does not look
> like a standard feature in Rhino..
>
> While looking for a better approach for the above, we came across the
> host objects[1] approach and felt that it would be a better way to
> implement WSRequest in Rhino.. Host objects are JavaScript objects that
> provide special access to the host environment. For example, in a
> browser environment, the Window and Document objects are host objects.
> Other host objects which we can provide to the users in our Mashup
> environments are File,RSS Parsers, etc, etc..
>
> We also feel that it's cleaner to implement the WSRequest rhino version
> using pure java since we are using Axis2/java underneath.
>
> Please provide your valuable feedback on this..
>
> Thanks,
> Thilina
>
> [1] http://www.mozilla.org/rhino/tutorial.html#javaScriptHostObjects
>>
_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev
>>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFGCGLhTt0cKycFPQgRAjm8AJ44No1/Z3JSbjzht3eyfaKG/UbYKACbBtat
4zQxWoQodXuuTnb6PLd8uSA=
=ffiV
-----END PGP SIGNATURE-----

_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

[wsf-javascript-dev] Using Host Object approach to implement WSR

On Tue, 2007-03-27 at 04:50 +0530, Thilina Gunarathne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
> We are having some limitations with the WSRequest implementation for
> Rhino as Rhino does not allow to use this externally loaded script in
> internal functions... Also this importing of javascript does not look
> like a standard feature in Rhino..
>
> While looking for a better approach for the above, we came across the
> host objects[1] approach and felt that it would be a better way to
> implement WSRequest in Rhino.. Host objects are JavaScript objects that
> provide special access to the host environment.

Host objects sound like the right way to go to me.

James

> For example, in a
> browser environment, the Window and Document objects are host objects.
> Other host objects which we can provide to the users in our Mashup
> environments are File,RSS Parsers, etc, etc..
>
> We also feel that it's cleaner to implement the WSRequest rhino version
> using pure java since we are using Axis2/java underneath.
>
> Please provide your valuable feedback on this..
>
> Thanks,
> Thilina
>
> [1] http://www.mozilla.org/rhino/tutorial.html#javaScriptHostObjects
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQFGCFVETt0cKycFPQgRAtm3AJ4+dLll5my8AjY8WqUqptEEo3XzwgCfcEaS
> u9/+tKkRDLbPIVMLG3oz+9c=
> =G8Iz
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Wsf-javascript-dev mailing list
> Wsf-javascript-dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

RE: [wsf-javascript-dev] Using Host Object approach to implement

+1. I was a bit surprised that the WSRequest support was essentially a
backdoor Javascript import. Besides WSRequest, I'm thinking we may need a
hosted File object of some sort (Thilina found some interesting things over
on Mozilla.org) built in so we can have clean support for MTOM.

Jonathan Marsh - http://www.wso2.com - http://auburnmarshes.spaces.live.com

> -----Original Message-----
> From: wsf-javascript-dev-bounces@wso2.org [mailto:wsf-javascript-dev-
> bounces@wso2.org] On Behalf Of James Clark
> Sent: Monday, March 26, 2007 4:52 PM
> To: Thilina Gunarathne
> Cc: wsf-javascript-dev@wso2.org
> Subject: Re: [wsf-javascript-dev] Using Host Object approach to
> implement WSRequest for Rhino
>
> On Tue, 2007-03-27 at 04:50 +0530, Thilina Gunarathne wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi all,
> > We are having some limitations with the WSRequest implementation for
> > Rhino as Rhino does not allow to use this externally loaded script in
> > internal functions... Also this importing of javascript does not look
> > like a standard feature in Rhino..
> >
> > While looking for a better approach for the above, we came across the
> > host objects[1] approach and felt that it would be a better way to
> > implement WSRequest in Rhino.. Host objects are JavaScript objects
> that
> > provide special access to the host environment.
>
> Host objects sound like the right way to go to me.
>
> James
>
> > For example, in a
> > browser environment, the Window and Document objects are host
> objects.
> > Other host objects which we can provide to the users in our Mashup
> > environments are File,RSS Parsers, etc, etc..
> >
> > We also feel that it's cleaner to implement the WSRequest rhino
> version
> > using pure java since we are using Axis2/java underneath.
> >
> > Please provide your valuable feedback on this..
> >
> > Thanks,
> > Thilina
> >
> > [1] http://www.mozilla.org/rhino/tutorial.html#javaScriptHostObjects
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.3 (GNU/Linux)
> >
> > iD8DBQFGCFVETt0cKycFPQgRAtm3AJ4+dLll5my8AjY8WqUqptEEo3XzwgCfcEaS
> > u9/+tKkRDLbPIVMLG3oz+9c=
> > =G8Iz
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Wsf-javascript-dev mailing list
> > Wsf-javascript-dev@wso2.org
> > http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev
>
>
> _______________________________________________
> Wsf-javascript-dev mailing list
> Wsf-javascript-dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

[wsf-javascript-dev] Using Host Object approach to implement WSR

Thilina Gunarathne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
> We are having some limitations with the WSRequest implementation for
> Rhino as Rhino does not allow to use this externally loaded script in
> internal functions... Also this importing of javascript does not look
> like a standard feature in Rhino..
>
Importing scripts is not a part of the core implementation of
JavaScript. It is an additional functionality(load() method) given by
the shell utility that comes with Rhino distribution (see
http://www.mozilla.org/rhino/shell.html). The JavaScript message
receiver implements this functionality in its own way (yet similar to
the shell's one). It seems that there are limitations with this
implementation when it comes to internal functions. I will be able to
look at this :)
> While looking for a better approach for the above, we came across the
> host objects[1] approach and felt that it would be a better way to
> implement WSRequest in Rhino.. Host objects are JavaScript objects that
> provide special access to the host environment. For example, in a
> browser environment, the Window and Document objects are host objects.
> Other host objects which we can provide to the users in our Mashup
> environments are File,RSS Parsers, etc, etc..
>
> We also feel that it's cleaner to implement the WSRequest rhino version
> using pure java since we are using Axis2/java underneath.
>
WSRequest rhino version uses DOOM since the API defines the payload and
the responseXML to be DOM. This would be much efficient if both are
changed to OM. An alternative would be to implement everything purely on
Axis2/Java as suggested making WSRequest a host object.
> Please provide your valuable feedback on this..
>
> Thanks,
> Thilina
>
> [1] http://www.mozilla.org/rhino/tutorial.html#javaScriptHostObjects
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQFGCFVETt0cKycFPQgRAtm3AJ4+dLll5my8AjY8WqUqptEEo3XzwgCfcEaS
> u9/+tKkRDLbPIVMLG3oz+9c=
> =G8Iz
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Wsf-javascript-dev mailing list
> Wsf-javascript-dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev
>
>

_______________________________________________
Wsf-javascript-dev mailing list
Wsf-javascript-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.